How chaitali-rao/clinic-booking-portal works
This is a doctor-appointment platform with a React client and an Express API backed by MongoDB. Patients register or sign in, browse doctors, check availability and booked slots, then book and manage appointments; doctors manage availability and appointment status, while admins manage platform records. The client also offers AI symptom-based specialty suggestions. The graph covers the documented routes and features, but several page and route implementations were not excerpted, so uncertain links are omitted.
Main entry points: App.js Route app · api.js HTTP client · server.js Express server · appointmentRoutes.js Appointment routes
Components 23
Web client
- Route app
doctor-appointment-frontend/src/App.js - Navigation
doctor-appointment-frontend/src/components/Navbar.js - Role guard
doctor-appointment-frontend/src/components/ProtectedRoute.jsx - Login
doctor-appointment-frontend/src/pages/Login.js - Registration
doctor-appointment-frontend/src/pages/Register.js - Admin dashboard
doctor-appointment-frontend/src/pages/Dashboard.js - Doctor search and booking
doctor-appointment-frontend/src/pages/Doctors.js - Patient appointments
doctor-appointment-frontend/src/pages/MyAppointments.js - Doctor dashboard
doctor-appointment-frontend/src/pages/DoctorDashboard.js
API and access
- HTTP client
doctor-appointment-frontend/src/services/api.js - Express server
server.js - Authentication routes
routes/authRoutes.js - Doctor routes
routes/doctorRoutes.js - Appointment routes
routes/appointmentRoutes.js - AI symptom route
routes/aiRoutes.js - JWT and role checks
middleware/authMiddleware.js
Persistence and integrations
- User accounts
models/User.js - Doctor profiles
models/Doctor.js - Appointments
models/Appointment.js - Database connection
config/db.js
Other components
- Patient, doctor, admin
- MongoDB
- Gemini API
Connections 32
- Patient, doctor, admin → Route app: uses
- Route app → Navigation: renders
doctor-appointment-frontend/src/App.js - Route app → Login: routes to
doctor-appointment-frontend/src/App.js - Route app → Registration: routes to
doctor-appointment-frontend/src/App.js - Route app → Admin dashboard: routes to
doctor-appointment-frontend/src/App.js - Route app → Doctor search and booking: routes to
doctor-appointment-frontend/src/App.js - Route app → Patient appointments: routes to
doctor-appointment-frontend/src/App.js - Route app → Doctor dashboard: routes to
doctor-appointment-frontend/src/App.js - Route app → Role guard: guards routes
doctor-appointment-frontend/src/App.js - Login → HTTP client: sends credentials
doctor-appointment-frontend/src/pages/Login.js - Registration → HTTP client: submits registration
doctor-appointment-frontend/src/pages/Register.js - Doctor search and booking → HTTP client: requests doctors and slots
doctor-appointment-frontend/src/pages/Doctors.js - Patient appointments → HTTP client: manages appointments
doctor-appointment-frontend/src/pages/MyAppointments.js - Doctor dashboard → HTTP client: manages appointments
doctor-appointment-frontend/src/pages/DoctorDashboard.js - Admin dashboard → HTTP client: requests data
doctor-appointment-frontend/src/pages/Dashboard.js - HTTP client → Express server: sends API requests
- Express server → Database connection: connects database
server.js - Express server → Authentication routes: mounts routes
server.js - Express server → Doctor routes: mounts routes
server.js - Express server → Appointment routes: mounts routes
server.js - Express server → AI symptom route: mounts routes
server.js - Authentication routes → User accounts: reads and writes
routes/authRoutes.js - Authentication routes → Doctor profiles: creates profiles
routes/authRoutes.js - Doctor routes → JWT and role checks: checks access
routes/doctorRoutes.js - Appointment routes → JWT and role checks: checks access
routes/appointmentRoutes.js - AI symptom route → JWT and role checks: checks access
routes/aiRoutes.js - Doctor routes → Doctor profiles: reads and updates
routes/doctorRoutes.js - Appointment routes → Appointments: reads and updates
routes/appointmentRoutes.js - Appointment routes → Doctor profiles: looks up doctor
routes/appointmentRoutes.js - Database connection → MongoDB: connects
config/db.js - AI symptom route → Gemini API: requests suggestions
routes/aiRoutes.js - Doctor search and booking → AI symptom route: checks symptoms
doctor-appointment-frontend/src/pages/Doctors.js