A clear view of the safety app implementation.

The app reuses the existing Next.js and Convex stack, but the product domain has been moved from procurement into Safety & Quality workflows.

Stack

The implementation is real, not a static mock.

The current codebase uses Next.js, React, Convex, Convex Auth, file storage, role gates, reporting utilities, and generated Convex API types.

Next.js app router

Public pages, auth pages, onboarding, and role-specific worker, supervisor, and admin dashboards use the existing app router.

Convex backend

The data model stores users, sites, assignments, templates, submissions, reviews, actions, evidence, and audit logs.

Convex Auth

Password auth creates pilot users as Field Workers. Mad Emu administrators assign sites and any elevated supervisor or admin access.

Storage and exports

Convex file storage supports evidence uploads; local utilities generate safety CSV and PDF report outputs.

Readiness

Do not call it finished until the checks prove it.

The end state needs working code, verified flows, passing checks, and browser evidence across desktop and mobile.

StageOwnerRecordResult
BuiltCurrent repoCore safety workflowsFunctional PWA MVP
Needs checksEngineeringTypecheck, lint, buildCleaner release signal
Needs reviewSecurityRole and site visibilityProduction trust
Needs QAProductWorker, supervisor, admin flowsGrant-aligned release

The final pass should audit these boundaries.

Convex function permission review
Worker submission visibility boundaries
Supervisor assigned-site checks
Admin-only reporting and role management
File URL access assumptions
Deployment environment variables

Trust

Safety and compliance records need clear access control.

Worker submissions, site assignments, supervisor review rights, admin exports, and evidence files all need explicit permission checks.

Completion scope

A defensible completion pass is easy to explain.

The product is complete only when the safety schema, dashboards, worker forms, review workflow, corrective actions, reporting, PWA metadata, and checks all line up.

Verification passes

Run TypeScript, lint, production build, dev server, and browser checks before calling the refactor complete.

Permission hardening

Review every query and mutation against worker, supervisor, admin, site assignment, and audit log expectations.

Workflow QA

Exercise worker form submission, supervisor review/action creation, admin reporting, and export paths end to end.

Deployment readiness

Confirm Convex env, Next build settings, PWA metadata, domain metadata, and production config.

Start the pilot

Use this page to explain the refactor.

It makes clear that the existing stack was reused while the product was realigned to the grant-approved Safety & Quality purpose.