How shivam-dev30/road-saathi works
Road Saathi lets citizens report road hazards, receive AI-assisted damage assessments, and submit geotagged complaints; departmental staff then triage reports and track progress. The frontend also presents complaint statistics and a geographic heatmap. The backend routes authentication, complaint, statistics, and analysis requests to Django views, which use serializers and complaint records or invoke the vision pipeline. That pipeline combines local computer vision with Groq and Gemini analysis. Several frontend and view details are unsampled, so the graph uses documented capabilities and only evidenced or explicitly documented connections.
Main entry points: app.js Reporting interface · views.py Request handlers · ai_service.py Analysis orchestrator · models.py Complaint records
Components 18
Citizen reporting
- Reporting interface
frontend/app.js - Photo geotagging
frontend/app.js - Ticket autofill
frontend/app.js
API and complaints
- API routes
backend/api/urls.py - Request handlers
backend/api/views.py - API serializers
backend/api/serializers.py - Complaint records
backend/api/models.py - Application database
Damage analysis
- Analysis orchestrator
backend/api/services/ai_service.py - Local vision scanner
backend/api/services/road_damage.py - Groq vision service
backend/api/services/groq_service.py - Gemini vision service
backend/api/services/gemini_service.py
Department operations
- Status timeline
backend/api/models.py - Department dashboards
frontend/app.js - Hazard heatmap
frontend/app.js
Other components
- Citizen
- Groq API
- Gemini API
Connections 20
- Citizen → Reporting interface: submits report
README.md - Reporting interface → Photo geotagging: validates photo
README.md - Reporting interface → Ticket autofill: accepts analysis
README.md - Reporting interface → API routes: calls analysis API
frontend/app.js - Reporting interface → API routes: submits complaint
README.md - API routes → Request handlers: routes requests
backend/api/urls.py - Request handlers → Analysis orchestrator: invokes analysis
backend/api/views.py - Analysis orchestrator → Local vision scanner: scans image
backend/api/services/ai_service.py - Analysis orchestrator → Groq vision service: requests assessment
backend/api/services/ai_service.py - Analysis orchestrator → Gemini vision service: falls back
backend/api/services/ai_service.py - Groq vision service → Groq API: calls model API
backend/api/services/groq_service.py - Gemini vision service → Gemini API: calls model API
backend/api/services/gemini_service.py - Request handlers → API serializers: serializes responses
backend/api/views.py - API serializers → Complaint records: serializes records
backend/api/serializers.py - Request handlers → Complaint records: creates and queries
backend/api/views.py - Complaint records → Application database: persists records
- Reporting interface → Department dashboards: renders dashboards
README.md - Reporting interface → Hazard heatmap: renders locations
README.md - Department dashboards → API routes: requests complaint data
- Complaint records → Status timeline: tracks status stages
backend/api/models.py