SaaS
SaaS architecture
The parts of a B2B product that never appear in a launch post: how one person belongs to many companies, and how one company’s rows stay out of another company’s queries. These two articles hold for any stack — that is why they are written this way.
The articles
- The B2B SaaS data model: orgs, memberships, invites, roles
One user, many companies. How to model organizations, memberships and invites — and why the role belongs to the membership rather than to the user.
- Multi-tenancy across frameworks: how each isolates a tenant
Django, Rails, Laravel, Next.js, NestJS, Go, Phoenix and Postgres — where each one enforces tenant isolation, and why only one mechanism makes a missed filter impossible rather than merely unlikely.
Where to go instead
- All three starters — this model, shipped and tested
- All documentation — guides, deep dives, and evaluations
- SQLite vs Postgres — where the isolation lands