Architecture

How the pieces fit together — routing, data, auth, and the ecosystem packages underneath.

Stack

  • TanStack Start — file-based routing under src/routes/, server functions for data loading
  • Prisma — schema in prisma/schema.prisma; sqlite by default, Postgres via DATABASE_URL
  • Better Auth — sessions, OAuth providers, magic links (src/server/auth/)
  • tRPC — typed API routers in src/server/api/routers/
  • @olwiba/* packages — UI primitives (cn), blocks (ui, ui-pro), docs shell (docs)

Route groups

  • (public) — marketing pages, blog, docs, changelog
  • _protected / (app) — authenticated app surface
  • api — auth handler and server endpoints

Docs surfaces

Two independent docs trees ship with the template:

SurfaceRouteContentDocsLayout variant
Product docs/docscontent/docs/product
Technical docs/technicalcontent/technical/technical

Each is gated by its own flag (VITE_ENABLE_DOCS_PAGE, VITE_ENABLE_TECHNICAL_DOCS_PAGE). See FLAG_MATRIX.md for the full flag inventory.