saas-kit docs

Architecture

Apps

  • apps/web/ — Next.js 16 App Router. Routes split between (marketing)/ (public — landing, pricing, blog, docs, changelog, legal, auth flows), (app)/[orgSlug]/... (per-org dashboard + settings), (admin)/ (super-admin console), and api/ (auth, webhooks, cron, OG).

Packages

  • @saas-kit/ui — shadcn primitives + composites + layouts (M3)
  • @saas-kit/auth — BetterAuth config + tenancy helpers + Polar plugin (M1, M2, M4)
  • @saas-kit/db — Drizzle schema + tenant-scoped repos (M1, M2, M6)
  • @saas-kit/billing — Polar / PayPal / Sepay providers (M4)
  • @saas-kit/email — Resend + React Email templates (M5)
  • @saas-kit/notifications — in-app + email notification dispatch (M5)
  • @saas-kit/observability — pino + Sentry + PostHog (M5)
  • @saas-kit/audit — transactional audit log + cross-tenant variant (M6)
  • @saas-kit/content — velite collection schemas + reader factory (M7)
  • @saas-kit/context — AsyncLocalStorage carrier (zero deps)

Multi-tenancy

Shared database, row-level isolation by organization_id. The proxy resolves orgSlugorganizationId and forwards it as a header. ALS-backed withOrg() injects the filter into every Drizzle query. Cross-tenant code lives in *.cross-tenant.ts files, whitelisted by ESLint.

More

See docs/superpowers/specs/ for full design specs per milestone.

On this page