Pebble is an offline-first PWA for capturing atomic notes on mobile or desktop. Notes are saved locally first, then optionally synced to Cloudflare KV and imported into Obsidian with the companion plugin.
Production URL: https://pebble.savinpokharel.workers.dev
- Offline-first note capture with IndexedDB
- Installable PWA
- Optional cloud sync via Cloudflare Workers + KV
- Obsidian plugin integration for importing synced notes
- Light, dark, and device theme support
After clicking the button, Cloudflare creates a Worker project from this repo and automatically provisions the required PEBBLE_SYNC_KV binding for sync. Keep the default build/deploy settings unless you have custom requirements.
Set API_KEY in the deploy form (for example, generated with openssl rand -hex 32). This same key is used by both Pebble and the Obsidian plugin.
The app itself works without cloud sync. To enable sync between Pebble and Obsidian, configure these once:
- Set
API_KEYsecret:- Preferred: set it in the Cloudflare Deploy form during deployment
- Fallback: add it after deploy in Worker settings
- Cloudflare Dashboard -> Workers & Pages -> your worker -> Settings -> Variables and Secrets -> Add secret
- Key:
API_KEY - Value: any long random string
- In Pebble app Settings:
- Enable background sync
- Paste the same API key into the
API Keyfield
- In the Obsidian plugin settings:
- Set
API URLto your deployed Worker URL - Set
API Keyto the sameAPI_KEY
- Set
- User creates a note in the Pebble UI.
- Note is written to local IndexedDB immediately.
- If sync is enabled, unsynced notes are POSTed to
/api/sync/push. - Worker validates the API key and stores sync items in KV with TTL (7 days default; selectable 7/15/30 days in app settings).
This keeps capture fast and offline-safe even when network is unavailable.
- Obsidian plugin calls
/api/sync/fetchwithX-API-Key. - Worker validates API key and returns sync items from KV.
- Plugin writes notes into your configured Obsidian folder/template flow.
Sync direction is one-way: Pebble -> Cloudflare KV -> Obsidian.
npm install
npm run devFor full-stack local development with Cloudflare runtime:
npm run wrangler:devSet local secrets in .dev.vars when testing sync endpoints (see .dev.vars.example):
API_KEY=your-local-api-key- SvelteKit + TypeScript
- Tailwind CSS + shadcn-svelte
- Dexie + IndexedDB
- Cloudflare Workers + KV
MIT. See LICENSE.