Zero-knowledge encrypted notes on Cloudflare Workers + D1 (SQLite).
- Browser: password → PBKDF2 → AES‑GCM encryption → upload ciphertext
- Server (D1): stores only encrypted blobs + metadata — never sees plaintext or password
Features (v1):
- Create/open notes by URL slug (
/<slug>) - Autosave + manual save
- Version history (keeps last 10 encrypted snapshots)
- Change password (re-encrypt + save)
- Export/import encrypted backups
- Delete note
- Create a D1 database:
npx wrangler d1 create cloudnote-db-
Put the
database_idintowrangler.toml:12. -
Initialize schema:
npx wrangler d1 execute cloudnote-db --file=./schema.sqlOr apply migrations (recommended):
npx wrangler d1 migrations apply cloudnote-db- Dev / deploy:
npx wrangler dev
npx wrangler deployOpen http://localhost:8787/my-note (or your production domain) and use the URL slug as the note ID.
src/index.js– Worker API + static routing + security headersschema.sql– D1 schemapublic/index.html– landing pagepublic/note.html– note UIpublic/note.js– client-side encryption apppublic/app.css– shared styles