How adeepas/hospital-management-system works
This is an in-development hospital management system. Its clearest implemented workflow is patient appointment booking: a patient uses the React app to find a doctor and request a slot; the Express API checks the doctor’s working days, creates an appointment, and returns populated appointment details. Admin interfaces also cover doctor and patient management and appointments. The README lists medical records, billing, staff management, and analytics as planned capabilities; the supplied tree does not show implemented source for most of these. Backend controller/service details are sampled selectively, so uncertain internal wiring is omitted.
Main entry points: index.js API route index · AppRoutes.jsx Role-based routes · pages Admin management · Appointment.js Appointment records
Components 27
Web application
- React app
frontend/src/App.jsx - Role-based routes
frontend/src/routes/AppRoutes.jsx - Patient booking
frontend/src/pages/AppointmentBooking.jsx - Admin management
frontend/src/modules/admin/pages - Login and registration
frontend/src/modules/auth/pages - Appointment API client
frontend/src/services/appointmentService.js - Doctor API client
frontend/src/services/doctorService.js - Patient API client
frontend/src/services/patientService.js - Auth API client
frontend/src/services/authService.js
API and access
- Express application
backend/src/app.js - API route index
backend/src/routes/index.js - Appointment routes
backend/src/routes/appointmentRoutes.js - Doctor routes
backend/src/routes/doctorRoutes.js - Patient routes
backend/src/routes/patientRoutes.js - Auth routes
backend/src/routes/authRoute.js - JWT role checks
backend/src/middleware/authMiddlewae.js
Hospital operations
- Appointment handling
backend/src/controllers/appointmentController.js - Doctor management
backend/src/controllers/doctorController.js - Doctor queries
backend/src/services/doctorService.js - Patient management
backend/src/controllers/patientController.js - Patient queries
backend/src/services/patientService.js - Authentication
backend/src/controllers/authController.js
Persistence
- Appointment records
backend/src/models/Appointment.js - Doctor records
backend/src/models/Doctor.js - User records
backend/src/models/User.js
Other components
- Patient
- MongoDB
Connections 35
- Patient → React app: uses
- React app → Role-based routes: renders
- Role-based routes → Patient booking: routes booking
- Role-based routes → Admin management: routes admin
- Role-based routes → Login and registration: routes auth
- Patient booking → Doctor API client: finds doctors
- Patient booking → Appointment API client: requests booking
- Login and registration → Auth API client: submits credentials
- Admin management → Doctor API client: manages doctors
- Admin management → Patient API client: manages patients
- Admin management → Appointment API client: views appointments
- Express application → API route index: mounts API
- API route index → Appointment routes: dispatches
- API route index → Doctor routes: dispatches
- API route index → Patient routes: dispatches
- API route index → Auth routes: dispatches
- Appointment routes → JWT role checks: checks roles
- Doctor routes → JWT role checks: checks roles
- Patient routes → JWT role checks: checks roles
- Appointment routes → Appointment handling: dispatches
- Doctor routes → Doctor management: dispatches
- Patient routes → Patient management: dispatches
- Auth routes → Authentication: dispatches
- Doctor management → Doctor queries: calls
- Patient management → Patient queries: calls
- Appointment handling → Doctor records: checks doctor
- Appointment handling → Appointment records: creates and reads
- Doctor queries → Doctor records: queries
- Doctor queries → Appointment records: queries slots
- Patient queries → User records: queries
- Patient queries → Appointment records: queries
- Authentication → User records: authenticates
- Appointment records → MongoDB: persists
- Doctor records → MongoDB: persists
- User records → MongoDB: persists