Skip to Content
Platform Overview

Platform Overview

Architecture

  • Frontend: Next.js 16, Tailwind CSS v4, Zustand
  • Backend: NestJS 11, Prisma 7, PostgreSQL
  • Infrastructure: Azure App Service, Azure PostgreSQL Flexible Server

Multi-Tenancy

Every workspace is a tenant. Tenants are isolated via tenant_id on every database row.

Multi-Company

Within a tenant, you can create multiple companies. Company isolation uses 7 layers:

  1. X-Company-Id HTTP header
  2. CompanyGuard (access validation)
  3. CompanyScope (Prisma where clauses)
  4. DomainEvent (company context in events)
  5. CHECK constraints (NOT NULL on company_id)
  6. Foreign keys (ON DELETE RESTRICT)
  7. Row-Level Security (PostgreSQL policies)

Event-Driven Integration

16 domain events connect modules automatically. For example:

  • Inventory adjustment → GL entry (COGS)
  • Payroll posting → GL entry (salary expense)
  • Progress claim → Invoice → Revenue

Feature Gating

92 features are gated across 5 pricing tiers using the @RequireFeature() decorator.

Last updated on