Ecologic Engineering · Compliance platform

PCB Dashboard: a multi-tenant platform for pollution control compliance

A compliance platform designed around a state pollution control board’s operating model — from head office down to individual industries.

Role
Architect and full-stack developer
Employer
Ecologic Engineering
Scope
Designed for 125,000+ regulated industries
Stack
React 18, Express, PostgreSQL, Redis

Overview

Pollution control boards regulate industries through a hierarchy of offices: a state head office, zonal offices, regional offices and, below them, the industries themselves.

PCB Dashboard is designed around that model. It brings inspection, laboratory, legal, emergency, financial and compliance workflows into one platform, with access scoped to each level of the hierarchy and a Flutter app for field inspection officers.

The problem

Each user — a state administrator, a regional officer, a lab user or an industry — should see and act on exactly their part of a very large dataset. The platform is scoped for more than 125,000 regulated industries, so the data model and access control have to hold up at that size.

What I built

  • A normalized PostgreSQL schema of more than 50 tables, with recursive hierarchy trees and multi-level tenant isolation.
  • Hierarchical, JWT-based role-based access control with granular permission scopes.
  • An automated compliance-scoring engine.
  • Zod runtime validation and Prisma ORM for type-safe database access.
  • Redis caching with SCAN-based, non-blocking cache invalidation.
  • Hardware-accelerated 3D terrain rendering for geospatial compliance tracking with Three.js, React Three Fiber and the Google Maps API.

Architecture

A React 18 and TypeScript dashboard (built with Vite) and a Flutter inspection app share an Express and TypeScript API. Prisma and PostgreSQL hold the tenant hierarchy and domain data; Redis caches API responses.

  1. Clients

    Web dashboardReact 18 · Three.js
    Inspection appFlutter
  2. API

    Express APITypeScript · RBAC · Zod
  3. Data

    PostgreSQLPrisma · 50+ tables
    RedisCaching
  1. State
  2. Zone
  3. Region
  4. Industry
Architecture: web and field clients share one Express API; access is scoped down a state → zone → region → industry hierarchy.

Engineering decisions

  • Hierarchy in the schema. Offices and industries are stored as recursive trees, so tenant isolation and permissions follow the organisation’s real structure.
  • Validate at runtime, not just compile time. Zod schemas check request data at runtime, complementing TypeScript’s compile-time types and Prisma’s typed queries.
  • Non-blocking cache invalidation. Clearing cache entries with SCAN instead of KEYS avoids blocking Redis while keeping cached responses consistent.

Evidence and status

The codebase is private to Ecologic Engineering, so there is no public repository or live demo.

I can walk through the schema design, tenant isolation and RBAC model in an interview.

Contact

Want a walkthrough of PCB Dashboard?

Email me and I’ll take you through the architecture and the decisions behind it.

Email Thanush