How sanusingh-dev/mediconnect-clinic works
Mediconnect is a clinic-management web application: patients and doctors use role-based dashboards, while administrators manage clinic records. The principal documented runtime path is a React client calling an Express API backed by MongoDB; the sampled payment controller shows proof upload, doctor confirmation or rejection, and token generation. Other major capabilities represented by the tree and README include registration, doctor discovery/onboarding, appointments, patient history, and prescriptions. Several page and controller implementations were not sampled, so their detailed interactions are not asserted.
Main entry points: App.jsx Routes and shell · server.js API server · controllers Clinical controllers · paymentController.js Payment controller
Components 29
React client
- Routes and shell
frontend/src/App.jsx - Auth context
frontend/src/context/AuthContext.jsx - Sign-in and signup
frontend/src/pages/AuthPage.jsx - Patient workflows
frontend/src/pages - Doctor workflows
frontend/src/pages - Admin dashboard
frontend/src/pages/AdminDashboard.jsx - Payment and tokens
frontend/src/pages - HTTP client
frontend/src/api/axiosClient.js - Auth service
frontend/src/services/authService.js - Clinical services
frontend/src/services - Payment service
frontend/src/services/paymentService.js
Express API
- API server
backend/server.js - Auth routes
backend/routes/authRoutes.js - Clinical routes
backend/routes - Payment routes
backend/routes/paymentRoutes.js - Identity controller
backend/controllers/authController.js - Clinical controllers
backend/controllers - Access control
backend/middleware/authMiddleware.js
Clinical records
- MongoDB
backend/config/db.js - User records
backend/models/User.js - Patient records
backend/models/Patient.js - Doctor records
backend/models/Doctor.js - Appointment records
backend/models/Appointment.js - Prescriptions
backend/models/Prescription.js
Payments and tokens
- Payment controller
backend/controllers/paymentController.js - Payment records
backend/models/Payment.js
Other components
- Patient
- Doctor
- Administrator
Connections 35
- Patient → Routes and shell: uses
frontend/src/App.jsx - Doctor → Routes and shell: uses
frontend/src/App.jsx - Administrator → Routes and shell: uses
frontend/src/App.jsx - Routes and shell → Auth context: provides auth
frontend/src/App.jsx - Routes and shell → Sign-in and signup: routes to
frontend/src/App.jsx - Routes and shell → Patient workflows: routes to
frontend/src/App.jsx - Routes and shell → Doctor workflows: routes to
frontend/src/App.jsx - Routes and shell → Admin dashboard: routes to
frontend/src/App.jsx - Routes and shell → Payment and tokens: routes to
frontend/src/App.jsx - Auth context → HTTP client: sends requests
frontend/src/context/AuthContext.jsx - Auth context → Auth service: checks profile
frontend/src/context/AuthContext.jsx - Auth service → HTTP client: uses
frontend/src/services/authService.js - Clinical services → HTTP client: uses
frontend/src/services/doctorService.js - Payment service → HTTP client: uses
frontend/src/services/paymentService.js - HTTP client → API server: calls API
frontend/src/api/axiosClient.js - API server → MongoDB: connects
backend/server.js - API server → Auth routes: mounts
backend/server.js - API server → Clinical routes: mounts
backend/server.js - API server → Payment routes: mounts
backend/server.js - Auth routes → Identity controller: dispatches
backend/routes/authRoutes.js - Clinical routes → Clinical controllers: dispatches
backend/routes/appointmentRoutes.js - Payment routes → Payment controller: dispatches
backend/routes/paymentRoutes.js - Payment routes → Access control: checks access
backend/routes/paymentRoutes.js - Access control → User records: loads user
backend/middleware/authMiddleware.js - Identity controller → User records: reads and writes
backend/controllers/authController.js - Identity controller → Patient records: creates profile
backend/controllers/authController.js - Identity controller → Doctor records: creates profile
backend/controllers/authController.js - Clinical controllers → Appointment records: manages appointments
backend/controllers/doctorController.js - Clinical controllers → Patient records: loads patients
backend/controllers/doctorController.js - Clinical controllers → Doctor records: loads doctors
backend/controllers/doctorController.js - Clinical controllers → Prescriptions: writes prescriptions
backend/controllers/doctorController.js - Payment controller → Appointment records: updates appointment
backend/controllers/paymentController.js - Payment controller → Payment records: records payment
backend/controllers/paymentController.js - Payment controller → Doctor records: loads fee details
backend/controllers/paymentController.js - Payment controller → Patient records: loads patient
backend/controllers/paymentController.js