How ek1gra/prescripto works
Prescripto is a doctor appointment booking and management application, with a patient-facing portal and separate admin/doctor panel. Patients browse doctors, book and manage appointments, update their profile, and pay; administrators manage doctors and appointments, while doctors manage their schedules and appointments. The backend exposes role-specific APIs and persists users, doctors, and appointments in MongoDB. The graph includes the central flows and documented panel capabilities; unsampled page implementations are represented by their exact tree paths, and connections are limited to source-index references or shown API calls.
Main entry points: userController.js Patient operations · App.jsx Patient app routes · adminController.js Admin operations · AppContext.jsx Patient API context
Components 27
Patient portal
- Patient app routes
frontend/src/App.jsx - Doctor discovery
frontend/src/pages/Doctors.jsx - Appointment booking
frontend/src/pages/Appointment.jsx - Profile and appointments
frontend/src/pages/MyAppointments.jsx - Payment verification
frontend/src/pages/Verify.jsx - Patient API context
frontend/src/context/AppContext.jsx
Admin and doctor panels
- Panel routes
admin/src/App.jsx - Admin management
admin/src/pages/Admin/AddDoctor.jsx - Doctor workspace
admin/src/pages/Doctor/DoctorProfile.jsx - Admin API context
admin/src/context/AdminContext.jsx - Doctor API context
admin/src/context/DoctorContext.jsx
Backend API
- API server
backend/server.js - Patient routes
backend/routes/userRoute.js - Admin routes
backend/routes/adminRoute.js - Doctor routes
backend/routes/doctorRoute.js - Patient operations
backend/controllers/userController.js - Admin operations
backend/controllers/adminController.js - Doctor operations
backend/controllers/doctorController.js - Role authentication
backend/middleware/authAdmin.js
Scheduling domain
- Doctor records
backend/models/doctorModel.js - Patient records
backend/models/userModel.js - Appointment records
backend/models/appointmentModel.js
External services
- MongoDB
backend/config/mongodb.js - Cloudinary images
backend/config/cloudinary.js - Stripe and Razorpay
Other components
- Patient
- Admin or doctor
Connections 37
- Patient → Patient app routes: uses
frontend/src/App.jsx - Patient app routes → Doctor discovery: routes to
frontend/src/App.jsx - Patient app routes → Appointment booking: routes to
frontend/src/App.jsx - Patient app routes → Profile and appointments: routes to
frontend/src/App.jsx - Patient app routes → Payment verification: routes to
frontend/src/App.jsx - Patient API context → Patient app routes: provides state
frontend/src/main.jsx - Patient API context → Doctor routes: fetches doctors
frontend/src/context/AppContext.jsx - Patient API context → Patient routes: loads profile
frontend/src/context/AppContext.jsx - Appointment booking → Patient API context: uses context
frontend/src/pages/Appointment.jsx - Profile and appointments → Patient API context: uses context
frontend/src/pages/MyAppointments.jsx - Admin or doctor → Panel routes: uses
admin/src/App.jsx - Panel routes → Admin management: routes to
admin/src/App.jsx - Panel routes → Doctor workspace: routes to
admin/src/App.jsx - Admin API context → Admin management: provides operations
admin/src/pages/Admin/AddDoctor.jsx - Doctor API context → Doctor workspace: provides operations
admin/src/pages/Doctor/DoctorProfile.jsx - Admin API context → Admin routes: calls admin API
admin/src/context/AdminContext.jsx - Admin API context → Doctor routes: changes availability
admin/src/context/AdminContext.jsx - Doctor API context → Doctor routes: calls doctor API
admin/src/context/DoctorContext.jsx - API server → Patient routes: mounts routes
backend/server.js - API server → Admin routes: mounts routes
backend/server.js - API server → Doctor routes: mounts routes
backend/server.js - Patient routes → Patient operations: dispatches
backend/routes/userRoute.js - Admin routes → Admin operations: dispatches
backend/routes/adminRoute.js - Doctor routes → Doctor operations: dispatches
backend/routes/doctorRoute.js - Admin routes → Role authentication: authenticates
backend/routes/adminRoute.js - Patient operations → Patient records: reads and writes
backend/controllers/userController.js - Patient operations → Doctor records: checks doctor slots
backend/controllers/userController.js - Patient operations → Appointment records: books and updates
backend/controllers/userController.js - Admin operations → Doctor records: manages doctors
backend/controllers/adminController.js - Admin operations → Patient records: counts patients
backend/controllers/adminController.js - Admin operations → Appointment records: manages appointments
backend/controllers/adminController.js - Doctor operations → Doctor records: reads and updates
backend/controllers/doctorController.js - Doctor operations → Appointment records: manages appointments
backend/controllers/doctorController.js - API server → MongoDB: connects
backend/server.js - Patient operations → Cloudinary images: uploads profile image
backend/controllers/userController.js - Admin operations → Cloudinary images: uploads doctor image
backend/controllers/adminController.js - Patient operations → Stripe and Razorpay: creates and verifies payments
backend/controllers/userController.js