How shreyas-sv1/ai-based-pathhole-detection works
Smart Road Monitor accepts image and video reports, runs pothole inference, enriches detections with severity and location, persists incidents, and presents them for spatial review and maintenance tracking. The dashboard also provides analytics and report-management views. The sampled code shows the main upload, inference, persistence, and dashboard call paths; Overview implementation was not sampled, so its internal behavior is based on the README. Video processing and storage are implemented within the same files as their respective services.
Main entry points: App.jsx Dashboard shell · server.js REST service · api.js REST client · main.py Video analysis
Components 16
Monitoring Dashboard
- Dashboard shell
pothole-dashboard/src/App.jsx - Analytics overview
pothole-dashboard/src/components/Overview.jsx - Incident map
pothole-dashboard/src/components/MapView.jsx - Detection studio
pothole-dashboard/src/components/DetectionStudio.jsx - Maintenance table
pothole-dashboard/src/components/MaintenanceTable.jsx - REST client
pothole-dashboard/src/api.js
Report Management
- REST service
pothole-server/server.js - Uploaded media
pothole-server/server.js
Detection Engine
- Image inference
pothole-api/main.py - Video analysis
pothole-api/main.py - Severity and GPS
pothole-api/main.py - Annotated video files
pothole-api/main.py - YOLO weights
pothole-api/main.py
Incident Data
- Incident records
pothole-server/server.js
Other components
- Road operator
- OpenStreetMap tiles
Connections 20
- Road operator → Dashboard shell: uses
README.md - Dashboard shell → Analytics overview: renders
pothole-dashboard/src/App.jsx - Dashboard shell → Incident map: renders
pothole-dashboard/src/App.jsx - Dashboard shell → Detection studio: renders
pothole-dashboard/src/App.jsx - Dashboard shell → Maintenance table: renders
pothole-dashboard/src/App.jsx - Dashboard shell → REST client: fetches reports
pothole-dashboard/src/App.jsx - REST client → REST service: REST requests
pothole-dashboard/src/api.js - Detection studio → REST client: submits media
pothole-dashboard/src/components/DetectionStudio.jsx - Maintenance table → REST client: updates or deletes
pothole-dashboard/src/components/MaintenanceTable.jsx - Incident map → REST client: updates status
pothole-dashboard/src/components/MapView.jsx - REST service → Uploaded media: stores uploads
pothole-server/server.js - REST service → Image inference: forwards images
pothole-server/server.js - REST service → Video analysis: forwards videos
pothole-server/server.js - Image inference → YOLO weights: runs inference
pothole-api/main.py - Video analysis → YOLO weights: runs inference
pothole-api/main.py - Image inference → Severity and GPS: computes severity and GPS
pothole-api/main.py - Video analysis → Severity and GPS: computes severity
pothole-api/main.py - Video analysis → Annotated video files: writes annotated video
pothole-api/main.py - REST service → Incident records: creates and queries
pothole-server/server.js - Incident map → OpenStreetMap tiles: loads tiles
pothole-dashboard/src/components/MapView.jsx