Introduction
Understand what ships in the foundation, how the workspaces connect, and where to build first.
This is a TypeScript SaaS foundation you own outright. Instead of disconnected snippets, you get a working monorepo architecture with shared Zod contracts, Better Auth sessions, multi-tenant organizations, billing adapters, transactional email, object storage, and deployment verification.
Start here
Local setup
Create a product repository and run Postgres, API, and web with zero third-party keys.
Tech stack
See what powers the web app, edge edition, mobile client, API, data, and operations.
Configuration
Assign environment and provider settings to the right runtime owner.
First feature
Follow the contract-to-UI path for a new organization-scoped domain.
Billing & IAP
Wire Polar, Stripe, or Dodo for web checkout plus optional RevenueCat mobile IAP.
Deployment
Ship on Railway, AWS, GCP, or Cloudflare Workers and verify before launch.
Choose your product surface
The primary web foundation pairs apps/web (React 19, React Router, TanStack Query, Vite+, CSS
Modules, Zag.js) with apps/server (Bun, Hono RPC, PostgreSQL 18, Better Auth 1.7). Deploy the
API to Railway, AWS, or GCP and the static SPA to Cloudflare Workers Static Assets or the
matching cloud CDN. Start in Local setup and Architecture.
How the parts connect
What you get
- Application shells: React 19 SPA (
apps/web), static Astro marketing site (apps/site), sharedpackages/uiprimitives, plus optional TanStack Start (apps/start) and Expo (apps/mobile) editions. - Typed API & data: Bun + Hono RPC (
apps/server), PostgreSQL 18, SQL migrations with rollbacks, and shared Zod v4 contracts inpackages/contracts. - Identity & tenancy: Better Auth 1.7 (password, verification, reset, magic links, sessions,
optional Google OAuth, native Expo sessions) and multi-tenant organizations (
owner,admin,member, invitations, ownership transfer, and the/fileslibrary). - Billing & native IAP: Normalized web billing adapters for Polar, Stripe, and Dodo Payments plus optional RevenueCat mobile in-app purchases and Superwall paywalls.
- Operations & quality: 10 React Email templates with Resend and local log fallback, R2/S3/GCS
staged uploads with content validation, notifications, optional Sentry tunnel, Slack alerts,
state-machine maps, and
bun run check,bun run test, andbun run knipverification gates.
See Product surfaces for every shipped browser route and Notifications & marketing for communication paths.
A product foundation, not a complete business
The generated repository gives you the authenticated application, organizations, marketing site shell, and operational boundaries. You supply the product domain, final marketing copy, legal policies, pricing, analytics choice, and any background-work model. See Product scope.
Designed for a clean first run
Password authentication, verification, password reset, magic-link sign-in, organizations, and invitations work locally with Postgres alone and zero third-party API keys. Provider-backed capabilities enable cleanly once configured completely.
How to use these docs
Read Local setup first, then Tech stack,
Project structure, and Product surfaces. Use
State machines, Architecture, and
First feature when extending the app. The architecture and verification rules
in AGENTS.md apply whether you code with an agent or by hand.
Common questions
Yes. Polar, Stripe, and Dodo Payments are supported behind one normalized web billing contract.
Select exactly one web provider per deployment via BILLING_PROVIDER, and optionally enable
MOBILE_IAP_PROVIDER=revenuecat for App Store and Google Play subscriptions.
No. The web product is a React 19 SPA built with Vite+ (with an optional TanStack Start edition on Cloudflare Workers and an Astro static marketing site). Next.js powers only this standalone Fumadocs documentation site.
Yes. Every user automatically receives a personal organization, can create team organizations,
invite members by email, assign owner, admin, or member roles, transfer ownership, and
manage organization-scoped resources such as /files.
Create a dedicated domain with shared Zod contracts, Hono routes, service policy, SQL
repository, UI module, and tests, scoped to organization_id via organizationContext. Follow
the shipped files domain and the First feature guide.
Start with Deployment to choose a host for the API, database, and frontend. Use Go live to verify the running product, providers, backups, and security boundaries before admitting traffic.