Get started

Project structure

Seven workspaces, and what lives where inside the backend.

Workspaces

FolderWhat it is
backendFastify and tRPC API, Drizzle schema and migrations, Better Auth
web-appThe auth-gated app — Vite and React
desktopThe same app in Tauri, with its own routes and build
web-staticMarketing site — Next.js
blogBlog — Next.js static export
docsThis site — Next.js and Fumadocs
shared-uiComponents and tokens used by every frontend
email-templatesReact Email templates, built into the backend

Repo-wide files at the root:

  • CLAUDE.md — the build rules. Read it before writing UI.
  • COMPONENTS.md — the spec for every shared-ui component.
  • bones-style-guide.html — every token and component, rendered.
  • TODOS.md — the backlog.
  • NOTES.md — decisions and the reasons behind them.

Inside the backend

PathWhat's there
src/index.tsServer setup and the non-tRPC routes
src/auth.tsBetter Auth config and session fields
src/trpc/trpc.tsProcedure builders — protectedProcedure, requirePermission, and the rest
src/trpc/router.tsThe root router, and the AppRouter type the apps import
src/trpc/routers/One file per router, with its test beside it
src/db/One schema file per table
drizzle/Generated SQL migrations. Never edit these
src/permissions.tshasPermission and friends
src/storage/S3 client and presigned URL helpers
src/email/sendEmail
src/lib/logging/Request and database-change logs
src/lib/chat/Chatbot providers