How anishadhikari7/arogya_saathi works
Arogya Saathi is a symptom-based health information app: users create an account or log in, choose symptoms, receive ranked condition predictions with severity and precautions, and can review prediction history. The Node backend owns authentication, protected prediction requests, and persistence; it delegates inference to a Flask service. The frontend also provides password recovery and dashboard flows. Training code and supplied datasets support model creation. Some frontend modules and the database schema were not excerpted, so their internal behavior and unshown connections are represented conservatively.
Main entry points: predict.js Prediction and history API · symptom-checker.js Symptom checker · server.js HTTP server · db.js MySQL connection
Components 20
Web experience
- Sign-in UI
frontend/js/auth.js - Password recovery UI
frontend/js/forgot-password.js - Dashboard
frontend/js/dashboard.js - Symptom checker
frontend/js/symptom-checker.js - Results view
frontend/js/results.js - History view
frontend/js/history.js - API client
frontend/js/api.js
Application backend
- HTTP server
backend/server.js - Account and recovery
backend/routes/auth.js - Prediction and history API
backend/routes/predict.js - JWT verification
backend/middleware/auth.js - MySQL connection
backend/config/db.js
Prediction service
- Flask inference API
ml-service/app.py - Model artifacts
ml-service/model
Persistent data
- User records
backend/config/schema.sql - Prediction records
backend/config/schema.sql
Model preparation
- Model training
ml-service/train_model.py - Training datasets
ml-service/data
Other components
- User
- Email provider
Connections 25
- User → Sign-in UI: uses
frontend/js/auth.js - Sign-in UI → HTTP server: submits login
frontend/js/auth.js - HTTP server → Account and recovery: mounts routes
backend/server.js - Account and recovery → MySQL connection: queries users
backend/routes/auth.js - MySQL connection → User records: reads/writes
- Password recovery UI → HTTP server: requests recovery
- Account and recovery → Email provider: sends OTP
backend/routes/auth.js - User → Symptom checker: selects symptoms
frontend/js/symptom-checker.js - Symptom checker → API client: calls helper
frontend/js/symptom-checker.js - Symptom checker → Prediction and history API: requests predictions
frontend/js/symptom-checker.js - HTTP server → Prediction and history API: mounts routes
backend/server.js - Prediction and history API → JWT verification: checks token
backend/routes/predict.js - Prediction and history API → Flask inference API: forwards symptoms
backend/routes/predict.js - Flask inference API → Model artifacts: loads artifacts
ml-service/app.py - Flask inference API → Prediction and history API: returns predictions
backend/routes/predict.js - Prediction and history API → MySQL connection: stores and reads
backend/routes/predict.js - MySQL connection → Prediction records: reads/writes
- Symptom checker → Results view: shares result
frontend/js/symptom-checker.js - User → Results view: views results
frontend/js/results.js - User → History view: views history
frontend/js/history.js - History view → API client: calls helper
frontend/js/history.js - History view → Prediction and history API: requests history
- User → Dashboard: opens dashboard
- Training datasets → Model training: provides data
- Model training → Model artifacts: writes artifacts
ml-service/train_model.py