Multi-Tenant SaaS Platform

One product. Every customer walled off.

A blueprint for a multi-tenant helpdesk with role-based workspaces, billing hooks and usage reporting.

Solution Blueprint

One missed tenant filter and a customer reads another customer’s tickets. An internal tool assumes one organisation. Selling it means isolation, plans, invitations and usage limits, all added without pausing the product or rewriting every query.

Who it is for

Software companies turning an internal tool into a product they can sell, and SaaS teams adding proper tenant isolation to a product that started with a single customer.

  • Customer admins setting up their own workspace
  • Support agents handling tickets all day
  • The founder watching usage and plan limits

What it sets out to do

  1. Make tenant isolation a property of the data layer, not a coding habit.
  2. Let a customer admin sign up, invite a team and configure a workspace unaided.
  3. Connect plans and usage to product limits through clear billing hooks.
  4. Keep one tenant’s traffic spike from degrading the others.

29%

of IaaS and PaaS spending is estimated to be wasted

Up from 27%, the first rise in five years, with cloud-based AI workloads contributing to the increase.

Source: Flexera 2026 State of the Cloud Report (opens in a new tab)

The main screens

Drawn to show how each screen works, not captured from a live product.

Agent inbox inside one customer’s isolated workspace.
Plan and usage view, with a warning before a limit is reached.
Cross-tenant attack tests that run on every merge.

Architecture

How the pieces fit

Isolation is enforced twice, in the request context and again in the database, so one forgotten line of application code does not become a data leak.

React · NestJS · PostgreSQL · Redis · AWS

  1. L1 Workspace appReactRole-aware navigationTenant themingThe interface hides what a role cannot do, while the API remains the real boundary.
  2. L2 EdgeAWS load balancingPer-tenant rate limitsLimits are applied by tenant, so a busy customer is slowed before it affects others.
  3. L3 ApplicationNestJS modulesTenant contextPlan enforcementEvery request resolves a tenant before any business code runs.
  4. L4 DataPostgreSQL row-level securityRedis cacheUsage eventsCache keys include the tenant id, so a shared cache cannot cross a boundary.
  5. L5 Billing hooksPlan eventsUsage reportsWebhook retriesBilling events are idempotent, so a repeated webhook cannot charge twice.

Build order

How we would build it

Tenancy goes in first, before features. Everything added afterwards inherits the isolation rules and the tests that guard them.

01 of 05ADR

Decide the tenancy model

Write the decision record with its trade-offs and the conditions that would reopen it.

  • Isolated workspaces

    Each customer gets its own data boundary, branding and member list.

  • Roles and invitations

    Owners invite teammates and assign roles without contacting support.

  • Ticket inbox

    Shared queue, assignment, internal notes and status tracking for agents.

  • Plan limits

    Clear in-app warnings as a workspace approaches its limit, with no surprise lockouts.

  • Usage reporting

    Workspace-level views of activity for customer admins and the vendor.

Turning a tool into a SaaS product?

Tell us what you have and who it needs to serve. We will start with the tenancy decision, because it shapes everything that follows.