How raga2629/roadpulse_project works
RoadPulse lets citizens report road damage and track its status, while administrators triage reports, coordinate maintenance, and confirm repairs. The main workflow runs from the React client through FastAPI routes to report and road-issue services, with AI detection and repair verification supporting assessment. The README also describes a public map and dashboards. Edges reflect shown route registration, imports, or documented capabilities; frontend-to-backend calls are not fully evidenced in the excerpts, so that boundary is left unconnected.
Main entry points: App.jsx App routing · session.py SQL database · main.py API application · report_service.py Report service
Components 24
React application
- App routing
frontend/src/App.jsx - Submit report
frontend/src/pages/citizen/NewReport.jsx - API client
frontend/src/services/api.js - Issue map
frontend/src/pages/MapPage.jsx - Report review
frontend/src/pages/admin/ReportDetail.jsx - Auth state
frontend/src/hooks/useAuth.jsx
API and workflows
- API application
backend/app/main.py - Report routes
backend/app/routes/reports.py - Detection routes
backend/app/routes/detection.py - Map routes
backend/app/routes/map_routes.py - Road issue service
backend/app/services/road_issue_service.py - Report service
backend/app/services/report_service.py - Repair verification
backend/app/services/repair_verification_service.py - Priority scoring
backend/app/services/priority_service.py - Upload storage
backend/app/services/storage_service.py
AI assessment
- AI service
backend/app/services/ai_service.py - Damage detector
ai/detector.py - Severity estimator
ai/severity.py
Persistence
- SQL database
backend/app/database/session.py - Report records
backend/app/models/report.py - Road issue records
backend/app/models/road_issue.py - User records
backend/app/models/user.py
Other components
- Citizen
- Administrator
Connections 26
- Citizen → App routing: uses
README.md - Administrator → App routing: uses
README.md - App routing → Submit report: routes to
frontend/src/App.jsx - App routing → Issue map: routes to
frontend/src/App.jsx - App routing → Report review: routes to
frontend/src/App.jsx - App routing → Auth state: checks auth
frontend/src/App.jsx - Submit report → API client: submits through
frontend/src/pages/citizen/NewReport.jsx - Issue map → API client: fetches through
frontend/src/pages/MapPage.jsx - Report review → API client: fetches through
frontend/src/pages/admin/ReportDetail.jsx - API application → Report routes: registers
backend/app/main.py - API application → Detection routes: registers
backend/app/main.py - API application → Map routes: registers
backend/app/main.py - AI service → Damage detector: loads
backend/app/services/ai_service.py - Damage detector → Severity estimator: estimates
ai/detector.py - Map routes → Priority scoring: scores markers
backend/app/routes/map_routes.py - Report service → Upload storage: stores uploads
backend/app/services/report_service.py - Report service → AI service: requests analysis
- Road issue service → Priority scoring: calculates priority
backend/app/services/road_issue_service.py - Repair verification → AI service: analyzes evidence
backend/app/services/repair_verification_service.py - Repair verification → Upload storage: uses storage
backend/app/services/repair_verification_service.py - Report service → SQL database: reads and writes
- Road issue service → SQL database: reads and writes
- Repair verification → SQL database: reads and writes
- SQL database → Report records: maps records
backend/app/models/report.py - SQL database → Road issue records: maps records
backend/app/models/road_issue.py - SQL database → User records: maps records
backend/app/models/user.py