← All work

Case / 03 of 07

Site Master

Configurable software without writing a new application for every client.

Role
Founding developer

Enterprise project under NDA — client and sector withheld.

Context

A multi-tenant platform for running large field programmes where organizations can define their own units, roles, forms, workflows, approval chains and reporting structures.

I built the initial system across the API and both web applications before development continued with another engineer.

System

Next.js web apps × 2
NestJS API · CASL
BullMQAMQP
PostgreSQLSuperset
S3RazorpayFirebase

What I built

  • Multi-tenancy
  • Organisation management
  • Dynamic entities
  • Form builder
  • Workflow engine
  • Approval hierarchies
  • Boards
  • Gantt views
  • Imports
  • Reports
  • Audit logs
  • Dashboards
  • Role/ability-based authorization

The hard part

“Configurable” sounds simple until the customer can configure almost everything.

The schema, forms, workflows and approval chains are data.

The challenge is allowing that flexibility without allowing one tenant to see or affect another tenant’s world.

Engineering decisions

  1. 01

    Configuration is data.

    Entities, forms, workflows and approval chains are stored and interpreted, not hard-coded per client.

  2. 02

    Ability-based authorization.

    CASL abilities decide what each role can see and do, per tenant.

  3. 03

    Tenant isolation as a system property.

    Flexibility without one tenant seeing or affecting another tenant’s data.

Shipped

  • API
  • Two web applications
  • Handed over to a second engineer

Stack

  • Next.js
  • React
  • TypeScript
  • TanStack Query
  • Zustand
  • NestJS
  • TypeORM
  • PostgreSQL
  • CASL
  • BullMQ
  • AMQP
  • Turborepo
  • Docker

Integrations

  • AWS S3
  • Razorpay
  • Firebase
  • PDFKit
  • Superset
Next case →PawTalesThe booking model changes when the customer has four legs.