Inspiration

Across high-risk sectors—logistics, retail warehousing, manufacturing, and food processing—workplace safety often exists only on paper. Frontline staff operate under physical strain, long haul drivers battle dangerous micro-sleep episodes, and health and safety compliance is managed through dusty, reactive paper binders. When an incident or inspection occurs, organizations face devastating operational injuries, severe regulatory penalties, and delayed emergency responses.

We set out to bridge the gap between abstract health and safety regulations and frontline reality. The vision was to create a proactive, intelligent system that acts like an experienced safety specialist on site—evaluating posture in 3D, catching cognitive fatigue before an incident happens, and converting complex statutory law into automated, continuous protection.

What it does

ErgoSafe AI Reborn is an end-to-end, multi-agent workplace safety copilot and compliance engine built around three core pillars:Cognitive Readiness & Fatigue Telemetry: Features a rapid, interactive cognitive handshake test for drivers and heavy machinery operators. It continuously analyzes response latency and accuracy to flag high-risk fatigue states without auto-passing or generating false clearances. Interactive 3D Ergonomic Postural Assessment: Uses interactive 3D modeling (ErgoBot Canvas) to evaluate high-risk physical tasks, identify manual handling strain, and recommend proactive ergonomic controls grounded in Regulation 6 of the Ergonomics Regulations. Deterministic Statutory Audit Shield: Translates statutory frameworks—such as the South African Occupational Health and Safety (OHS) Act 85 of 1993, Physical Agents Regulations 2024, and General Safety Regulations—into automated compliance logic. It accurately computes mandatory Health and Safety Representative ratios (Section 17) and certified first-aider requirements without legal hallucinations. Intelligent Incident Escalation & Emergency Dispatch: Automatically triages workplace hazard logs, detects genuine statutory breaches, and surfaces immediate emergency dispatch dialers configured for national emergency services (112, 10177, 10111) and tenant emergency contacts.

How we built it

Frontend & Visualization: Built with React, TypeScript, and Tailwind CSS, bundled with Vite for high-speed responsiveness. Interactive 3D robotic postural modeling is powered by Three.js / React Three Fiber.State Management & Telemetry Stores: Orchestrated using decoupled Zustand stores (fatigueStore, complianceStore, tenantStore) designed to isolate state transitions and avoid recursive event triggers. Deterministic Compliance API: Serverless backend running on Vercel with hardened API endpoints, origin validation, Bearer token authentication, and strict Zod payload validation. Statutory Legal Registry: Developed a centralized citation registry mapping real gazetted notices (including GG 52226 / GN 5952 of 2025 and GG 54177 of 2026) directly to computational audit checks.Testing & Verification: Comprehensive automated test suite comprising 71 end-to-end and unit tests across Playwright and Vitest, ensuring audit-grade reliability.

Challenges we ran into

Eliminating Legal AI Hallucinations: Large language models often hallucinate legal clauses or cite outdated laws (like the repealed 1987 Environmental Regulations instead of the 2024 Physical Agents Regulations). We had to build deterministic rule engines and strict keyword negation logic so that positive operational text doesn't trigger false non-compliance alerts. Safety-Critical Telemetry Integrity: Early iterations had race conditions where fatigue handshakes could be bypassed or auto-passed on component mount. Hardening the cognitive test to strictly enforce failure states under high latency required refactoring the telemetry array math and state updater functions. Repository & Codebase Isolation: Managing multiple distinct projects (ErgoSafe and ComplianceGuard) within overlapping workspaces created cross-contamination risks. We solved this through strict branch hygiene, automated lock scripts, and isolated repository workspaces.

Accomplishments that we're proud of

71/71 Tests Passing: Built a hardened, production-ready codebase with zero failing tests, verified end-to-end across full browser simulations.Genuine Legal Grounding: Engineered an engine that accurately implements South African statutory headcount math (Section 17 shop/office 1:100 ratios vs. general industry 1:50 ratios) and GSR 3 first-aid thresholds.POPIA-Aligned Privacy Guardrails: Implemented an explicit privacy handshake modal ensuring special health and biometric telemetry is never exposed or sent unvetted to third-party endpoints. Live Deployment: Successfully shipped and deployed a fast, production build live on Vercel (ergo-safe-reborn.vercel.app).

What we learned

AI Needs Deterministic Guardrails: In safety and law, generative AI is best used as an interface and pattern summarizer, not as the final decision maker. Core compliance logic must always be governed by deterministic, test-driven math and legal registers.

Frontline UX Demands Extreme Simplicity: Workers on a warehouse floor or drivers in a truck cab do not have time for complex forms. The user interface must be accessible in seconds—from single-tap emergency dispatch to 30-second cognitive handshakes.

The Value of Rigorous Audit Logging: Immutable audit records and reproducible version locks (ergosafe-v3-locked) are essential when software interacts with real-world regulatory compliance and liability.

What's next for ErgoSafe AI Reborn

On-Device Edge Computer Vision: Bringing real-time camera-based posture detection directly to mobile devices and warehouse kiosks without sending video streams to cloud servers.

Wearable Sensor Integration: Integrating Bluetooth heart rate variability (HRV) and smartwatch telemetry into the fatigue score engine for continuous driver monitoring.

Multi-Tenant Sector Modules: Expanding beyond ergonomics into dedicated compliance packs for petroleum forecourts, cold-chain butcheries, and construction sites.

Offline PWA Capabilities: Providing full offline support with encrypted local sync, allowing safety reps to conduct audits in remote agricultural or mining locations with zero internet connectivity.

Built With

Share this project:

Updates

Submission history