How vkg6835/dotslash works
RoadLens combines an edge road-damage detection and sync concept with a municipal command dashboard and citizen transparency portal. The principal workflow is fleet detections entering incident ingestion, becoming prioritized/map-visible records, then being exported for repair and marked complete through a Sheets webhook. README capabilities also include fleet status, crack deadlines, traffic context, and ward health. Several endpoints and integrations are documented or indexed but not excerpted; those links are included only where the README or an excerpt supports them.
Main entry points: dataStore.ts Incident and fleet data · dashboard/page.tsx Command dashboard · app/page.tsx Citizen portal · apiClient.ts Incident queries
Components 27
Edge detection
- YOLO detection
src/scripts/yolo_edge_sim.py - Edge batching
src/scripts/edgeSimulator.ts
Incident services
- Detection ingest
src/app/api/incidents/ingest/route.ts - Incident and fleet data
src/lib/dataStore.ts - Cloud ingest
src/app/api/ingest/route.ts - Incident queries
src/lib/apiClient.ts - Traffic context
src/app/api/traffic/route.ts - Crack deadlines
src/app/api/cracks/active/route.ts - Crack scheduling
src/app/api/cracks/[id]/schedule/route.ts - Priority triage
src/app/api/incidents/triage/route.ts - Fleet status
src/app/api/fleet/status/route.ts - Repair confirmation
src/app/api/webhooks/sheets/route.ts - Public incident map
src/app/api/public/incidents/map/route.ts - Ward health scores
src/app/api/public/wards/health/route.ts
Municipal operations
- Command dashboard
src/app/dashboard/page.tsx - Incident map
src/components/MapInner.tsx - Dashboard filters
src/components/AreaFilter.tsx - Realtime updates
src/components/RealtimeSubscriber.tsx - Staff authentication
src/app/login/actions.ts - Repair exports
src/app/actions/sheets.ts
Public portal
- Citizen portal
src/app/page.tsx - Area search
src/components/PublicSearchBar.tsx
External integrations
- Sheets connector
src/lib/sheetsService.ts - Google Sheets
- Supabase database
- Nominatim geocoder
Other components
- Transit fleet
Connections 32
- Transit fleet → YOLO detection: captures roads
- YOLO detection → Edge batching: batches detections
- Edge batching → Detection ingest: uploads detections
- Detection ingest → Incident and fleet data: merges records
src/app/api/incidents/ingest/route.ts - Cloud ingest → Incident and fleet data: ingests records
- Cloud ingest → Nominatim geocoder: geocodes locations
- Incident and fleet data → Incident queries: serves incident data
src/lib/apiClient.ts - Incident queries → Supabase database: queries tables
src/lib/apiClient.ts - Command dashboard → Incident queries: fetches records
src/app/dashboard/page.tsx - Command dashboard → Incident map: renders incidents
src/app/dashboard/page.tsx - Command dashboard → Dashboard filters: renders filters
src/app/dashboard/page.tsx - Command dashboard → Realtime updates: subscribes updates
src/app/dashboard/page.tsx - Command dashboard → Repair exports: exports repairs
src/app/dashboard/page.tsx - Command dashboard → Priority triage: shows priorities
- Command dashboard → Crack deadlines: shows crack queue
- Command dashboard → Fleet status: shows fleet health
- Priority triage → Incident and fleet data: ranks incidents
src/app/api/incidents/triage/route.ts - Crack deadlines → Incident and fleet data: filters cracks
src/app/api/cracks/active/route.ts - Crack scheduling → Incident and fleet data: updates deadline
src/app/api/cracks/[id]/schedule/route.ts - Fleet status → Incident and fleet data: reads telemetry
src/app/api/fleet/status/route.ts - Traffic context → Incident and fleet data: uses traffic data
- Repair exports → Sheets connector: exports incidents
src/app/actions/sheets.ts - Sheets connector → Google Sheets: appends rows
src/lib/sheetsService.ts - Google Sheets → Repair confirmation: posts completion
src/app/api/webhooks/sheets/route.ts - Repair confirmation → Incident and fleet data: marks repaired
src/app/api/webhooks/sheets/route.ts - Citizen portal → Area search: renders search
src/app/page.tsx - Citizen portal → Incident queries: loads public data
src/app/page.tsx - Citizen portal → Public incident map: displays incidents
- Citizen portal → Ward health scores: shows ward health
- Public incident map → Incident and fleet data: reads incidents
src/app/api/public/incidents/map/route.ts - Ward health scores → Incident and fleet data: derives health
- Staff authentication → Supabase database: authenticates staff
src/app/login/actions.ts