Skip to main content

Engineering

Architecture built for multi-tenant scale

A modular, event-driven platform for multi-tenant operations. Enough detail to evaluate the engineering, without exposing implementation internals.

System architecture

Five layers from client to data, each with explicit boundaries and tenant-scoped access.

  1. Layer 1

    Client Layer

    Role-based portals with designation-aware navigation and per-tenant branding.

    • Web dashboard
    • Native iOS app
    • Native Android app
    • Platform admin portal
  2. Layer 2

    API Gateway

    A modular NestJS surface where guards, tenant middleware and validation run before any handler.

    • NestJS REST API
    • OpenAPI documentation
    • Rate limiting
    • Validation pipes
  3. Layer 3

    Application Services

    Domain modules that receive the tenant from a request-scoped context rather than deriving it themselves.

    • Workforce & attendance
    • Fleet management
    • Finance & payroll
    • Leave & expenses
    • Analytics & alerts
    • Employee onboarding
  4. Layer 4

    Event & Job Layer

    Asynchronous processing for bulk imports, email and push notifications, leave allocation and document expiry alerts.

    • Redis-backed queues
    • Event handlers
    • Scheduled cron jobs
    • Dead letter queue
  5. Layer 5

    Data Layer

    Tenant-scoped relational data, cached reads, and private object storage for files.

    • PostgreSQL + Prisma
    • Redis
    • S3-compatible object storage

Engineering decisions

Multi-tenant by design

Tenant middleware resolves and validates the tenant on every request, and a request-scoped context supplies it to every service. Isolation is enforced in one place and covered by a dedicated test suite.

46 domain modules

Authentication, workforce, attendance, fleet, finance, payroll, leave, procurement, tracking, onboarding, analytics and more — each with its own controllers, services and types rather than a shared monolithic layer.

Real-time where it matters

Live employee tracking streams over Server-Sent Events, which keeps map updates cheap and proxy-friendly. WebSockets are reserved for the bidirectional case, support chat.

Event-driven background work

An internal event bus over Redis-backed queues with dead-letter handling. Modules publish events and return, so a slow downstream consumer never stalls an API response.

Designation-aware access control

Roles, designations and 80 granular permission codes resolve into one effective permission set, so the interface and the API enforce identical rules without per-customer code.

Scalable deployment

Stateless API instances scale horizontally behind a load balancer over shared PostgreSQL and Redis. Health endpoints, request logging and platform diagnostics come as standard.

Technology stack

  • NestJS

    Backend

  • TypeScript

    Language

  • PostgreSQL

    Database

  • Prisma

    ORM

  • Redis

    Cache & queues

  • BullMQ

    Job queues

  • Server-Sent Events

    Live updates

  • Docker

    Infrastructure

  • Firebase FCM

    Push notifications

  • Transactional email

    Notifications

  • Next.js

    Web

Read further: enforcing tenant isolation, designation-aware access control and the security controls that sit on top.