How reksit/health_pilot works
This is a preventive-health web platform: users create a health profile, record daily habits and symptoms, then receive risk analysis, diet guidance, and progress views. The React client calls an Express API backed by MongoDB; prediction requests can call a Python ML service, with rule-based fallback documented in the prediction controller. The graph retains README capabilities whose implementation was not sampled, including analytics, scores, and streaks; links for unsampled integrations are omitted or marked unverified.
Main entry points: App.jsx App routing · server.js Express server · models Health data models · api.js API client
Components 21
Web client
- App routing
frontend/src/App.jsx - Dashboard
frontend/src/pages/MainDashboard.jsx - Health profile
frontend/src/pages/Profile.jsx - Daily log
frontend/src/pages/DailyLog.jsx - Risk predictions
frontend/src/pages/Predictions.jsx - Symptom checker
frontend/src/pages/SymptomChecker.jsx - Diet plan
frontend/src/pages/DietPlan.jsx - Analytics
frontend/src/pages/Analytics.jsx - API client
frontend/src/services/api.js
Backend API
- Express server
backend/server.js - Authentication
backend/controllers/authController.js - JWT middleware
backend/middleware/auth.js
Health workflows
- Profile management
backend/controllers/profileController.js - Daily tracking
backend/controllers/dailyLogController.js - Health analytics
backend/controllers/analyticsController.js
Recommendations
- Risk analysis
backend/controllers/predictionController.js - Diet generation
backend/controllers/dietController.js - ML service
ml-service/app.py
Persistence
- MongoDB
backend/config/db.js - Health data models
backend/models
Other components
- Health user
Connections 32
- Health user → App routing: uses
frontend/src/App.jsx - App routing → Dashboard: routes
frontend/src/App.jsx - App routing → Health profile: routes
frontend/src/App.jsx - App routing → Daily log: routes
frontend/src/App.jsx - App routing → Risk predictions: routes
frontend/src/App.jsx - App routing → Symptom checker: routes
frontend/src/App.jsx - App routing → Diet plan: routes
frontend/src/App.jsx - App routing → Analytics: routes
frontend/src/App.jsx - Dashboard → API client: requests
frontend/src/pages/MainDashboard.jsx - App routing → Express server: calls API
- Express server → MongoDB: connects
backend/server.js - Express server → Authentication: routes auth
backend/server.js - Express server → Profile management: routes profile
backend/server.js - Express server → Daily tracking: routes logs
backend/server.js - Express server → Risk analysis: routes predictions
backend/server.js - Express server → Diet generation: routes diet
backend/server.js - Express server → Health analytics: routes analytics
backend/server.js - Authentication → Health data models: reads users
backend/controllers/authController.js - JWT middleware → Health data models: checks user
backend/middleware/auth.js - Profile management → Health data models: reads/writes profile
backend/controllers/profileController.js - Daily tracking → Health data models: updates logs scores
backend/controllers/dailyLogController.js - Risk analysis → Health data models: reads health data
backend/controllers/predictionController.js - Risk analysis → ML service: requests analysis
backend/controllers/predictionController.js - Diet generation → Health data models: reads health data
backend/controllers/dietController.js - Health analytics → Health data models: queries trends
- Health data models → MongoDB: persists records
- Health profile → API client: requests
frontend/src/pages/Profile.jsx - Daily log → API client: requests
- Risk predictions → API client: requests
- Symptom checker → API client: requests
frontend/src/pages/SymptomChecker.jsx - Diet plan → API client: requests
frontend/src/pages/DietPlan.jsx - Analytics → API client: requests