This repo is a small, self-contained playground for the Zero installation and deploy guides. It’s meant for experimenting when wiring Zero into your own project would be too much work.
0-start: starting point (intentionally incomplete; you'll seeTODOs - view0-starton GitHub, orgit switch 0-start)..1-install: end state after completing the installation guide (view1-installon GitHub, orgit switch 1-install).2-deploy: final state after adding Docker Compose (view2-deployon GitHub, orgit switch 2-deploy).
apps/web: TanStack Start app (UI + API routes).packages/db: Drizzle DB schema + Postgres migrations/seed data.packages/zero: Zero schema, queries, and mutators.
- Drizzle schema: packages/db/src/drizzle.ts
- Seed data: packages/db/migrations/1111_music_seed_data.sql
- Zero schema (generated on
maximal): packages/zero/src/schema.ts - Queries + mutators: packages/zero/src/queries.ts, packages/zero/src/mutators.ts
- Query/mutate endpoints: apps/web/src/routes/api/query.ts, apps/web/src/routes/api/mutate.ts
- Example client usage: apps/web/src/routes/index.tsx
Prereqs: Bun + Docker.
- Install deps:
bun install - In one terminal, start Postgres (includes schema + seed data):
cd packages/db && docker compose up - In another terminal, start the web app:
cd apps/web && bun dev
On maximal, also run the zero-cache-dev command from the Installation guide (the example app expects Zero at http://localhost:4848).
If you want a working baseline to modify, start from maximal, then:
- Edit
packages/db/src/drizzle.ts - Re-generate the Zero schema:
cd packages/zero && bun run generate