How gantasrinivasarao96/doctor-appointment-booking-system works
Doctor Appointment Booking System is a role-based MERN application for patients, doctors, and administrators. Patients register, discover doctors, select generated availability, and book appointments; doctors manage availability and appointment status; administrators review doctor applications. The client routes role-specific pages and sends authenticated requests to the Express API, whose controllers apply workflow logic and persist records. Major README capabilities such as notifications and private medical-document access are represented. Some subsystem links rely on the README or SOURCE INDEX because their implementation excerpts were not provided.
Main entry points: App.jsx Route application · api.js API client · app.js Express API · appointmentController.js Slot booking and management
Components 29
Client application
- Route application
client/src/App.jsx - API client
client/src/services/api.js - Patient booking pages
client/src/pages/BookAppointment.jsx - Appointment history
client/src/pages/MyAppointments.jsx - Doctor application
client/src/pages/ApplyDoctor.jsx - Doctor dashboard
client/src/dashboard/DoctorDashboard.jsx - Admin dashboard
client/src/dashboard/AdminDashboard.jsx - Notification state
client/src/context/NotificationContext.jsx - Express API
server/app.js
Identity and access
- Session state
client/src/context/AuthContext.jsx - Authentication routes
server/routes/authRoutes.js - Authentication logic
server/controllers/authController.js - Token authentication
server/middleware/authMiddleware.js
Doctor and appointments
- Doctor routes
server/routes/doctorRoutes.js - Doctor profiles and availability
server/controllers/doctorController.js - Appointment routes
server/routes/appointmentRoutes.js - Slot booking and management
server/controllers/appointmentController.js - Medical document upload
server/middleware/medicalDocumentUpload.js
Administration and notifications
- Admin routes
server/routes/adminRoutes.js - Application decisions
server/controllers/adminController.js - Notification routes
server/routes/notificationRoutes.js - Notification handling
server/controllers/notificationController.js
Persistence and files
- Doctor records
server/models/Doctor.js - Appointment records
server/models/Appointment.js - Notification records
server/models/Notification.js - User records
server/models/User.js
Other components
- Patient / doctor / admin
- MongoDB
- Private document files
Connections 45
- Patient / doctor / admin → Route application: uses
README.md - Route application → Session state: provides session
client/src/App.jsx - Route application → Patient booking pages: routes to
client/src/App.jsx - Route application → Appointment history: routes to
client/src/App.jsx - Route application → Doctor application: routes to
client/src/App.jsx - Route application → Doctor dashboard: routes to
client/src/App.jsx - Route application → Admin dashboard: routes to
client/src/App.jsx - Session state → API client: validates session
client/src/context/AuthContext.jsx - Patient booking pages → API client: requests data
client/src/pages/BookAppointment.jsx - Appointment history → API client: requests history
client/src/pages/MyAppointments.jsx - Doctor application → API client: submits application
client/src/pages/ApplyDoctor.jsx - Doctor dashboard → API client: manages appointments
client/src/dashboard/DoctorDashboard.jsx - Admin dashboard → API client: reviews applications
client/src/dashboard/AdminDashboard.jsx - API client → Express API: calls API
README.md - Express API → Authentication routes: mounts routes
server/app.js - Express API → Doctor routes: mounts routes
server/app.js - Express API → Appointment routes: mounts routes
server/app.js - Express API → Admin routes: mounts routes
server/app.js - Express API → Notification routes: mounts routes
server/app.js - Authentication routes → Authentication logic: dispatches to
server/routes/authRoutes.js - Authentication routes → Token authentication: authenticates
server/routes/authRoutes.js - Token authentication → User records: loads user
server/middleware/authMiddleware.js - Authentication logic → User records: reads and writes
server/controllers/authController.js - Doctor routes → Doctor profiles and availability: dispatches to
server/routes/doctorRoutes.js - Doctor profiles and availability → Doctor records: reads and writes
server/controllers/doctorController.js - Doctor profiles and availability → User records: looks up admins
server/controllers/doctorController.js - Doctor profiles and availability → Notification records: creates alerts
server/controllers/doctorController.js - Appointment routes → Slot booking and management: dispatches to
server/routes/appointmentRoutes.js - Appointment routes → Token authentication: authenticates
server/routes/appointmentRoutes.js - Appointment routes → Medical document upload: accepts document
server/routes/appointmentRoutes.js - Slot booking and management → Doctor records: checks availability
server/controllers/appointmentController.js - Slot booking and management → Appointment records: books and updates
server/controllers/appointmentController.js - Slot booking and management → Notification records: creates alerts
server/controllers/appointmentController.js - Medical document upload → Private document files: stores upload
README.md - Slot booking and management → Private document files: serves documents
README.md - Admin routes → Application decisions: dispatches to
server/routes/adminRoutes.js - Application decisions → Doctor records: decides applications
server/controllers/adminController.js - Application decisions → User records: updates access
server/controllers/adminController.js - Application decisions → Notification records: sends decisions
server/controllers/adminController.js - Notification routes → Notification handling: dispatches to
server/routes/notificationRoutes.js - Notification handling → Notification records: reads and updates
server/controllers/notificationController.js - Doctor records → MongoDB: persists
README.md - Appointment records → MongoDB: persists
README.md - User records → MongoDB: persists
README.md - Notification records → MongoDB: persists
README.md