How asthanakislay-ui/sih-dr-screening works
This is a diabetic-retinopathy screening application: staff submit a fundus image, receive a five-class model assessment with a Grad-CAM visualization, and can save and review screening records. The graph combines documented product capabilities with sampled implementation; the frontend service source shows direct AI-service calls, while the backend also exposes a separate ML proxy. Some page-to-service wiring and unsampled features are represented only at the documented subsystem level.
Main entry points: screeningService.js Screening API client · App.jsx React application · app.py FastAPI inference endpoint · screening.controller.js Screening controller
Components 24
Screening interface
- React application
frontend/src/App.jsx - New screening
frontend/src/pages/NewScreeningPage.jsx - Analysis result
frontend/src/pages/AnalysisResultPage.jsx - History and dashboard
frontend/src/pages/HistoryPage.jsx - Resource planning
frontend/src/pages/ResourcePlanningPage.jsx - Screening API client
frontend/src/services/screeningService.js
Backend API
- Express API
backend/src/app.js - Prediction route
backend/src/routes/predict.routes.js - ML proxy
backend/src/controllers/predict.controller.js
AI inference
- FastAPI inference endpoint
ai/app.py - Fundus validation
ai/image_validator.py - DR classifier
ai/model.py - Grad-CAM visualization
ai/gradcam.py
Screening records
- Screening routes
backend/src/routes/screening.routes.js - Screening controller
backend/src/controllers/screening.controller.js - Notification controller
backend/src/controllers/notification.controller.js - Screening model
backend/src/models/Screening.js - Notification model
backend/src/models/Notification.js
Identity and access
- Authentication routes
backend/src/routes/auth.routes.js - Authentication controller
backend/src/controllers/auth.controller.js - User model
backend/src/models/User.js
Other components
- Screening staff
- MongoDB
- AI service
Connections 32
- Screening staff → React application: uses
- React application → New screening: routes to
- React application → Analysis result: routes to
- React application → History and dashboard: routes to
- React application → Resource planning: routes to
- New screening → Screening API client: requests prediction
- Screening API client → AI service: posts image
- AI service → FastAPI inference endpoint: dispatches to
- FastAPI inference endpoint → Fundus validation: validates image
- FastAPI inference endpoint → DR classifier: preprocesses and predicts
- FastAPI inference endpoint → Grad-CAM visualization: generates heatmap
- FastAPI inference endpoint → Screening API client: returns result
- New screening → Screening API client: saves screening
- Screening API client → Express API: sends records
- Express API → Screening routes: mounts routes
- Screening routes → Screening controller: dispatches requests
- Screening controller → Screening model: creates and queries
- Screening controller → User model: finds recipients
- Screening controller → Notification model: inserts notifications
- Screening controller → MongoDB: persists records
- Analysis result → Screening API client: loads result
- History and dashboard → Screening API client: loads screenings
- Screening API client → Express API: requests records
- Express API → Prediction route: mounts routes
- Prediction route → ML proxy: dispatches prediction
- ML proxy → AI service: proxies image
- Express API → Authentication routes: mounts routes
- Authentication routes → Authentication controller: dispatches requests
- Authentication controller → User model: creates and reads
- User model → MongoDB: persists users
- Notification controller → Notification model: reads and updates
- Notification model → MongoDB: persists notifications