docs / getting-started
Buildgrain SaaS Web Kit
A Next.js starter for B2B SaaS: Google OAuth, multi-tenant workspaces, RBAC, plan & access, mail, files, admin console, docs, and tests. This documentation covers setup, architecture, and deployment.
Setup →
Local Postgres, OAuth env, seeds — running in ~10 minutes
API →
Typed handlers, canonical envelope, OpenAPI export
Deployment →
Vercel and Docker guides with env checklists
Concepts →
Five ADRs — why the kit is built this way, with source paths
Troubleshooting →
Clean-machine setup failures and their exact fixes
Security →
Headers, tenant isolation, 401 semantics, demo boundary, reporting
License →
USD $49 one-time license, perpetual use, and clear reuse boundaries
Handoff →
Developer evaluation brief — ten checks for product and maintenance fit
Quick start
pnpmgit clone buildgrain-saas-web-kit && cd buildgrain-saas-web-kit pnpm install && pnpm db:setup && pnpm db:seed pnpm dev # http://localhost:3000
Stack
9 runtime depsEvery runtime dependency across the monorepo, with its installed version and license. Generated from the installed packages by pnpm sync:stack-manifest — not hand-written — and drift-tested in CI. Zero copyleft in runtime deps; a test enforces the claim. Check it against the lockfile yourself.
| Package | Version | License | Used by |
|---|---|---|---|
@supabase/ssr | 0.12.0 | MIT | @buildgrain/auth, web |
@supabase/supabase-js | 2.108.1 | MIT | @buildgrain/auth, web |
drizzle-orm | 0.45.2 | Apache-2.0 | @buildgrain/auth, @buildgrain/db, web |
lucide-react | 1.17.0 | ISC | root |
next | 15.5.21 | MIT | web |
postgres | 3.4.9 | Unlicense | @buildgrain/db |
react | 19.2.7 | MIT | root, web |
react-dom | 19.2.7 | MIT | root, web |
zod | 4.3.6 | MIT | web |