How sarvadak12/roadwatch works
RoadWatch is a road-damage reporting and monitoring application: users can upload road images for damage analysis, browse road conditions and history, and submit or review community reports. The frontend also provides account, notification, profile, and administrative experiences. The sampled backend implements YOLO-based inference and quality scoring. Routing and authentication links are visible in excerpts; several page-to-service and frontend-to-inference connections are not, so those are shown as unverified where useful.
Main entry points: App.jsx Application router · app.py Damage inference API · Upload.jsx Image upload · api.js API client
Components 20
App and navigation
- Application router
frontend/src/App.jsx - Scroll handling
frontend/src/components/ScrollToTop.jsx - Not-found page
frontend/src/lib/PageNotFound.jsx
Road analysis
- Image upload
frontend/src/pages/Upload.jsx - API client
frontend/src/services/api.js - Damage inference API
backend/app.py - YOLO model
- Detection results
frontend/src/components/roadwatch/DetectionResult.jsx
Road records
- Road map
frontend/src/pages/RoadMap.jsx - Road history
frontend/src/pages/RoadHistory.jsx - Deterioration tracking
frontend/src/pages/DeteriorationTracking.jsx - Community reports
frontend/src/pages/Reports.jsx - Report detail
frontend/src/pages/ReportDetail.jsx - Damage report form
frontend/src/pages/ReportRoadDamage.jsx
Accounts and operations
- Login and registration
frontend/src/components/auth/AuthShell.jsx - Supabase auth
- Notifications
frontend/src/pages/Notifications.jsx - User profile
frontend/src/pages/Profile.jsx - Administration
frontend/src/pages/Admin.jsx
Other components
- RoadWatch user
Connections 19
- RoadWatch user → Application router: uses
- Application router → Scroll handling: renders
frontend/src/App.jsx - Application router → Not-found page: routes to
frontend/src/App.jsx - Application router → Image upload: routes to
frontend/src/App.jsx - Application router → Road map: routes to
frontend/src/App.jsx - Application router → Road history: routes to
frontend/src/App.jsx - Application router → Deterioration tracking: routes to
frontend/src/App.jsx - Application router → Community reports: routes to
frontend/src/App.jsx - Application router → Report detail: routes to
frontend/src/App.jsx - Application router → Damage report form: routes to
frontend/src/App.jsx - Application router → Notifications: routes to
frontend/src/App.jsx - Application router → User profile: routes to
frontend/src/App.jsx - Application router → Administration: routes to
frontend/src/App.jsx - Application router → Login and registration: routes to
frontend/src/App.jsx - Login and registration → Supabase auth: authenticates with
frontend/src/components/auth/AuthShell.jsx - Image upload → API client: submits image
- API client → Damage inference API: requests analysis
- Damage inference API → YOLO model: runs inference
backend/app.py - Damage inference API → Detection results: returns detections