Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.92 KB

README.md

File metadata and controls

56 lines (37 loc) · 1.92 KB

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, create a database in Dexie Cloud

npx dexie-cloud create [--hackathon]

Notice the DB URL on the console.

Then, whitelist the origin used to access the app

npx dexie-cloud whitelist http://localhost:3000

Then, create an .env file with the variable

NEXT_PUBLIC_DEXIE_CLOUD_DB_URL=<DB URL> # (something like https://zabc123.dexie.cloud)

Then, run the development server:

npm install
npm run dev

Open http://localhost:3000 with your browser to see the result.

The Application

Search My Brain is a showcase application. It implements the following features:

  • Offline storage and sync
  • Conflict-free rich text editing with Tiptap and Y.js with collaborative editing and awaress (showing each other's cursors)
  • Full text search in notes
  • Spaces and sharing (sharing spaces of notes with friends)

Possible improvements

Extend Sign-in options

The app comes with email One-Time Password login out of the box. To add Github Signin, create an Oath app on Github and add the following to your .env file:

  • NEXT_PUBLIC_GITHUB_CLIENT_ID=(this value comes from your oath app on Github)
  • GITHUB_CLIENT_SECRET=(this value comes from your oath app on Github)
  • NEXT_PUBLIC_GITHUB_REDIRECT_URI=http://localhost:3000/api/auth/callback/github
  • DEXIE_CLOUD_CLIENT_ID=(this value comes from your dexie-cloud.key file)
  • DEXIE_CLOUD_CLIENT_SECRET=(this value comes from your dexie-cloud.key file)