← Back to portfolio

Multi-tenant Platform

Config-driven multi-tenant architecture with row-level security and event-driven backends, serving 100+ organizations across healthcare, finance and ISPs.

Lead Full-Stack Engineer · Architecture2020 — Present
  • PostgreSQL
  • Supabase (RLS)
  • Prisma
  • Turborepo
  • Node.js
  • TypeScript
  • Docker
Multi-tenant Platform case study cover

Challenge

Serving 100+ organizations across very different verticals (healthcare, finance, ISPs) from one codebase means every feature must be tenant-aware, data must never leak between tenants, and each vertical needs different behavior — without forking the product per client.

Solution

I built a config-driven, multi-tenant foundation: row-level security enforces isolation at the database, an event-driven backend keeps side effects decoupled, and a modular monorepo (Turborepo) shares domain packages across apps. Per-tenant configuration drives behavior, so a new vertical is a config surface, not a fork.

Overview

This is the platform layer the other products sit on: identity, tenancy, configuration and the data-isolation guarantees that make a shared SaaS safe to run for many organizations at once.

Architecture

  • Isolation by default — PostgreSQL row-level security (via Supabase) makes cross-tenant access structurally impossible, not just filtered in application code.
  • Event-driven — domain events decouple write paths from side effects (notifications, billing, sync), so features compose without tangling.
  • Config over forks — tenant and vertical behavior is data. Onboarding a new vertical means describing it, not branching the codebase.
  • Modular monorepo — Turborepo shares typed domain packages across apps with fast, cached builds.

Impact

The payoff is leverage: one team maintains one platform, and every new product or vertical inherits isolation, events and configuration for free.

Impact

  • 100+ organizations on a single, shared codebase
  • Row-level security enforcing hard tenant isolation
  • Event-driven backend decoupling side effects
  • Modular monorepo sharing domain logic across apps
  • New verticals onboarded via configuration, not forks