How rakesh7-k/ruralhealthcare works
SETHU is a prototype for coordinating care across patients, frontline workers, clinicians, facilities, and district administrators. Its central workflow follows registration and encounters through triage, consultation or teleconsultation, care-route recommendations, referrals, and follow-up. Role-specific client screens use API services to reach an Express server, whose controllers and domain services work with SQLite; shared types and states describe the care domain. The README documents the broader role and care capabilities. Several service and route implementations were not sampled, so unsupported links between them are omitted.
Main entry points: App.tsx Route shell · app.ts Express API · doctorController.ts Doctor workflows · facilityController.ts Facility information
Components 27
Role-based client
- Route shell
client/src/App.tsx - Session state
client/src/stores/authStore.ts - Sign-in
client/src/routes/login/LoginPage.tsx - Worker workflow
client/src/routes/worker/WorkerDashboard.tsx - Patient portal
client/src/routes/patient/PatientPortal.tsx - Doctor consultation
client/src/routes/doctor/ConsultationWorkspace.tsx - Facility operations
client/src/routes/facility/FacilityDashboard.tsx - District oversight
client/src/routes/admin/DistrictDashboard.tsx - Route assurance view
client/src/routes/doctor/CareRouteAssuranceView.tsx - Teleconsultation rooms
client/src/routes/doctor/TeleconsultationRoom.tsx - API transport
client/src/services/apiClient.ts - Patient service
client/src/services/patientService.ts - Authentication service
client/src/services/authService.ts - WebRTC session
client/src/hooks/useWebRTC.ts - Socket client
client/src/services/socketService.ts
Care coordination
- Patient records
server/src/controllers/patientController.ts - Doctor workflows
server/src/controllers/doctorController.ts - Facility information
server/src/controllers/facilityController.ts - Teleconsultation workflow
server/src/controllers/teleconsultationController.ts - Triage engine
server/src/services/triageEngine.ts - Care route assurance
server/src/services/careRouteAssurance.ts - Data trust scoring
server/src/services/dataTrustScorer.ts
API and persistence
- Express API
server/src/app.ts - JWT middleware
server/src/middleware/auth.ts - SQLite database
server/src/config/database.ts
Shared domain
- Care domain states
shared/src/types/enums.ts
Other components
- Care participants
Connections 37
- Care participants → Route shell: uses
README.md - Route shell → Session state: reads session
client/src/App.tsx - Route shell → Sign-in: routes to
client/src/App.tsx - Route shell → Worker workflow: routes to
client/src/App.tsx - Route shell → Patient portal: routes to
client/src/App.tsx - Route shell → Doctor consultation: routes to
client/src/App.tsx - Route shell → Facility operations: routes to
client/src/App.tsx - Route shell → District oversight: routes to
client/src/App.tsx - Route shell → Route assurance view: routes to
client/src/App.tsx - Route shell → Teleconsultation rooms: routes to
client/src/App.tsx - Session state → Authentication service: calls
client/src/stores/authStore.ts - Authentication service → API transport: uses
client/src/services/authService.ts - Worker workflow → Patient service: loads patients
client/src/routes/worker/WorkerDashboard.tsx - Patient portal → Patient service: loads portal data
client/src/routes/patient/PatientPortal.tsx - Doctor consultation → Doctor workflows: supports consultation
- Facility operations → Facility information: supports facility work
client/src/routes/facility/FacilityDashboard.tsx - Route assurance view → Care route assurance: displays assurance
- Teleconsultation rooms → WebRTC session: uses session
- WebRTC session → Socket client: uses signaling
client/src/hooks/useWebRTC.ts - Express API → Patient records: mounts routes
server/src/app.ts - Express API → Doctor workflows: mounts routes
server/src/app.ts - Express API → Facility information: mounts routes
server/src/app.ts - Express API → Teleconsultation workflow: mounts routes
server/src/app.ts - Patient records → SQLite database: reads and writes
server/src/controllers/patientController.ts - Doctor workflows → SQLite database: uses
server/src/controllers/doctorController.ts - Doctor workflows → Triage engine: evaluates triage
server/src/controllers/doctorController.ts - Facility information → SQLite database: uses
server/src/controllers/facilityController.ts - Facility information → Data trust scoring: scores freshness
server/src/controllers/facilityController.ts - Teleconsultation workflow → SQLite database: uses
server/src/controllers/teleconsultationController.ts - Patient records → JWT middleware: requires auth
server/src/routes/patient.routes.ts - Express API → Care domain states: shares domain states
- Care participants → Patient portal: views care journey
README.md - Care participants → Worker workflow: registers and follows up
README.md - Care participants → Doctor consultation: consults
README.md - Care participants → Facility operations: manages resources
README.md - Care participants → District oversight: oversees care
README.md - Express API → Care route assurance: recommends routes