Project · Lifebot V2 · ADRs

ADR 0003 — SaaS-Boilerplate as control plane; FastAPI stays the data plane

type adrstatus activelifebot · saas · clerk · nextjs

Status

Accepted

Context

Owner wants ixartz/SaaS-Boilerplate (7.3k★, MIT, Next.js 16 + Clerk + Drizzle + Tailwind 4) as the platform foundation for its user management. Viability was assessed against the live repo: its Clerk base matches the IdP the FastAPI data plane already verifies via JWKS on (iss,sub).

Decision

Vendor the boilerplate as apps/platform — the control plane (www.: marketing, sign-up, orgs, account, admin, billing-ready). The zero-knowledge FastAPI sync API remains the data plane (api.), and the decrypting dashboard SPA remains app.. One Clerk instance spans all three. Drizzle uses a separate platform database so control-plane code can never touch ciphertext. The verified crypto/RLS core is not ported into Next.

Consequences

  • Full Clerk user management (MFA, social login, orgs, RBAC, impersonation) for ~zero build cost.
  • Two Tailwind majors coexist (v4 control plane, v3.4 dashboard/mobile) fed from one tokens file.
  • Stripe lives in the boilerplate's paid Pro tier — buy or hand-wire when billing becomes real.
  • Boilerplate is forked-and-owned; upstream updates are manual merges.
  • Org admins can never see member health data — orgs govern membership/billing only.
Compiled from wiki/projects/lifebot-v2/adr/0003-saas-boilerplate-control-plane.md · git is the source of truth