Docs

Getting started

The fastest way to see this template running is the demo login on the homepage's /auth/login route. It seeds a user named Demo User and drops you straight into the signed-in home route.

Running locally

Terminal
bun install bun dev

bun dev boots the One 2 dev server with one SQLite application database and Lime Sync. PORT_OFFSET lets you run multiple instances at once:

Terminal
PORT_OFFSET=10 bun dev

Editing data

Schema lives in database/schema.ts. Edit a table, then re-generate the Zero schema and Drizzle migrations:

Terminal
bun generate bun generate:migrations

Posts and comments are read through data/<name>/queries.ts and written via data/<name>/mutations.ts. The Zero client handles optimistic updates and rebases — you write the mutation function once and it runs on the client and server.

Deploying to Cloudflare

The production build runs on Workers with SQLite Durable Objects, Lime Sync, and R2 uploads. scripts/deploy-cloudflare.ts prepares and deploys both workers. GitHub Actions runs this path on main. See docs/publishing.md in the repository for account bindings, secrets, and migration details.

Where to go next

Most product work happens in three places:

  • app/home/ — authenticated routes (the tab screens and settings)
  • features/ — feature modules grouped by concern
  • interface/ — shared UI primitives

The public marketing surfaces (the splash + this docs page) live under app/index+ssg.tsx, app/docs/, and interface/marketing/.