How lohit30/healthtech works
RuralCare is a clinic-management and remote-vitals application for patients, doctors, pharmacy staff, and administrators. Users enter through role-aware browser routes; patient and doctor workflows include appointments, clinical records, and monitoring, while administrators manage clinic users and review system status. The frontend calls an Express API backed by SQLite. The source index documents backend route registration and module references, but several page excerpts are incomplete; edges are limited to visible routing, calls, or documented imports, so some likely UI/API integrations are not drawn.
Main entry points: index.ts Express API server · App.tsx Role-based routing · db.ts SQLite clinic data · auth.ts JWT role checks
Components 29
Web application
- Role-based routing
frontend/src/App.tsx - Browser auth state
frontend/src/auth.ts - Login and registration
frontend/src/pages/LoginPage.tsx
Clinical workflows
- Patient records UI
frontend/src/pages/PatientList.tsx - Patient intake
frontend/src/pages/AddPatient.tsx - Appointment scheduler
frontend/src/pages/AppointmentScheduler.tsx - Consultation notes UI
frontend/src/pages/ConsultationNotes.tsx - Patient portal
frontend/src/pages/patient/PatientDashboard.tsx - Doctor workspace
frontend/src/pages/doctor/DoctorDashboard.tsx - Vitals polling
frontend/src/hooks/useVitals.ts - Risk and alerts
frontend/src/utils/vitalsUtils.ts - Vitals display
frontend/src/components/VitalsCard.tsx
Clinic administration
- Administration dashboard
frontend/src/pages/admin/AdminDashboard.tsx - Pharmacy dashboard
frontend/src/pages/pharmacy/PharmacyDashboard.tsx
API services
- Express API server
backend/src/index.ts - Authentication routes
backend/src/routes/auth.ts - Patient routes
backend/src/routes/patients.ts - Appointment routes
backend/src/routes/appointments.ts - Consultation routes
backend/src/routes/consultations.ts - Vitals routes
backend/src/routes/vitals.ts - Admin routes
backend/src/routes/admin.ts - Availability routes
backend/src/routes/availability.ts - Doctor routes
backend/src/routes/doctors.ts - Medicine routes
backend/src/routes/medicines.ts - Prescription routes
backend/src/routes/prescriptions.ts - Report routes
backend/src/routes/reports.ts
Identity and storage
- JWT role checks
backend/src/middleware/auth.ts - SQLite clinic data
backend/src/db.ts
Other components
- Clinic user
Connections 48
- Clinic user → Role-based routing: uses
- Role-based routing → Browser auth state: checks session
frontend/src/App.tsx - Role-based routing → Login and registration: routes to
frontend/src/App.tsx - Role-based routing → Patient records UI: routes to
frontend/src/App.tsx - Role-based routing → Patient intake: routes to
frontend/src/App.tsx - Role-based routing → Appointment scheduler: routes to
frontend/src/App.tsx - Role-based routing → Consultation notes UI: routes to
frontend/src/App.tsx - Role-based routing → Patient portal: routes to
frontend/src/App.tsx - Role-based routing → Doctor workspace: routes to
frontend/src/App.tsx - Role-based routing → Administration dashboard: routes to
frontend/src/App.tsx - Role-based routing → Pharmacy dashboard: routes to
frontend/src/App.tsx - Express API server → Patient routes: mounts routes
backend/src/index.ts - Express API server → Appointment routes: mounts routes
backend/src/index.ts - Express API server → Consultation routes: mounts routes
backend/src/index.ts - Express API server → Doctor routes: mounts routes
backend/src/index.ts - Express API server → Authentication routes: mounts routes
backend/src/index.ts - Express API server → Admin routes: mounts routes
backend/src/index.ts - Express API server → Availability routes: mounts routes
backend/src/index.ts - Express API server → Vitals routes: mounts routes
backend/src/index.ts - Express API server → Medicine routes: mounts routes
backend/src/index.ts - Express API server → Prescription routes: mounts routes
backend/src/index.ts - Express API server → Report routes: mounts routes
backend/src/index.ts - Authentication routes → SQLite clinic data: reads and writes
backend/src/routes/auth.ts - Authentication routes → JWT role checks: uses JWT secret
backend/src/routes/auth.ts - Patient routes → SQLite clinic data: reads and writes
backend/src/routes/patients.ts - Appointment routes → SQLite clinic data: reads and writes
backend/src/routes/appointments.ts - Appointment routes → JWT role checks: uses auth
backend/src/routes/appointments.ts - Consultation routes → SQLite clinic data: reads and writes
backend/src/routes/consultations.ts - Vitals routes → SQLite clinic data: reads and writes
backend/src/routes/vitals.ts - Vitals routes → JWT role checks: uses auth
backend/src/routes/vitals.ts - Admin routes → SQLite clinic data: reads and writes
backend/src/routes/admin.ts - Admin routes → JWT role checks: uses auth
backend/src/routes/admin.ts - Availability routes → SQLite clinic data: reads and writes
backend/src/routes/availability.ts - Availability routes → JWT role checks: uses auth
backend/src/routes/availability.ts - Doctor routes → SQLite clinic data: reads and writes
backend/src/routes/doctors.ts - Medicine routes → SQLite clinic data: reads and writes
backend/src/routes/medicines.ts - Medicine routes → JWT role checks: uses auth
backend/src/routes/medicines.ts - Prescription routes → SQLite clinic data: reads and writes
backend/src/routes/prescriptions.ts - Prescription routes → JWT role checks: uses auth
backend/src/routes/prescriptions.ts - Report routes → SQLite clinic data: reads and writes
backend/src/routes/reports.ts - Report routes → JWT role checks: uses auth
backend/src/routes/reports.ts - Patient portal → Vitals polling: polls own vitals
frontend/src/pages/patient/PatientDashboard.tsx - Doctor workspace → Vitals polling: loads monitoring
frontend/src/pages/doctor/DoctorDashboard.tsx - Administration dashboard → Vitals polling: loads monitoring
frontend/src/pages/admin/AdminDashboard.tsx - Vitals polling → Vitals routes: fetches vitals
frontend/src/hooks/useVitals.ts - Vitals polling → Risk and alerts: derives alerts
frontend/src/hooks/useVitals.ts - Doctor workspace → Consultation routes: submits notes
frontend/src/pages/doctor/DoctorDashboard.tsx - Doctor workspace → Availability routes: manages slots
frontend/src/pages/doctor/DoctorDashboard.tsx