Safety Event / CSA Score Monitor
Log roadside inspections, violations, and crashes, map them to CSA BASIC categories with severity weights and time-decay, trend your score, and route contested violations through a DataQ challenge approval gate - so your safety standing is never a surprise.
A private, login-protected CSA dashboard that ingests safety events from CSV, maps each violation to its BASIC category with the right severity weight and time-decay, trends your scores, and won't record or submit a DataQ challenge until your safety manager approves it.
Before you start
- A free Supabase account
- A free Vercel account
- A free Resend account (for alert emails)
- A CSV export of your roadside inspections, violations, and crashes (your no-API starting point)
The problem this kills
Your CSA score moves whether you watch it or not. A clean inspection helps; a hours-of-service violation hurts; a stale violation quietly ages off after two years. By the time a bad BASIC percentile shows up in your carrier profile - or a broker or insurer flags it - the damage is already done and the events are months old.
Most safety managers track this in a tangle of spreadsheets, PDF inspection reports, and memory. You can see that the number went up, but not which events drove it, which are about to decay off, or which are worth challenging through DataQ. And there's no clean trail of who decided to challenge what.
This tool turns that scramble into a calm, monitored dashboard - and it's built for you, around your fleet, by an AI coding agent you direct.
What you'll build
A private web app, just for your safety team, that:
- Logs every safety event - roadside inspections, individual violations, and crashes - imported from a CSV you already have.
- Maps each violation to its BASIC category (Unsafe Driving, HOS Compliance, Driver Fitness, Controlled Substances, Vehicle Maintenance, Hazmat, Crash Indicator) with a severity weight.
- Applies time-decay so recent events count more and old ones fade - the way CSA actually works.
- Trends a score per BASIC category over time, with a dashboard that shows what's rising, what's falling, and what's about to age off.
- Tracks DataQ challenges end to end - and won't record or "submit" a contested violation until your safety manager reviews and approves it.
What's inside the Implementation Plan
- A copy-paste runbook you feed to Claude Code, step by step - no coding experience needed.
- It opens by interviewing you about your business - your fleet, your DOT number, how you get inspection data today, your violation code conventions, your typical and peak event volumes, and your challenge rules - so the tool is tailored to your operation instead of being a generic template. The agent reads back a short spec and waits for your thumbs-up before building anything.
- A safe data model for inspections, violations, crashes, BASIC mappings, and DataQ challenges, with a dedupe guard on inspection/report number.
- The scoring logic: BASIC severity weights and time-decay, modeled so you can tune it to match the methodology.
- The full CSV import path and a clean CSV export - so it works today with no integration to any system of record.
- Email alerts and a weekly digest via Resend.
The governance it includes (this is the point)
- Login so only your team can open it.
- Row-level security so you only ever see your own carrier's data.
- A complete audit trail - who logged, changed, challenged, or approved each event, and when.
- A human-in-the-loop approval gate: the AI drafts a DataQ challenge and the score impact, but nothing is recorded or marked submitted until your safety manager approves it.
- Duplicate guards keyed on inspection/report number, so the same inspection can't inflate your score twice.
Who it's for
Safety managers and DOT compliance leads at motor carriers who need to see their CSA standing coming - not get surprised by it - and want a defensible, auditable record of every challenge decision.
You've got this. Paste the first prompt and let the agent interview you.