SPEC 002 — B2B MULTI-TENANT BOILERPLATE

Teams, roles, and seat billing — built into the schema.

For products where the customer is a company, not a person. Organizations, invitations, and role-based access are the foundation, not an afterthought bolted onto a single-user boilerplate.

AORGS

Multi-tenant from the schema up — every record scoped to an org

BROLES

Owner, Admin, Member — enforced server-side, not just hidden in the UI

CINVITES

Email invites, token-based acceptance, auto seat billing

DADMIN

Internal super-admin panel across every tenant

SPEC 002 — WHAT'S INCLUDED

Real multi-tenancy, not a patch

Organization is the root of the data model. Every query is scoped through Membership — there is no risk of one tenant seeing another's data because of a missed WHERE clause.

Roles enforced where it matters

requireRole() runs on the server for every org-scoped route, not just in a disabled button. Owner, Admin, and Member each unlock exactly what they should.

Seats that bill themselves

Accepting an invite bumps the Stripe subscription quantity automatically. Removing a member does the same in reverse — no manual reconciliation.

A real super-admin panel

A separate, gated view across every organization for support and billing troubleshooting — the feature most single-tenant boilerplates skip entirely.

Built for companies, not just users.

One license, the full source, no recurring fee for the code itself.

View pricing