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.
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.
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:
Workers using GPS mock-location apps, modified OS builds, or proxy check-ins from miles away to claim attendance without stepping onto hazardous sites.
Paper safety checklists signed after work is completed, bypassing mandatory pre-job hazard checks, PPE inspection, and site supervisor sign-offs.
Disjointed WhatsApp groups and spreadsheets making regulatory compliance audits (NDPR/GDPR and industrial HSE regulations) unprovable during incident investigations.
No real-time matching between certified HSE Marshals and active field personnel based on geographical proximity, skills, and site jurisdiction.
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.
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:
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.
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.
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.
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.
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.
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:
Device Mock Location Guard
Rejects location payloads generated by Android developer options or fake GPS apps via native bridge checks.
Geofence Radius & Speed Check
Validates coordinate fixes against site boundaries and calculates physical velocity limits (>150 km/h threshold) to detect teleports.
NTP Server Time Sync
Ignores local device clocks, validating check-in timestamps strictly against server NTP synchronization.
Supervisor Photo & Biometric Proof
Requires site supervisor photo/biometric verification attached to high-risk task authorizations.
Production Technology Stack & Architectural Rationale.
| Layer | Technology | Architectural Rationale |
|---|---|---|
| Mobile App | Flutter 3.x · Dart | Cross-platform Android & iOS field personnel client with offline-first geofence log queuing and native sensor bridges |
| Web Dashboard | Next.js 15 · React · Tailwind CSS | Enterprise portal for real-time marshal dispatch maps, site audit trails, and compliance reports |
| Core Backend API | Node.js · Express · TypeScript (Strict) | Modular monolith implementation adhering to 25 engineering fortress pillars |
| Datastore & Cache | PostgreSQL 16 · Prisma ORM · Redis | Relational data model with Row-Level Security (RLS) org_id scoping, partial unique indices, and cache layer |
| Realtime & Location | Socket.IO · Google Maps API | Live location telemetry streams, instant SOS escalation alerts, and boundary matching |
| Privacy & Compliance | NDPR + GDPR · Native DSAR · Audit Outbox | Zero-trust RBAC, privacy-by-design, immutable audit log pipelines, and strict data residency controls |