How suvam-das-29/healthsync works
HealthSync is a role-based healthcare records and practice-management application. Patients and administrators use separate web dashboards; the backend exposes APIs for authentication, appointments, prescriptions, records, doctors, and billing. In the sampled code, API routes dispatch to controllers, which validate requests and read or write MongoDB models; authentication also sends verification and reset emails. The tree and service page indicate broader reporting, insurance, and record-management features, but their specific runtime wiring was not sampled, so those links are omitted.
Main entry points: index.js API server · App.jsx Web router · UserPanel.jsx Patient dashboard · authController.js Auth controller
Components 33
Web application
- Web router
FRONTEND/src/App.jsx - Auth screens
FRONTEND/src/Authentication/Login.jsx - Patient dashboard
FRONTEND/src/Patient/UserPanel.jsx - Admin dashboard
FRONTEND/src/Admin/AdminPanel.jsx
Identity
- Auth routes
BACKEND/Routes/authRoutes.js - Auth controller
BACKEND/Controller/authController.js - User records
BACKEND/Schema/userModel.js - Email delivery
BACKEND/Database/nodeMailer.js
Care workflows
- Appointment screens
FRONTEND/src/Patient/Appointment/Appointment.jsx - Prescription screens
FRONTEND/src/Patient/Prescription/Prescription.jsx - Appointment controller
BACKEND/Controller/appointmentController.js - Patient appointment controller
BACKEND/Controller/patientAppointmentController.js - Prescription controller
BACKEND/Controller/prescriptionController.js - Patient prescription controller
BACKEND/Controller/patientPrescriptionController.js - Appointment records
BACKEND/Schema/appointmentSchema.js - Patient appointment records
BACKEND/Schema/patientAppointmentSchema.js - Prescription records
BACKEND/Schema/prescriptionSchema.js
Practice operations
- Health records and documents
FRONTEND/src/Admin/Records/HealthRecords.jsx - Billing and insurance
FRONTEND/src/Admin/Billing/CreateInvoice.jsx - Reports and analytics
FRONTEND/src/Admin/Reports/Overview.jsx - Doctor management
FRONTEND/src/Admin/Pages/DoctorList.jsx - Document controller
BACKEND/Controller/documentController.js
API runtime
- API server
BACKEND/index.js - Authentication endpoints
BACKEND/Routes/authRoutes.js - Appointment endpoints
BACKEND/Routes/appointmentRoutes.js - Patient appointment endpoints
BACKEND/Routes/patientAppointmentRoutes.js - Prescription endpoints
BACKEND/Routes/prescriptionRoutes.js - Patient prescription endpoints
BACKEND/Routes/patientPrescriptionRoutes.js - Document endpoints
BACKEND/Routes/documentRoutes.js
Other components
- Patient
- Administrator
- MongoDB
- Email service
Connections 31
- Patient → Web router: uses
- Administrator → Web router: uses
- Web router → Auth screens: routes to
- Web router → Patient dashboard: routes to
- Web router → Admin dashboard: routes to
- Auth screens → Authentication endpoints: authenticates via
- Patient dashboard → Appointment screens: opens
- Patient dashboard → Prescription screens: opens
- API server → Authentication endpoints: mounts
- API server → Appointment endpoints: mounts
- API server → Patient appointment endpoints: mounts
- API server → Prescription endpoints: mounts
- API server → Patient prescription endpoints: mounts
- API server → Document endpoints: mounts
- Authentication endpoints → Auth controller: dispatches
- Auth controller → User records: reads and writes
- Auth controller → Email delivery: sends through
- Email delivery → Email service: delivers email
- Appointment endpoints → Appointment controller: dispatches
- Appointment controller → Appointment records: reads and writes
- Patient appointment endpoints → Patient appointment controller: dispatches
- Patient appointment controller → Patient appointment records: reads and writes
- Prescription endpoints → Prescription controller: dispatches
- Prescription controller → Prescription records: reads and writes
- Patient prescription endpoints → Patient prescription controller: dispatches
- Patient prescription controller → Prescription records: reads
- Document endpoints → Document controller: dispatches
- User records → MongoDB: persists in
- Appointment records → MongoDB: persists in
- Patient appointment records → MongoDB: persists in
- Prescription records → MongoDB: persists in