How thathsarabandara/healthsphereproject- works
HealthSphere is a hospital-management web application for patients, doctors, and administrators. The evidenced patient journey enters through the React router, where patients can browse doctors, request reservations, and access accounts, payments, and prescriptions; the README documents further lab and pharmacy services. Separate doctor and admin areas support clinical work and system operations. The server exposes role-oriented REST routes and uses controllers, authentication middleware, Sequelize models, and MySQL. Edges reflect the sampled router, server entry point, controller reference index, and model imports; unsampled route wiring is not inferred.
Main entry points: Patients Patient workflows · App.js React router · db.js MySQL database · index.js Express application
Components 27
Web application
- React router
client/src/App.js - Patient services
client/src/pages/User - Doctor workspace
client/src/pages/doctor - Admin console
client/src/pages/admin
Server API
- Patient routes
server/routes/patients.js - Doctor routes
server/routes/doctors.js - Admin routes
server/routes/admins.js - Auth routes
server/routes/auth.js - Express application
server/index.js
Identity and security
- Authentication
server/controllers/auth/AuthController.js - Role access
server/middleware/auth
Clinical operations
- Patient workflows
server/controllers/Patients - Doctor workflows
server/controllers/Doctors - Admin workflows
server/controllers/Admins - Payments and refunds
server/controllers/Patients/paymentController.js
Persistence and messaging
- MySQL database
server/config/db.js - User accounts
server/models/auth/User.js - Session tokens
server/models/auth/Token.js - Patient records
server/models/healthcare/Patient.js - Doctor records
server/models/healthcare/Doctor.js - Schedules
server/models/healthcare/Schedule.js - Reservations
server/models/healthcare/Reservation.js - Email notifications
server/services/emailServices.js
Other components
- Patient
- Doctor
- Administrator
- Email transport
Connections 34
- Patient → React router: uses
- Doctor → React router: uses
- Administrator → React router: uses
- React router → Patient services: routes to
client/src/App.js - React router → Doctor workspace: routes to
client/src/App.js - React router → Admin console: routes to
client/src/App.js - Express application → Patient routes: mounts
server/index.js - Express application → Doctor routes: mounts
server/index.js - Express application → Admin routes: mounts
server/index.js - Express application → Auth routes: mounts
server/index.js - Patient routes → Patient workflows: dispatches
- Doctor routes → Doctor workflows: dispatches
- Admin routes → Admin workflows: dispatches
- Auth routes → Authentication: dispatches
server/routes/auth.js - Patient workflows → Patient records: uses records
server/controllers/Patients/conditionController.js - Patient workflows → Doctor records: queries
server/controllers/Patients/paymentController.js - Patient workflows → Schedules: uses schedules
server/controllers/Patients/paymentController.js - Patient workflows → Reservations: uses bookings
server/controllers/Patients/paymentController.js - Patient workflows → Payments and refunds: handles payment
- Doctor workflows → Doctor records: queries
server/controllers/Doctors/loginController.js - Admin workflows → Doctor records: manages
server/controllers/Admins/doctorAndStaffManagementController.js - Admin workflows → Patient records: manages
server/controllers/Admins/patientmanagementcontroller.js - Admin workflows → Schedules: uses schedules
server/controllers/Admins/doctorAndStaffManagementController.js - Authentication → User accounts: finds users
server/controllers/auth/AuthController.js - Authentication → Session tokens: creates tokens
server/controllers/auth/AuthController.js - Role access → Session tokens: checks tokens
server/middleware/auth/authorizeDoctor.js - User accounts → MySQL database: persists
server/models/auth/User.js - Session tokens → MySQL database: persists
server/models/auth/Token.js - Patient records → MySQL database: persists
server/models/healthcare/Patient.js - Doctor records → MySQL database: persists
server/models/healthcare/Doctor.js - Schedules → MySQL database: persists
server/models/healthcare/Schedule.js - Reservations → MySQL database: persists
server/models/healthcare/Reservation.js - Payments and refunds → Email notifications: sends notices
server/controllers/Patients/paymentController.js - Email notifications → Email transport: sends mail
server/services/emailServices.js