Draftroom is a local-first collaborative notebook with a public website, Supabase synchronization, and a future Codex plugin.
- Notes stored in IndexedDB
- Automatic saving
- Full-text search across titles, content, and tags
- Favorites and archive views
- Tagging and sorting
- JSON backup export
- Owner, editor, and viewer permissions
- Single-use invitation links that expire after seven days
- Realtime updates for open shared notes
- Responsive interface
- Keyboard shortcuts:
Ctrl+Kto search andCtrl+Nfor a new note
Double-click run-dev.cmd. It starts a small hidden Python server on port 4173
and opens the Draftroom website at http://localhost:4173 in the Opera GX
Dev profile. The authenticated notebook lives at /app.html.
db.js owns browser persistence. The interface in app.js calls a small set of
data functions:
getAllNotessaveNoteremoveNoteseedNotesIfEmpty
The Supabase phase will add a remote repository with the same responsibilities, authentication, Row-Level Security, synchronization state, and conflict handling.
- Offline notebook foundation
- Supabase authentication and cloud synchronization
- Installable PWA and resilient offline queue
- Narrow, authenticated notes API
- Personal Codex plugin
- Open the Supabase project dashboard.
- Go to SQL Editor and create a new query.
- Paste the complete contents of
supabase-schema.sql. - Run the query and confirm that it completes without errors.
The schema enables and forces Row-Level Security. Authenticated users receive
permission to select, insert, update, and delete rows, but policies restrict every
operation to rows whose user_id matches the signed-in user.
The browser connection uses config.js, which contains only the project URL and
Supabase publishable key. Never add a secret key, service-role key, database
password, or personal access token to this project.
After the schema is applied, use Sign in to sync inside Draftroom. New accounts may need to confirm their email before their first sign-in, depending on the project's Supabase Auth settings.
After the base schema, run the complete contents of
supabase-collaboration-upgrade.sql in the SQL Editor. It creates:
- collaborator memberships with
editorandviewerroles; - expiring, single-use invitation links;
- private authorization helper functions;
- owner/editor/viewer RLS policies;
- a secure invitation-redemption RPC;
- Realtime publication for authorized note updates.
In Authentication → URL Configuration, add:
http://localhost:4173/**
For the current GitHub Pages deployment, also add:
https://minnmyat27.github.io/draftroom/**
Set the production Site URL to:
https://minnmyat27.github.io/draftroom/
Replace that Site URL with the custom HTTPS domain after connecting one.
Current editing uses a last-write-wins note model. It supports live updates and shared editing, but simultaneous typing in the exact same note can overwrite the other person's most recent unsaved text. A later CRDT-based editor can add character-level conflict-free collaboration.