Simple MERN stack module for appointment booking and scheduling.
- Book appointments with time slot selection
- View appointments in calendar format
- Cancel/Reschedule appointments (3-hour rule)
- Real-time availability checking
- Automatic invoice generation (PDF)
- Status management
cd backend
npm install
# Create .env file (see HOW_TO_RUN.md)
npm run devcd frontend
npm install
# Create .env file (see HOW_TO_RUN.md)
npm startBackend:
backend/
├── controllers/appointmentController.js (All logic)
├── models/ (Appointment, DoctorAvailability, Invoice)
├── routes/appointmentRoutes.js
├── utils/pdfGenerator.js
└── server.js
Frontend:
frontend/src/
├── components/
│ ├── AppointmentBooking.js
│ └── AppointmentCalendar.js (Includes card & status)
├── App.js
├── index.js
└── styles.css
POST /api/appointments/book- Book appointmentGET /api/appointments- Get all appointmentsGET /api/appointments/calendar- Calendar viewGET /api/appointments/availability/:doctorId- Available slotsPUT /api/appointments/:id/status- Update statusDELETE /api/appointments/:id/cancel- CancelPUT /api/appointments/:id/reschedule- RescheduleGET /api/appointments/:id/invoice/download- Download PDF
See HOW_TO_RUN.md for detailed setup instructions.