How sai-chaitanya-ch/aarogya works
Aarogya is a mobile-first health copilot for patients and doctors. Patients set up a profile, scan and verify medical documents, then organize records, understand findings, track medicines and appointments, and share a clinical summary; doctors use a dedicated portal. The frontend coordinates these experiences and shared auth/health state, with optional Supabase persistence and a FastAPI document/chat backend. README capabilities such as ABHA linking, trends, and doctor workflows are represented, but some implementation details were not sampled, so their internal links are omitted.
Main entry points: App.tsx App coordinator · main.py FastAPI service · api.ts Backend API client · ScanReviewStep.tsx Scan review
Components 25
App experience
- App coordinator
src/App.tsx - Doctor portal
src/components/doctor/DoctorPortal.tsx
Patient health tools
- Profile onboarding
src/components/patient/OnboardingSteps.tsx - Scan review
src/components/patient/ScanReviewStep.tsx - Live camera
src/components/patient/LiveCameraScanner.tsx - Record summary
src/components/patient/ReportSummaryStep.tsx - Medical library
src/components/patient/MedicalLibrary.tsx - Health trends
src/components/patient/HealthTrendsView.tsx - Medicine reminders
src/components/patient/MedicinesReminders.tsx - Appointments
src/components/patient/AppointmentsList.tsx - Doctor directory
src/components/patient/FindDoctor.tsx - ABHA linking
src/components/patient/ABDMConnectionModal.tsx - Health chat
src/components/patient/AskAarogyaChat.tsx
AI and backend
- Backend API client
src/services/api.ts - Client AI fallback
src/services/aiService.ts - FastAPI service
backend/main.py - OCR extraction
backend/ocr_service.py - Gemini processing
backend/gemini_service.py - Private document storage
backend/storage_service.py - Clinical summary export
src/services/exportService.ts
Identity and health data
- Authentication
src/context/AuthContext.tsx - Health data state
src/context/HealthDataContext.tsx - Supabase client
src/services/supabase.ts
Other components
- Patient or doctor
- Supabase data and storage
Connections 27
- Patient or doctor → App coordinator: uses
README.md - App coordinator → Authentication: provides auth
src/App.tsx - App coordinator → Health data state: provides health state
src/App.tsx - App coordinator → Profile onboarding: routes to
src/App.tsx - App coordinator → Scan review: routes to
src/App.tsx - App coordinator → Record summary: routes to
src/App.tsx - App coordinator → Medical library: routes to
src/App.tsx - App coordinator → Health trends: routes to
src/App.tsx - App coordinator → Medicine reminders: routes to
src/App.tsx - App coordinator → Appointments: routes to
src/App.tsx - App coordinator → Doctor directory: routes to
src/App.tsx - App coordinator → ABHA linking: opens
src/App.tsx - App coordinator → Health chat: routes to
src/App.tsx - App coordinator → Doctor portal: renders
src/App.tsx - App coordinator → Clinical summary export: calls
src/App.tsx - Scan review → Live camera: opens
src/components/patient/ScanReviewStep.tsx - Scan review → Backend API client: processes document
src/components/patient/ScanReviewStep.tsx - Health chat → Backend API client: requests response
src/components/patient/AskAarogyaChat.tsx - Backend API client → Client AI fallback: falls back to
src/services/api.ts - Backend API client → FastAPI service: requests processing
- FastAPI service → OCR extraction: calls
backend/main.py - FastAPI service → Gemini processing: calls
backend/main.py - FastAPI service → Private document storage: calls
backend/main.py - Authentication → Supabase client: uses
src/context/AuthContext.tsx - Health data state → Supabase client: uses
src/context/HealthDataContext.tsx - Supabase client → Supabase data and storage: connects to
- Private document storage → Supabase data and storage: uploads and signs
backend/storage_service.py