How rohan-bahule/doctor-appointment-booking-system works
DocBook is a three-role healthcare appointment platform. Patients discover doctors, book and pay for appointments, manage bookings, and review completed consultations; doctors manage availability, blocked times, appointments, profiles, and reviews; admins manage doctors and oversee appointments and refunds. React patient and staff applications call an Express API backed by MongoDB, with scheduling, payment, feedback, and reminder services supporting the workflows. Several relationships come from the README or SOURCE INDEX because their implementation files were not sampled; those evidence limits are reflected in the graph.
Main entry points: server.js Express API · userController.js Patient workflows · appointmentModel.js Appointment records · userRoute.js Patient routes
Components 24
User applications
- Patient app
frontend/src/App.jsx - Doctor and admin panel
admin/src/App.jsx
API and access
- Express API
backend/server.js - Patient routes
backend/routes/userRoute.js - Doctor routes
backend/routes/doctorRoute.js - Admin routes
backend/routes/adminRoute.js - Patient workflows
backend/controllers/userController.js - Doctor workflows
backend/controllers/doctorController.js - Admin workflows
backend/controllers/adminController.js
Scheduling and care
- Availability and slots
backend/controllers/availabilityController.js - Blocked time management
backend/controllers/blockedSlotController.js - Booking validation
backend/services/bookingValidationService.js - Feedback and ratings
backend/services/feedbackService.js
Payments and reminders
- Payment and refunds
backend/services/paymentService.js - Appointment reminders
backend/services/reminderService.js - Email delivery
backend/config/nodemailer.js
MongoDB records
- Doctor records
backend/models/doctorModel.js - Appointment records
backend/models/appointmentModel.js - Payment records
backend/models/paymentModel.js - Feedback records
backend/models/feedbackModel.js
Other components
- Patients
- Doctors and admins
- Razorpay
- MongoDB
Connections 39
- Patients → Patient app: use
README.md - Doctors and admins → Doctor and admin panel: use
README.md - Patient app → Express API: call API
README.md - Doctor and admin panel → Express API: call API
README.md - Express API → Patient routes: mounts
backend/server.js - Express API → Doctor routes: mounts
backend/server.js - Express API → Admin routes: mounts
backend/server.js - Patient routes → Patient workflows: dispatch
backend/routes/userRoute.js - Doctor routes → Doctor workflows: dispatch
backend/routes/doctorRoute.js - Admin routes → Admin workflows: dispatch
- Patient routes → Availability and slots: dispatch
backend/routes/userRoute.js - Doctor routes → Availability and slots: dispatch
backend/routes/doctorRoute.js - Doctor routes → Blocked time management: dispatch
backend/routes/doctorRoute.js - Patient routes → Feedback and ratings: dispatch
backend/routes/userRoute.js - Doctor routes → Feedback and ratings: dispatch
backend/routes/doctorRoute.js - Patient routes → Booking validation: dispatch
- Patient workflows → Booking validation: validate booking
backend/controllers/userController.js - Patient workflows → Appointment records: create booking
backend/controllers/userController.js - Patient workflows → Doctor records: update booked slots
backend/controllers/userController.js - Booking validation → Doctor records: check doctor
backend/services/bookingValidationService.js - Booking validation → Appointment records: check conflicts
backend/services/bookingValidationService.js - Booking validation → Blocked time management: check blocks
backend/services/bookingValidationService.js - Availability and slots → Appointment records: read bookings
- Doctor workflows → Appointment records: read appointments
backend/controllers/doctorController.js - Doctor workflows → Payment and refunds: check refunds
backend/controllers/doctorController.js - Admin workflows → Appointment records: read appointments
backend/controllers/adminController.js - Admin workflows → Payment and refunds: check refunds
backend/controllers/adminController.js - Admin workflows → Doctor records: manage doctors
backend/controllers/adminController.js - Admin workflows → Email delivery: send invitations
backend/controllers/adminController.js - Patient workflows → Payment records: manage payment
backend/controllers/userController.js - Patient workflows → Payment and refunds: process payment
backend/controllers/userController.js - Payment and refunds → Payment records: save payment
backend/services/paymentService.js - Payment and refunds → Razorpay: create orders
backend/services/paymentService.js - Feedback and ratings → Feedback records: store reviews
backend/services/feedbackService.js - Feedback and ratings → Appointment records: verify completion
backend/services/feedbackService.js - Appointment reminders → Appointment records: select appointments
- Express API → Appointment reminders: start cron
backend/server.js - Appointment reminders → Email delivery: send reminders
- Express API → MongoDB: connect
backend/server.js