22/32proof of conceptIncident Response
Incident ReportingMajor Incident Log and Alerts
Major incidents reported with photos and location, with an email alert on every report.
What it solves
A major incident has to reach the right people at once, with the facts in one place. A report from the site alerts the distribution list by email and lands on a dashboard management can track.
How it runs
Six steps, input to output
Goes inAn incident report from a named reporter, with photos and location
- 01
Sign in
A magic link signs the user in, and their role decides where they land.
- 02
Report
The reporter picks a category and severity, describes the incident and gives the location.
- 03
Photos
Photos are compressed on the device, then uploaded to private storage.
- 04
Save
The incident is stored under row-level security, tied to the reporter and their community.
- 05
Alert
An email goes to the distribution list at once, and every send is logged.
- 06
Track
Management filters incidents on the dashboard and updates each status.
Comes outAn email alert to a distribution list and an incident on the management dashboard
What it does
A tool for reporting major incidents such as fire, serious injury, structural failure or media risk, with photos and location.
Every report alerts a distribution list by email at once, and management tracks, filters and updates each incident on a dashboard.
Two roles only, with row-level security so a reporter sees only their own reports and communities.
Three decisions
What shaped the build
The incident record comes first
An email failure never blocks or rolls back a report. The record is the source of truth and the alert is best effort, logged either way.
Two roles, enforced in the database
Row-level security is on every table from the first migration, so a reporter sees only their own reports and communities.
The form keeps a draft
The report form saves its draft on the device on every change and clears it on a successful submit, because connectivity on site is unreliable.
Built with
7 parts
- Next.js 16 · React 19
- app + server actions
- Supabase Postgres
- incidents + communities
- Row-level security
- role + community scoping
- Supabase Auth
- magic-link sign-in
- Supabase Storage
- incident photos, signed URLs
- Resend
- alert on every incident
- Vercel
- host, deploy on push