How alanmart0717/ezbook works
EZBook is a customer–provider appointment-booking platform. Customers browse services, choose an available date and time, and book; providers manage profiles, services, availability and blocked time, then review and respond to appointments. The backend exposes these workflows through Express routes and controller/service/model layers backed by PostgreSQL. The README documents rescheduling, booking history and dynamic scheduling; the tree shows related modules, but sampled code does not establish every route-to-controller connection. Messaging and notifications are represented as distinct capabilities; messaging storage shown in sampled code is in memory.
Main entry points: app.js Express API · App.js Booking interface · service.controller.js Service controller · appointment.controller.js Appointment controller
Components 34
Web client
- Booking interface
ez-book/src/App.js - Customer dashboard
ez-book/src/ClientDashboard.js - Provider dashboard
ez-book/src/ProviderDashboard.js - Messaging UI
ez-book/src/MessagingUI.js
API entry
- Express API
backend/src/app.js
Accounts
- Auth routes
backend/src/routes/auth.routes.js - Auth controller
backend/src/controllers/auth.controller.js - Auth service
backend/src/services/auth.service.js - User model
backend/src/models/user.model.js - Authentication
backend/src/middleware/auth.middleware.js
Provider setup
- Service routes
backend/src/routes/service.routes.js - Service controller
backend/src/controllers/service.controller.js - Service service
backend/src/services/service.service.js - Service model
backend/src/models/service.model.js - Provider controller
backend/src/controllers/provider.controller.js - Provider model
backend/src/models/provider.model.js - Availability routes
backend/src/routes/provider.availability.routes.js - Availability controller
backend/src/controllers/availability.controller.js - Availability model
backend/src/models/availability.model.js - Blocked-time routes
backend/src/routes/provider.blockedTime.routes.js - Blocked-time controller
backend/src/controllers/blockedTime.controller.js - Blocked-time model
backend/src/models/blockedTime.model.js
Scheduling
- Appointment routes
backend/src/routes/appointments.routes.js - Appointment controller
backend/src/controllers/appointment.controller.js - Appointment service
backend/src/services/appointment.service.js - Appointment model
backend/src/models/appointment.model.js - Notification routes
backend/src/routes/notification.routes.js - Notification controller
backend/src/controllers/notification.controller.js - Notification model
backend/src/models/notification.model.js - Message routes
backend/src/routes/Messages.routes.js - Message controller
backend/src/controllers/message.controller.js
Other components
- Customer
- Provider
- PostgreSQL database
Connections 41
- Customer → Booking interface: uses
- Provider → Booking interface: uses
- Booking interface → Express API: requests API
- Booking interface → Customer dashboard: renders
- Booking interface → Provider dashboard: renders
- Express API → Auth routes: mounts
- Express API → Service routes: mounts
- Express API → Availability routes: mounts
- Express API → Blocked-time routes: mounts
- Express API → Appointment routes: mounts
- Express API → Notification routes: mounts
- Express API → Message routes: mounts
- Auth routes → Auth controller: dispatches
- Auth controller → Auth service: calls
- Auth service → User model: reads/writes
- Auth routes → Authentication: protects
- Service routes → Service controller: dispatches
- Service routes → Authentication: protects
- Service controller → Service service: calls
- Service controller → Service model: reads/writes
- Service controller → Provider model: reads
- Service controller → Appointment model: updates bookings
- Availability routes → Availability controller: dispatches
- Blocked-time routes → Blocked-time controller: dispatches
- Appointment routes → Appointment controller: dispatches
- Appointment routes → Authentication: protects
- Appointment controller → Appointment service: calls
- Appointment controller → Appointment model: reads/writes
- Appointment controller → Provider model: reads
- Appointment controller → Notification model: creates notices
- Notification routes → Notification controller: dispatches
- Message routes → Message controller: dispatches
- Messaging UI → Booking interface: shown by
- Appointment service → PostgreSQL database: persists bookings
- User model → PostgreSQL database: queries
- Service model → PostgreSQL database: queries
- Provider model → PostgreSQL database: queries
- Appointment model → PostgreSQL database: queries
- Availability controller → Availability model: reads/writes
- Blocked-time controller → Blocked-time model: reads/writes
- Notification controller → Notification model: reads/writes