How blpk2005/docspot works
Docspot is a role-based medical appointment booking application. Patients discover approved doctors, register or sign in, and book appointments; doctors manage requests and profiles, while admins review doctor applications and administer users and appointments. The React client routes users to these role-specific workflows and calls an Express API backed by MongoDB. Authentication, notifications, appointment documents, and email password recovery support the main flows. Client page-to-endpoint details and some backend internals are unsampled; links between those subsystems are therefore documented only where shown or explicitly identified.
Main entry points: App.js Route application · api.js HTTP API client · appointmentRoutes.js Appointment workflow · server.js API server
Components 23
Client experience
- Route application
client/src/App.js - Session context
client/src/context/AuthContext.js - Role navigation
client/src/components/Layout.js - Doctor discovery
client/src/pages/LandingPage.js - Sign in / register
client/src/pages/Login.js - Patient booking
client/src/pages/BookAppointment.js - Patient appointments
client/src/pages/MyAppointments.js - Doctor application
client/src/pages/ApplyDoctor.js - Doctor appointments
client/src/pages/DoctorAppointments.js - Admin management
client/src/pages/AdminDoctors.js - HTTP API client
client/src/utils/api.js
API workflows
- API server
server/server.js - Account and recovery
server/routes/userRoutes.js - Doctor workflow
server/routes/doctorRoutes.js - Appointment workflow
server/routes/appointmentRoutes.js - JWT verification
server/middleware/authMiddleware.js - Appointment uploads
server/routes/appointmentRoutes.js
Persistence and identity
- User records
server/models/userModel.js - Doctor records
server/models/doctorModel.js - Appointment records
server/models/appointmentModel.js
External services
- MongoDB
- Gmail delivery
Other components
- Patient / staff
Connections 32
- Patient / staff → Route application: uses
client/src/App.js - Route application → Session context: provides session
client/src/App.js - Route application → Doctor discovery: routes to
client/src/App.js - Route application → Sign in / register: routes to
client/src/App.js - Route application → Patient booking: routes to
client/src/App.js - Route application → Patient appointments: routes to
client/src/App.js - Route application → Doctor application: 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 - Role navigation → Session context: uses session
client/src/components/Layout.js - Doctor discovery → HTTP API client: requests doctors
client/src/pages/LandingPage.js - Patient booking → HTTP API client: sends booking
client/src/pages/BookAppointment.js - Patient appointments → HTTP API client: loads appointments
client/src/pages/MyAppointments.js - Doctor application → HTTP API client: submits application
client/src/pages/ApplyDoctor.js - Doctor appointments → HTTP API client: manages requests
client/src/pages/DoctorAppointments.js - Admin management → HTTP API client: administers records
client/src/pages/AdminDoctors.js - HTTP API client → API server: HTTP requests
- API server → Account and recovery: mounts route
server/server.js - API server → Doctor workflow: mounts route
server/server.js - API server → Appointment workflow: mounts route
server/server.js - API server → MongoDB: connects
server/server.js - Account and recovery → JWT verification: protects routes
server/routes/userRoutes.js - Doctor workflow → JWT verification: protects routes
server/routes/doctorRoutes.js - Appointment workflow → JWT verification: protects routes
server/routes/appointmentRoutes.js - Account and recovery → User records: reads / writes
server/routes/userRoutes.js - Doctor workflow → Doctor records: reads / writes
server/routes/doctorRoutes.js - Doctor workflow → User records: notifies users
server/routes/doctorRoutes.js - Appointment workflow → Appointment records: reads / writes
server/routes/appointmentRoutes.js - Appointment workflow → Doctor records: looks up doctor
server/routes/appointmentRoutes.js - Appointment workflow → User records: notifies user
server/routes/appointmentRoutes.js - Account and recovery → Gmail delivery: sends reset email
server/routes/userRoutes.js - Appointment workflow → Appointment uploads: stores document
server/routes/appointmentRoutes.js