How vanshmalhotra1301/saferoad-ai works
SafeRoad AI is a road-accident risk and severity decision-support platform. A user enters road, weather, traffic, and time conditions in the dashboard; the frontend API client requests a prediction from the FastAPI backend, which serves risk and severity inference, and the dashboard presents the result and safety advisories. Separate dashboard branches provide incident trends, metro mapping, model performance, and responsible-AI context. Backend source is indexed as read but not excerpted, so backend internals and model-loading links are shown only where README documentation supports them.
Main entry points: App.jsx Dashboard shell · api.js API client · main.py FastAPI inference API · RoadRiskAnalyzer.jsx Condition entry
Components 17
Dashboard experience
- Dashboard shell
frontend/src/App.jsx - Navigation
frontend/src/components/Navbar.jsx - Product overview
frontend/src/components/Hero.jsx - Problem context
frontend/src/components/ProblemSection.jsx - Dataset references
frontend/src/components/Footer.jsx
Risk assessment
- Condition entry
frontend/src/components/RoadRiskAnalyzer.jsx - API client
frontend/src/services/api.js - Risk and severity result
frontend/src/components/RiskResult.jsx
Insights and transparency
- Incident trend charts
frontend/src/components/RoadSafetyInsights.jsx - Metro risk map
frontend/src/components/IndiaRiskMap.jsx - Model performance analytics
frontend/src/components/AIModelInsights.jsx - Responsible AI context
frontend/src/components/ResponsibleAI.jsx - Safety impact
frontend/src/components/WhyThisMatters.jsx
Inference service
- FastAPI inference API
backend/main.py - Trained model artifacts
backend/models - Road accident datasets
backend/data
Other components
- Road safety user
Connections 21
- Road safety user → Condition entry: enters conditions
README.md - Navigation → Dashboard shell: opens analyzer
frontend/src/App.jsx - Dashboard shell → Navigation: renders
frontend/src/App.jsx - Dashboard shell → Product overview: renders
frontend/src/App.jsx - Dashboard shell → Problem context: renders
frontend/src/App.jsx - Dashboard shell → Condition entry: renders
frontend/src/App.jsx - Dashboard shell → Incident trend charts: renders
frontend/src/App.jsx - Dashboard shell → Model performance analytics: renders
frontend/src/App.jsx - Dashboard shell → Safety impact: renders
frontend/src/App.jsx - Dashboard shell → Dataset references: renders
frontend/src/App.jsx - Condition entry → API client: requests prediction
frontend/src/services/api.js - API client → FastAPI inference API: posts conditions
frontend/src/services/api.js - FastAPI inference API → API client: returns prediction
README.md - FastAPI inference API → Trained model artifacts: runs inference
- FastAPI inference API → Road accident datasets: queries geospatial risk
- Condition entry → Risk and severity result: displays result
frontend/src/components/RoadRiskAnalyzer.jsx - Incident trend charts → Metro risk map: renders optional map
frontend/src/components/RoadSafetyInsights.jsx - Dashboard shell → API client: loads insights and stats
frontend/src/App.jsx - API client → Incident trend charts: provides insights
- API client → Model performance analytics: provides model stats
- Dashboard shell → Responsible AI context: renders