How amansingh9931/ibm_hackathon works
GramSwasthya is a village and district health-intelligence dashboard. A health-program user selects a location and explores dashboard metrics, village profiles, risk maps, priorities, trends, and risk predictions; the frontend context loads location and dashboard data through API clients, while backend routes dispatch requests to controllers that shape dataset-backed analytics. Separate intervention and ML capabilities are also represented. Evidence is limited to the supplied excerpts and SOURCE INDEX; the Python ML service’s runtime connection is not shown.
Main entry points: App.jsx Dashboard app · LocationContext.jsx Location state · apiRoutes.js API routes · mlController.js ML controller
Components 26
Dashboard experience
- Dashboard app
frontend/src/App.jsx - Location state
frontend/src/context/LocationContext.jsx - Overview dashboard
frontend/src/components/modules/OverviewDashboard.jsx - District dashboard
frontend/src/components/modules/DistrictDashboard.jsx - Village profile
frontend/src/components/modules/VillageHealthProfile.jsx - Interactive risk map
frontend/src/components/modules/InteractiveRiskMap.jsx - Priority planner
frontend/src/components/modules/PriorityPlanner.jsx - Trends and forecast
frontend/src/components/modules/TrendsAndForecast.jsx - Intervention engine
frontend/src/components/modules/AIInterventionEngine.jsx - AI risk view
frontend/src/components/modules/AIRiskPrediction.jsx
API and orchestration
- API clients
frontend/src/api - HTTP client
frontend/src/api/axiosClient.js - HTTP server
backend/server.js - API routes
backend/routes/apiRoutes.js - ML routes
backend/routes/mlRoutes.js - Location lookup
backend/controllers/locationController.js - Health records
backend/controllers/healthRecordController.js - Recommendations
backend/controllers/recommendationController.js - Risk predictions
backend/controllers/aiController.js - ML controller
backend/controllers/mlController.js
Health intelligence
- Health analytics
backend/services/analyticsEngine.js - Village health data
backend/services/gramSwasthyaData.js - Government data loader
backend/services/datasetLoader.js
ML capabilities
- ML service adapter
backend/services/mlService.js - Python prediction service
ml/app.py
Other components
- Program user
Connections 45
- Program user → Dashboard app: uses
frontend/src/App.jsx - Dashboard app → Location state: provides state
frontend/src/App.jsx - Dashboard app → Overview dashboard: renders
frontend/src/App.jsx - Dashboard app → District dashboard: renders
frontend/src/App.jsx - Dashboard app → Village profile: renders
frontend/src/App.jsx - Dashboard app → Interactive risk map: renders
frontend/src/App.jsx - Dashboard app → Priority planner: renders
frontend/src/App.jsx - Dashboard app → Trends and forecast: renders
frontend/src/App.jsx - Dashboard app → Intervention engine: renders
frontend/src/App.jsx - Dashboard app → AI risk view: renders
frontend/src/App.jsx - Location state → API clients: loads location data
frontend/src/context/LocationContext.jsx - Overview dashboard → Location state: reads state
frontend/src/components/modules/OverviewDashboard.jsx - Overview dashboard → API clients: requests risk data
frontend/src/components/modules/OverviewDashboard.jsx - District dashboard → Location state: reads state
frontend/src/components/modules/DistrictDashboard.jsx - Village profile → Location state: reads state
frontend/src/components/modules/VillageHealthProfile.jsx - Interactive risk map → Location state: reads state
frontend/src/components/modules/InteractiveRiskMap.jsx - Priority planner → Location state: reads state
frontend/src/components/modules/PriorityPlanner.jsx - Priority planner → API clients: requests priorities
frontend/src/components/modules/PriorityPlanner.jsx - Trends and forecast → API clients: requests trends
frontend/src/components/modules/TrendsAndForecast.jsx - Intervention engine → Location state: reads state
frontend/src/components/modules/AIInterventionEngine.jsx - AI risk view → Location state: reads state
frontend/src/components/modules/AIRiskPrediction.jsx - API clients → HTTP client: uses HTTP client
frontend/src/api/dashboard.js - HTTP client → HTTP server: sends API requests
- HTTP server → API routes: mounts routes
backend/server.js - API routes → Location lookup: dispatches locations
backend/routes/apiRoutes.js - API routes → Health records: dispatches health queries
backend/routes/apiRoutes.js - API routes → Recommendations: dispatches recommendations
backend/routes/apiRoutes.js - API routes → Risk predictions: dispatches predictions
backend/routes/apiRoutes.js - API routes → ML controller: dispatches map requests
backend/routes/apiRoutes.js - API routes → ML routes: mounts ML routes
backend/routes/apiRoutes.js - ML routes → ML controller: dispatches ML queries
backend/routes/mlRoutes.js - Location lookup → Village health data: reads locations
backend/controllers/locationController.js - Location lookup → Government data loader: looks up districts
backend/controllers/locationController.js - Health records → Village health data: reads health records
backend/controllers/healthRecordController.js - Health records → Health analytics: calculates metrics
backend/controllers/healthRecordController.js - Health records → Government data loader: loads dataset records
backend/controllers/healthRecordController.js - Recommendations → Village health data: reads village data
backend/controllers/recommendationController.js - Recommendations → Health analytics: generates recommendations
backend/controllers/recommendationController.js - Risk predictions → Village health data: reads village data
backend/controllers/aiController.js - Risk predictions → Health analytics: calculates risk
backend/controllers/aiController.js - ML controller → ML service adapter: requests inference
backend/controllers/mlController.js - ML controller → Health analytics: calculates risk metrics
backend/controllers/mlController.js - ML controller → Village health data: reads village data
backend/controllers/mlController.js - ML controller → Government data loader: loads district data
backend/controllers/mlController.js - ML service adapter → Python prediction service: may call service