Skip to content

All work

Multi-tenant platform

One codebase, several tenants

A self-hosted web platform that serves several businesses from a single codebase, with each tenant's data kept separate.

How it fits together

  1. Inputs

    • Visitors and editors

      A public site for each business, and a content editor behind it.

      • Next.js
      • Payload CMS
    • Code pushes

      Every push runs lint, type checks, tests, a build, and security scans.

  2. Engine

    One codebase

    Next.js and Payload CMS in TypeScript, serving several tenants.

    • Next.js
    • Payload CMS
    • TypeScript
    1. Keep tenants apart

      Each tenant's data is kept separate in Postgres.

      • PostgreSQL
    2. Package

      Each service ships as a Docker image.

      • Docker
    3. Deploy

      Coolify builds and runs the containers on a self-hosted DigitalOcean server.

      • Coolify
      • DigitalOcean
  3. Outputs

    • Tenant sites

      Each business gets its own site from the shared code.

    • Post-deploy checks

      Smoke and accessibility tests run after each deploy.

Guardrails

  • Per-tenant data isolation
  • Quality and security checks on every push
  • Repeatable container deploys

The problem

Small businesses need sites and assistants that are maintained, not handed over and forgotten. Running a separate codebase for every client does not work for a team of one.

What I built

  • A platform on Next.js, Payload CMS, and Postgres with per-tenant data isolation.
  • A containerized deployment on a self-hosted server managed through Coolify.
  • Automated quality and security checks on every push.

How I built it

TypeScript throughout, Docker for packaging, and Postgres for tenant data. One codebase means one place to fix a problem and one set of tests to trust.

The platform is early and is not yet a revenue product.

What it shows

I design for operations from the start: isolation between tenants, repeatable deployments, and checks that run without me.