城

Multi-tenant SaaS

Every customer walled off, in the database itself.

B2B and consumer SaaS with tenancy, roles, audit and billing built in from the first migration. Each customer’s rows are fenced off by PostgreSQL Row Level Security, so a bug in the app can’t show one company another’s data.

  • 5 live platforms
  • 230+ RLS policies on one schema
  • PostgreSQL · Supabase
  • NestJS · Next.js

What I build.

The pieces the platforms below share, whatever the product on top.

  • 01

    Tenant isolation in Postgres

    Row Level Security on every tenant table. On Kavlo the tenant comes from the customer’s subdomain and is set on every database connection, so no query relies on someone remembering a customer filter.

  • 02

    Roles that match the business

    Students, partners and admins on Gradia; admins, managers and employees on Avoda; role and department permissions on Kavlo. Checked on the server, not only hidden in the UI.

  • 03

    An audit trail

    Every admin action logged on Gradia, every pay-rate change on Avoda, and every stage of every approval workflow on Kavlo.

  • 04

    Enterprise sign-in

    Okta single sign-on for Kavlo’s enterprise customers; email codes and Google and Apple sign-in where the users are consumers.

  • 05

    Billing that fits the model

    Commission per redemption, collected by GoCardless Direct Debit, on Gradia. Stripe plans, credits and quotas on Basile and InstaSDR, with French VAT on Basile.

  • 06

    Secrets kept secret

    Integration credentials encrypted at rest on Kavlo. API keys hashed, scoped to their owner and re-checked against the subscription on every request on Basile.

Built for UK GDPR.

Gradia holds student and partner data for a UK company, so its schema was designed for UK GDPR from the start: about 70 tables, 230+ row-level security policies and least-privilege access. Students see only their own data, partners only their own business, and every admin action is audited.

“He has worked within strict data protection requirements, including row level security and least privilege access, and treated student and partner data with the seriousness it deserves.”
Devon Macmillan · Founder, Gradia Ltd

Platforms in production.

Each one is live. Open one for the full case study.

  • Kavlo

    B2B Multi-Tenant SaaS Platform

    Vendor, contract, invoice and spend management for mid-size and large companies, with AI that reads the documents and approval workflows that route them.

  • Gradia

    Student Discounts & Rewards Platform

    A UK student discounts and rewards platform: the iOS and Android app, partner and admin dashboards, and the API and database behind them.

    At Gradia Ltdgradia.co.uk ↗
  • Basile

    B2B Company & People Intelligence Platform

    One search across tens of millions of company and people records from five sources, with lists, enrichment and HubSpot sync.

  • InstaSDR

    AI-Powered Sales Development Platform

    An AI sales development platform: LangChain workflows that research, write and follow up, metered by Stripe subscriptions and credits.

  • Avoda

    Time Tracking, Team & Payroll Platform

    Time tracking, team management and payroll for organisations. I build the React web app and the NestJS GraphQL API behind it.

Building a SaaS, or taking one over?