Otography is a music-focused social app built as a Bun/Turborepo monorepo.
apps/web- Next.js 16 + React 19 web appapps/api- Hono API for Cloudflare Workerspackages/errors- shared typed error classespackages/firebase-auth-rest- Firebase Auth REST implementation for Workers-compatible session cookiespackages/typescript-configandpackages/eslint-config- shared tooling config
- Bun
1.3.10 - Nix, for the local PostgreSQL service
- PostgreSQL runs locally on port
54322
bun install
bun run hooks:install
just db-start
bun run --cwd apps/api db:migrateThe local database uses Supabase-compatible authenticated and anon roles.
The baseline migration vendors the UUIDv7 generator and creates the RLS helper
function, so no UUID extension package is required on the database server.
bun run devUseful targeted commands:
bun run dev --filter=web
bun run dev --filter=api
just db-stop
just db-resetbun run check-types
bun run test
bun run test:db --filter=api
bun run qualitytest:db resets the test database, applies Drizzle migrations, and verifies
schema/RLS behavior against PostgreSQL.
Use the checked-in examples as templates:
apps/api/.dev.vars.exampleapps/web/.env.example
The web app talks only to the API. Auth credentials, Firebase session-cookie
handling, and database access stay inside apps/api.