How dipesh10110n1/rural-health-connect works
Rural Health Connect is a role-based rural healthcare web platform. A visitor enters through the routed React app, selects a role to authenticate, and reaches a role-specific dashboard or healthcare feature. The home page dispatches users into emergency response, AI consultation, doctor-network, community-worker, IVR, USSD, and external-database setup experiences; training includes lessons and quizzes. Supabase provides authentication and the documented backend foundation. The graph includes the substantial indexed modules and documented serverless capabilities; unsampled function internals and their invocation paths are not inferred.
Main entry points: Index.tsx Home Experience · App.tsx Routed Web App · auth Role Authentication · AIConsultation.tsx AI Consultation
Components 34
Application and Access
- Routed Web App
src/App.tsx - Home Experience
src/pages/Index.tsx - Role Selection
src/pages/AuthSelection.tsx - Role Authentication
src/pages/auth - Auth Context
src/contexts/AuthContext.tsx - Role Dashboards
src/pages/dashboards
Care Services
- Emergency Response
src/components/EmergencyResponse.tsx - AI Consultation
src/components/AIConsultation.tsx - Consultation Form
src/components/ConsultationForm.tsx - Doctor Network
src/components/DoctorNetwork.tsx - Patient Approvals
src/components/PatientApprovalRequests.tsx
Community and Learning
- Worker Tools
src/components/HealthWorkerDashboard.tsx - Video Lessons
src/components/VideoLessonPlayer.tsx - Training Quiz
src/components/QuizPlayer.tsx - IVR Simulator
src/components/IVRSimulator.tsx - USSD Menu
src/components/USSDMenu.tsx - Voice Provider
src/components/VoiceProvider.tsx
Backend Platform
- External DB Setup
src/components/ExternalDBSetup.tsx - Supabase Client
src/integrations/supabase/client.ts - Supabase PostgreSQL
- Medical Consultation Function
supabase/functions/medical-consultation/index.ts - Initial Sync Function
supabase/functions/initial-sync/index.ts - Database Sync Function
supabase/functions/database-sync/index.ts - External DB Setup Function
supabase/functions/setup-external-db/index.ts - Language Configuration
src/i18n/config.ts - Toast State
src/hooks/use-toast.ts - Button Primitive
src/components/ui/button.tsx - Badge Primitive
src/components/ui/badge.tsx - Card Primitive
src/components/ui/card.tsx - Dialog Primitive
src/components/ui/dialog.tsx - Input Primitive
src/components/ui/input.tsx - Label Primitive
src/components/ui/label.tsx - Sheet Primitive
src/components/ui/sheet.tsx
Other components
- Patient or Provider
Connections 41
- Patient or Provider → Routed Web App: opens
src/App.tsx - Routed Web App → Home Experience: routes to
src/App.tsx - Routed Web App → Role Selection: routes to
src/App.tsx - Routed Web App → Role Authentication: routes to
src/App.tsx - Routed Web App → Role Dashboards: routes to
src/App.tsx - Routed Web App → Auth Context: provides auth
src/App.tsx - Role Authentication → Auth Context: authenticates through
src/pages/auth/AshaWorkerAuth.tsx - Auth Context → Supabase Client: uses
src/contexts/AuthContext.tsx - Home Experience → Emergency Response: renders
src/pages/Index.tsx - Home Experience → AI Consultation: renders
src/pages/Index.tsx - Home Experience → Worker Tools: renders
src/pages/Index.tsx - Home Experience → Doctor Network: renders
src/pages/Index.tsx - Home Experience → IVR Simulator: renders
src/pages/Index.tsx - Home Experience → USSD Menu: renders
src/pages/Index.tsx - Home Experience → External DB Setup: renders
src/pages/Index.tsx - AI Consultation → Voice Provider: uses
src/components/AIConsultation.tsx - AI Consultation → Supabase Client: uses
src/components/AIConsultation.tsx - AI Consultation → Language Configuration: uses
src/components/AIConsultation.tsx - Worker Tools → Video Lessons: renders
src/components/HealthWorkerDashboard.tsx - Worker Tools → Training Quiz: renders
src/components/HealthWorkerDashboard.tsx - IVR Simulator → Voice Provider: uses
src/components/IVRSimulator.tsx - Home Experience → Consultation Form: offers consultation
- Role Dashboards → Patient Approvals: includes approval requests
- Supabase Client → Supabase PostgreSQL: connects to
README.md - Medical Consultation Function → Supabase PostgreSQL: backend service
README.md - Initial Sync Function → Supabase PostgreSQL: backend service
README.md - Database Sync Function → Supabase PostgreSQL: backend service
README.md - External DB Setup Function → Supabase PostgreSQL: backend service
README.md - External DB Setup → External DB Setup Function: configures through
- AI Consultation → Medical Consultation Function: may invoke
- Worker Tools → Toast State: uses
src/components/HealthWorkerDashboard.tsx - AI Consultation → Toast State: uses
src/components/AIConsultation.tsx - IVR Simulator → Toast State: uses
src/components/IVRSimulator.tsx - Training Quiz → Dialog Primitive: renders with
src/components/QuizPlayer.tsx - Role Authentication → Button Primitive: renders with
src/pages/auth/AshaWorkerAuth.tsx - Role Authentication → Card Primitive: renders with
src/pages/auth/AshaWorkerAuth.tsx - Role Authentication → Input Primitive: renders with
src/pages/auth/AshaWorkerAuth.tsx - Role Authentication → Label Primitive: renders with
src/pages/auth/AshaWorkerAuth.tsx - Home Experience → Card Primitive: renders with
src/pages/Index.tsx - Worker Tools → Badge Primitive: renders with
src/components/HealthWorkerDashboard.tsx - Home Experience → Sheet Primitive: renders with
src/pages/Index.tsx