How yuven2212/book-a-doctor-using-mern works
This is a MERN doctor-appointment system. Patients register, browse approved doctors, check availability, book appointments, and review appointment history and notifications; doctors manage profiles and appointment statuses, while administrators manage users and doctor approvals. React routes and role-based layouts form the user interface, Express routes dispatch to controllers, and MongoDB models hold users, doctors, and appointments. The README documents these capabilities, but sampled excerpts do not show the client’s HTTP calls, so those connections are marked unverified.
Main entry points: App.js Route application · userRoutes.js User routes · Layout.js Role layout · userCtrl.js User workflows
Components 22
React client
- Route application
client/src/App.js - Role layout
client/src/components/Layout.js
Patient services
- Account access
client/src/pages/Register.js - Doctor search
client/src/pages/HomePage.js - Appointment booking
client/src/pages/BookingPage.js - History and alerts
client/src/pages/NotificationPage.js
Doctor and admin
- Doctor application
client/src/pages/ApplyDoctor.js - Doctor profile
client/src/pages/doctor/Profile.js - Doctor appointments
client/src/pages/doctor/DoctorAppointments.js - Admin management
client/src/pages/admin/Doctors.js
Express API
- User routes
routes/userRoutes.js - Doctor routes
routes/doctorRoutes.js - Admin routes
routes/adminRoutes.js - JWT authorization
middlewares/authMiddleware.js - User workflows
controllers/userCtrl.js - Doctor workflows
controllers/doctorCtrl.js - Admin workflows
controllers/adminCtrl.js
Persistence
- User records
models/userModels.js - Doctor records
models/doctorModel.js - Appointment records
models/appointmentModel.js
Other components
- User
- MongoDB
Connections 41
- User → Route application: opens
README.md - Route application → Account access: routes to
client/src/App.js - Route application → Doctor search: routes to
client/src/App.js - Route application → Appointment booking: routes to
client/src/App.js - Route application → History and alerts: routes to
client/src/App.js - Route application → Doctor application: routes to
client/src/App.js - Route application → Doctor profile: routes to
client/src/App.js - Route application → Doctor appointments: routes to
client/src/App.js - Route application → Admin management: routes to
client/src/App.js - Doctor search → Role layout: uses
client/src/pages/HomePage.js - Appointment booking → Role layout: uses
client/src/pages/BookingPage.js - History and alerts → Role layout: uses
client/src/pages/NotificationPage.js - Doctor application → Role layout: uses
client/src/pages/ApplyDoctor.js - Doctor profile → Role layout: uses
client/src/pages/doctor/Profile.js - Doctor appointments → Role layout: uses
client/src/pages/doctor/DoctorAppointments.js - Admin management → Role layout: uses
client/src/pages/admin/Doctors.js - Account access → User routes: calls API
- Doctor search → User routes: calls API
- Appointment booking → User routes: calls API
- History and alerts → User routes: calls API
- Doctor application → User routes: calls API
- Doctor profile → Doctor routes: calls API
- Doctor appointments → Doctor routes: calls API
- Admin management → Admin routes: calls API
- User routes → JWT authorization: guards routes
routes/userRoutes.js - Doctor routes → JWT authorization: guards routes
routes/doctorRoutes.js - Admin routes → JWT authorization: guards routes
routes/adminRoutes.js - User routes → User workflows: dispatches
routes/userRoutes.js - Doctor routes → Doctor workflows: dispatches
routes/doctorRoutes.js - Admin routes → Admin workflows: dispatches
routes/adminRoutes.js - User workflows → User records: reads and writes
controllers/userCtrl.js - User workflows → Doctor records: reads and writes
controllers/userCtrl.js - User workflows → Appointment records: reads and writes
controllers/userCtrl.js - Doctor workflows → Appointment records: reads and writes
controllers/doctorCtrl.js - Doctor workflows → Doctor records: reads and writes
controllers/doctorCtrl.js - Doctor workflows → User records: reads and writes
controllers/doctorCtrl.js - Admin workflows → Doctor records: reads and writes
controllers/adminCtrl.js - Admin workflows → User records: reads and writes
controllers/adminCtrl.js - User records → MongoDB: stored in
- Doctor records → MongoDB: stored in
- Appointment records → MongoDB: stored in