Skip to main content
Case Study · Seth HSE Platform

Engineering an Enterprise Safety Operations & Compliance System.

Seth HSE is an enterprise-grade Health, Safety, and Environment (HSE) platform for high-risk industrial operations — telecom tower maintenance, oil & gas installations, and heavy construction — built on a strict 15-module monolith, database-enforced invariants, geofenced anti-spoof compliance, and an automated safety dispatch engine.

15-Module MonolithGeofenced ComplianceAnti-Spoof VerificationTower Climbing ProtocolNDPR + GDPR ComplianceTransactional Outbox
00 — Executive Summary

The Fortress Architecture: 25 Engineering Pillars.

Before writing a line of production code, the Seth HSE platform was designed against a comprehensive 25-Pillar Fortress Blueprint. In high-risk operations, a system failure isn't just a software bug — it is a physical safety liability. The architecture treats proof of presence, data privacy, and safety verification as hard system invariants rather than client-side promises.

01 — Problem

High-risk industrial work cannot rely on paper forms and unverified check-ins.

In telecom infrastructure maintenance (such as 50-meter tower climbing) and heavy engineering sites across Nigeria and West Africa, safety compliance has historically suffered from systemic vulnerabilities:

Location Fraud & Spoofing

Workers using GPS mock-location apps, modified OS builds, or proxy check-ins from miles away to claim attendance without stepping onto hazardous sites.

Protocol Bypass

Paper safety checklists signed after work is completed, bypassing mandatory pre-job hazard checks, PPE inspection, and site supervisor sign-offs.

Audit & Liability Failure

Disjointed WhatsApp groups and spreadsheets making regulatory compliance audits (NDPR/GDPR and industrial HSE regulations) unprovable during incident investigations.

Uncoordinated Dispatch

No real-time matching between certified HSE Marshals and active field personnel based on geographical proximity, skills, and site jurisdiction.

02 — Architecture

The 15-Module Modular Monolith & Boundary Guardrails.

Seth HSE adopts a strict modular monolith pattern. Rather than deploying fragmented microservices that introduce network latency and distributed transaction complexity during Phase 1–3, the system is organized into 15 domain-bounded modules with strict build-time dependency isolation.

matching

Algorithmic pairing of HSE Marshals to site personnel with DB-enforced single active match constraints.

safety-protocol

Pre-job hazard checklists (e.g. Tower Climbing Protocols) with mandatory step-by-step verification.

attendance

Geofenced check-in/check-out engine with anti-spoof validation and supervisor sign-off.

monitoring

Real-time location pings, geofence radius evaluation, and inactive worker heartbeat monitoring.

audit & dsar

Immutable event audit trails and automated Data Subject Access Rights export/deletion workflows.

iam & personnel

Multi-tenant role-based access control, marshal jurisdiction resolution, and worker profiles.

reporting

Structured field logs, incident reports, and offline-queued field updates.

learning (lms)

Course enrollments, locked module progression, test attempts, and verified certificate generation.

Build-Time Boundary Enforcement (`dependency-cruiser`)

A module may only expose capabilities via its top-level index.ts. Cross-module imports into internal domain/ or infrastructure/ directories fail CI instantly. Cross-context integration happens via narrow infrastructure-edge checkers (JurisdictionChecker, MarshalMatchChecker) or transactional outbox events.

03 — Data Integrity

Database Schema & Hard Invariants.

Software rules can be accidentally bypassed in application code. Seth HSE embeds critical business invariants directly into the PostgreSQL relational engine:

Single Active Assignment
CREATE UNIQUE INDEX uq_one_active_assignment ON assignments (personnel_id) WHERE status = 'active';

A field worker can only be actively assigned to one site at a time, strictly enforced in PostgreSQL schema.

Single Open Shift
CREATE UNIQUE INDEX uq_one_open_shift ON shifts (personnel_id) WHERE clock_out_at IS NULL;

Prevents double clock-ins across sites or overlapping shift records at the database level.

Immutable Photo Capture Metadata
CREATE TRIGGER trg_media_immutable BEFORE UPDATE ON media_uploads ... RAISE EXCEPTION 'Immutable';

Device GPS, timestamp, and device-key hash recorded at photo capture cannot be mutated post-insert.

Transactional Outbox Pattern
INSERT INTO outbox (event_type, payload) VALUES ($1, $2) -- executed in same DB transaction

Ensures domain events (e.g. ShiftStarted, IncidentReported) are never lost due to external broker network failure.

04 — Domain Primitives

Core Engineering Primitives.

Algorithmic Marshal-Personnel Dispatch

Field personnel are paired with certified HSE Marshals in an active pairing model. The system executes real-time jurisdiction checks comparing marshal site lists and regional geographic bounds against active workers. When a worker moves between sites, the MarshalMatchChecker adapter atomically terminates old active matches and initializes new append-only match lifecycles.

Tower Climbing & High-Risk Safety Protocols

Before high-risk tasks begin (such as telecom tower climbing), the platform mandates digital protocol executions. The worker must perform mandatory step-by-step checks: Personal Protective Equipment (PPE) inspection (full-body harness, double lanyard with energy absorber, helmet), site environmental/weather clearance, and dual digital sign-offs from both climber and supervisor before task activation.

Dual Privacy Posture (NDPR + GDPR) & DSAR Engine

Operating across Nigeria and European regions requires strict data privacy compliance. The dsar module implements native Data Subject Access Rights for automated profile export and right-to-be-forgotten deletion workflows. Multi-tenancy isolation is enforced at the database layer via PostgreSQL Row-Level Security (RLS) policies tied to org_id.

05 — Fraud Prevention

4-Tier Check-in Validation & Risk-Scoring Engine.

Rather than trusting raw device claims, Seth HSE treats mobile location data as claims to be scored server-side. suspicious events are flagged for human supervisor review rather than triggering automatic account locks:

Layer 1

Device Mock Location Guard

Rejects location payloads generated by Android developer options or fake GPS apps via native bridge checks.

Layer 2

Geofence Radius & Speed Check

Validates coordinate fixes against site boundaries and calculates physical velocity limits (>150 km/h threshold) to detect teleports.

Layer 3

NTP Server Time Sync

Ignores local device clocks, validating check-in timestamps strictly against server NTP synchronization.

Layer 4

Supervisor Photo & Biometric Proof

Requires site supervisor photo/biometric verification attached to high-risk task authorizations.

06 — Technology Stack

Production Technology Stack & Architectural Rationale.

LayerTechnologyArchitectural Rationale
Mobile AppFlutter 3.x · DartCross-platform Android & iOS field personnel client with offline-first geofence log queuing and native sensor bridges
Web DashboardNext.js 15 · React · Tailwind CSSEnterprise portal for real-time marshal dispatch maps, site audit trails, and compliance reports
Core Backend APINode.js · Express · TypeScript (Strict)Modular monolith implementation adhering to 25 engineering fortress pillars
Datastore & CachePostgreSQL 16 · Prisma ORM · RedisRelational data model with Row-Level Security (RLS) org_id scoping, partial unique indices, and cache layer
Realtime & LocationSocket.IO · Google Maps APILive location telemetry streams, instant SOS escalation alerts, and boundary matching
Privacy & ComplianceNDPR + GDPR · Native DSAR · Audit OutboxZero-trust RBAC, privacy-by-design, immutable audit log pipelines, and strict data residency controls
07 — System Metrics

Verified Codebase Metrics.

15
Bounded contexts
0 ms
Cross-module code imports
1 active
Match constraint per worker
NDPR + GDPR
Dual compliance posture
4-tier
Anti-spoof check-in verification
100%
Row-Level Security (RLS) org isolation