Tech stack
The technologies, runtimes, and responsibilities powering every layer of the foundation.
The stack is split cleanly by responsibility so the web app, edge edition, mobile client, API, shared contracts, and provider adapters evolve independently without losing end-to-end type safety.
Choose the layer you are working in
Work in apps/web for React 19 screens, React Router routes, TanStack Query server state, and
narrowly scoped Zustand client state. Shared primitives, tokens, and app layouts live in
packages/ui (CSS Modules, Zag.js, @superslate/avatar). Browser code never owns authorization
or provider secrets.
Full stack breakdown
| Layer | Technology | Responsibility |
|---|---|---|
| Web app | React 19, React Router, Vite+ 1.6 | Fast client SPA with explicit route and module boundaries. |
| Shared UI | packages/ui, CSS Modules, Zag.js | Accessible primitives, semantic OKLCH tokens, and shared app layouts across Web and Start. |
| Client data | TanStack Query, Zustand | Server-state caching and narrowly scoped client-only UI state. |
| Edge edition | TanStack Start, Cloudflare Workers, D1, Kysely | Optional single-Worker full-stack SSR edition sharing packages/ui. |
| Mobile edition | Expo SDK 58, React Native 0.88, Unistyles 3 | Optional iOS and Android client over Hono RPC with push and RevenueCat / Superwall IAP. |
| Marketing site | Astro 7, Cloudflare Workers Static Assets | Zero-JS public marketing site with shared tokens, JSON-LD, sitemap, and llms.txt. |
| API | Bun 1.4.5, Hono, Hono RPC | Typed HTTP API, middleware pipeline, and standalone compiled binary builds. |
| Validation | Zod v4 | Single source of truth for request, response, and environment schemas in packages/contracts. |
| Data | PostgreSQL 18, bun:sql, built-in migration runner | Parameterized SQL and dbmate-format SQL migrations with advisory locks and rollbacks. |
| Identity | Better Auth 1.7 | Password, verification, reset, magic links, sessions, Google OAuth, and Expo native auth. |
| Organizations | Personal + team workspaces, RBAC (owner/admin/member) | Trigger-provisioned personal org, team invites, ownership transfer, and org-scoped /files. |
| Billing | Polar, Stripe, or Dodo Payments + optional RevenueCat | One selected web provider plus optional native mobile IAP behind a server-authoritative model. |
| React Email, Resend | 10 typed templates, deterministic rendered HTML, and local log fallback. | |
| Storage | Cloudflare R2, Amazon S3, or GCS | Staged presigned uploads, magic-byte validation, public avatars, and private org files. |
| Observability | Pino, optional Sentry tunnel, Slack | Structured logs, PII-free error reporting, and sanitized operational alerts. |
| Quality | TypeScript 7, Bun (bun lint/bun fmt/bun test), Vite+, Turborepo, Knip | Fast format/type-aware lint, deterministic tests (Vitest in apps/start), and dead-code gates. |
What is deliberately not included
Version one does not include enterprise SSO/SCIM, admin impersonation, custom role builders, generic background jobs or durable queues, file malware scanning, or automatic compliance controls. Add those only when your product needs them and after choosing the right ownership and operational model. See Product scope and Background work.
Rate limits are shared
The included Hono endpoint limiters use atomic Postgres fixed windows, so configured budgets are shared across API replicas. Provider and infrastructure limits still need capacity and abuse proof before raising replica counts.
Continue with Project structure to see where each concern lives.