- Cozycal
- Develop
- Layout
Layout
Where the app, the Worker and the schemas live.
src/app: the React app. Routes are files insrc/app/routes(TanStack Router); data lives in TanStack DB collections insrc/app/data, stored on the device in IndexedDB.src/worker: the Worker. It serves/api/*,/mcp,/oauth/*,/.well-known/oauth-*and/connect; everything else is the static app.Notebookis the Durable Object that devices sync against.src/worker/schema.tsandsrc/worker/notebookSchema.ts: the Drizzle schemas of the D1 database (accounts, passkeys, calendar feeds) and of eachNotebook(synced rows, reminder devices).migrations/d1andmigrations/notebook: migrations generated by drizzle-kit. D1 ones are applied withbun run db:migrate; eachNotebookapplies its own when it wakes.cloudflare.config.ts: Worker name, static assets and Durable Object declaration, read bycf.