Autonomous EHS Management is Apache-2.0 environmental, health and safety (EHS) software for corporate teams coordinating incidents, corrective and preventive actions (CAPA), approvals, and evidence across sites. The full application runs on Next.js, authentication, role-based permissions, and PostgreSQL you control.
Start with a corporate overview, find the work that needs attention, and follow an incident through a corrective action to human verification. “Autonomous” means deterministic workflow automation and optional AI assistance: people retain approval and closure authority.
Explore the live demo · Download a release · Container package · Run locally · Documentation
| Public GitHub Pages demo | Full application package | |
|---|---|---|
| Purpose | Explore navigation, the corporate overview, and the incident-to-corrective-action journey | Run the EHS workflows in your own environment |
| Data | Synthetic, read-only examples | Your PostgreSQL database and organization records |
| Access | No sign-in; static HTML, CSS, and JavaScript | Better Auth sessions and server-enforced permissions |
| Actions | Interactive navigation and example filters; no operational writes | Permission-gated mutations, human approvals, and workflow controls |
| Start | Open the walkthrough | Local setup or self-hosting guide |
The walkthrough is published from demo/ and has its own verification and deployment workflow. It does not exercise backend authorization or prove deployment readiness. The previous Vercel public demo is deprecated; GitHub Pages is the public walkthrough. See demo scope.
The full application is distributed as source releases and a GHCR container: ghcr.io/safetymp/autonomous-ehs-management/ehs-web:<full-git-sha>. Choose a published SHA or image digest and follow the deployment requirements. GitHub release tags identify source releases; this is not an npm package.
Full application running locally with synthetic data, captured during corporate redesign verification.
- Find the work: use the overview and shared navigation for actions and approvals, incidents and observations, audits and inspections, programs and risks, or reports and evidence.
- Understand the incident: review its details and investigation, then follow the linked corrective actions.
- Assign and track action: keep ownership, due dates, approval steps, and status visible in the incident-to-CAPA journey.
- Verify the outcome: authorized people review evidence and complete the existing workflow transitions.
Navigation is a way into existing workflows; it does not replace server authorization. Start with the EHS console user manual, workflow depth, and CAPA approval rules.
The repository includes additional domains and optional integrations with different levels of maturity. Read the module maturity map before evaluating a use case. This software does not certify compliance or provide official agency filing. Operators remain responsible for their deployment, records, and applicable obligations; see COMPLIANCE.md.
This starts the full application locally with a seeded PostgreSQL database. To explore without installing anything, use the static public walkthrough.
Prerequisites: Node.js 22, npm 10.9.2, and Docker with Compose. The exact toolchain is recorded in package.json and .nvmrc.
git clone https://github.com/SafetyMP/Autonomous-EHS-Management.git
cd Autonomous-EHS-Management
npm ci
cp .env.demo.example .env.localBefore starting, edit .env.local: set a unique BETTER_AUTH_SECRET of at least 32 characters and change DEMO_ADMIN_PASSWORD. Keep the supplied local database URL on 127.0.0.1:5433 and DATABASE_USE_PG=1.
npm run demo:up
npm run devdemo:up starts PostgreSQL, applies migrations, and seeds the example organization. Open http://localhost:3000/sign-in and choose Try demo admin, or use the demo credentials you set. The health endpoint should return HTTP 200 with {"ok":true,"database":"up"}.
Stop the app with Ctrl+C, then stop the database while keeping its data:
docker compose -f docker-compose.demo.yml stopIf another PostgreSQL instance is on port 5432, an error such as role "ehs" does not exist may mean the URL points to that instance. Use the demo port 5433. Do not enable DEMO_MODE in production. For production configuration, migrations, backups, and optional services, use the self-hosting guide.
Total recordable incident rate uses (recordable count × 200,000) / hours worked.
- A complete grid of 12 months, each with hours, supplies the denominator.
- A partial grid warns and uses the saved annual
total_hours_workedwhen available. - With neither a complete grid nor an annual total, the rate is not computed.
See the user manual for incidence-rate reporting and its limits.
Read CONTRIBUTING.md and AGENTS.md. npm run verify runs lint, type checks, and unit tests; ./scripts/verify.sh also installs dependencies and runs audit-matrix and threat-model checks. CI adds browser and security checks. Static demo changes use their separate Playwright configuration.
- Get help: SUPPORT.md
- Report a vulnerability privately: SECURITY.md
- Direction and scope: ROADMAP.md and module maturity
- Maintainers, releases, and forks: GOVERNANCE.md
- License and community: Apache 2.0 and Code of Conduct
Part of the SafetyMP portfolio: reliable automation needs trustworthy records, assigned ownership, and verified corrective action.
| Reader | Start here |
|---|---|
| Corporate EHS user | Console user manual |
| Evaluator | Public demo scope, module maturity |
| Operator | Self-hosting quick start, runbooks |
| Contributor or coding agent | AGENTS.md, CONTEXT.md, codebase layout |
| Reviewer | Architecture map, workflow depth, compliance boundaries |
Use docs/README.md for the complete documentation index. Current source and release notes take precedence over historical design and verification reports.
