Next.js app router
Public pages, auth pages, onboarding, and role-specific worker, supervisor, and admin dashboards use the existing app router.
The app reuses the existing Next.js and Convex stack, but the product domain has been moved from procurement into Safety & Quality workflows.
Safety records, site evidence, supervisor review and audit reporting.
Stack
The current codebase uses Next.js, React, Convex, Convex Auth, file storage, role gates, reporting utilities, and generated Convex API types.
Public pages, auth pages, onboarding, and role-specific worker, supervisor, and admin dashboards use the existing app router.
The data model stores users, sites, assignments, templates, submissions, reviews, actions, evidence, and audit logs.
Password auth creates pilot users as Field Workers. Mad Emu administrators assign sites and any elevated supervisor or admin access.
Convex file storage supports evidence uploads; local utilities generate safety CSV and PDF report outputs.
Readiness
The end state needs working code, verified flows, passing checks, and browser evidence across desktop and mobile.
Trust
Worker submissions, site assignments, supervisor review rights, admin exports, and evidence files all need explicit permission checks.
Completion scope
The product is complete only when the safety schema, dashboards, worker forms, review workflow, corrective actions, reporting, PWA metadata, and checks all line up.
Run TypeScript, lint, production build, dev server, and browser checks before calling the refactor complete.
Review every query and mutation against worker, supervisor, admin, site assignment, and audit log expectations.
Exercise worker form submission, supervisor review/action creation, admin reporting, and export paths end to end.
Confirm Convex env, Next build settings, PWA metadata, domain metadata, and production config.
Start the pilot
It makes clear that the existing stack was reused while the product was realigned to the grant-approved Safety & Quality purpose.