Reference architecture: multi-tenant SaaS on PostgreSQL
A documented reference design for shared-schema multi-tenancy with row-level security, tenant-scoped transactions and audited support access.
Overview
This is a technical demonstration, not a client project. It documents patterns we use when designing SaaS platforms: tenant resolution from host, header and token; tenant context propagated through each request; and database row-level security as a second line of defence.
Read the related article for code examples and trade-offs.
Technologies and sector
Links
We label every item by what it is. Client projects appear here only after the client has approved what we publish.
Services involved
SaaS product development
Architecture and build of software-as-a-service platforms: tenancy, billing, onboarding, admin consoles and operational tooling.
Database design and administration
Schema design, performance tuning, migrations, replication, backups and upgrades for PostgreSQL, MySQL, SQL Server, MongoDB and more.
Planning something similar?
Tell us about your situation. We will share what we learned and what we would do differently.