How umachandra-30/meditrack works
This is a multi-role clinic coordination app: patients register and book appointments, hospitals manage appointment status, doctors consult active appointments and upload records, while administrators oversee users and appointments. The React client routes role-specific screens through a shared auth context and API client to an Express backend; controllers apply domain operations over MongoDB models, with record uploads configured through Cloudinary. The graph follows shown calls and documented route mounts; several unsampled UI and backend details are represented only at their exact enclosing paths.
Main entry points: App.jsx Role routing · axios.js HTTP client · server.js Express entry · medicalRecordController.js Medical records service
Components 23
Web client
- Role routing
src/App.jsx - Session auth
src/hooks/useAuth.jsx - Patient portal
src/Pages/patient/PatientHome.jsx - Appointment booking
src/components/patient/BookAppointmentPopup.jsx - Patient records
src/Pages/patient/HealthRecords.jsx - Doctor workspace
src/components/doctor/DoctorDashboard.jsx - Doctor records
src/Pages/doctor/Records.jsx - Hospital workspace
src/Pages/hospital/Appointments.jsx - Admin console
src/Pages/admin/AdminLayout.jsx - HTTP client
src/api/axios.js
API services
- Express entry
backend/server.js - Identity service
backend/controllers/authController.js - Appointment service
backend/controllers/appointmentController.js - Admin service
backend/controllers/adminController.js - Medical records service
backend/controllers/medicalRecordController.js
Domain data
- Patient data
backend/models/Patient.js - Doctor data
backend/models/Doctor.js - Hospital data
backend/models/Hospital.js - Appointment data
backend/models/Appointment.js - Medical record data
backend/models/MedicalRecord.js
Persistence and uploads
- MongoDB connection
backend/config/db.js - Cloudinary upload
backend/config/cloudinary.js
Other components
- Clinic users
Connections 35
- Clinic users → Role routing: uses
src/App.jsx - Role routing → Session auth: guards routes
src/App.jsx - Role routing → Patient portal: routes to
src/App.jsx - Role routing → Doctor workspace: routes to
src/App.jsx - Role routing → Doctor records: routes to
src/App.jsx - Role routing → Patient records: routes to
src/App.jsx - Role routing → Hospital workspace: routes to
src/App.jsx - Role routing → Admin console: routes to
src/App.jsx - Patient portal → Appointment booking: renders
src/Pages/patient/PatientHome.jsx - Patient portal → HTTP client: requests data
src/Pages/patient/PatientHome.jsx - Appointment booking → HTTP client: books via
src/components/patient/BookAppointmentPopup.jsx - Doctor workspace → HTTP client: requests data
src/components/doctor/DoctorDashboard.jsx - Doctor records → HTTP client: requests records
src/Pages/doctor/Records.jsx - Patient records → HTTP client: requests records
src/Pages/patient/HealthRecords.jsx - Hospital workspace → HTTP client: manages via
src/Pages/hospital/Appointments.jsx - Admin console → HTTP client: requests data
- HTTP client → Express entry: HTTP requests
src/api/axios.js - Express entry → MongoDB connection: connects
backend/server.js - Express entry → Identity service: mounts auth
backend/server.js - Express entry → Appointment service: mounts appointments
backend/server.js - Express entry → Admin service: mounts admin
backend/server.js - Express entry → Medical records service: mounts records
backend/server.js - Identity service → Patient data: reads and writes
backend/controllers/authController.js - Identity service → Doctor data: reads and writes
backend/controllers/authController.js - Identity service → Hospital data: authenticates
backend/controllers/authController.js - Appointment service → Appointment data: reads and writes
backend/controllers/appointmentController.js - Admin service → Patient data: reads
backend/controllers/adminController.js - Admin service → Doctor data: reads
backend/controllers/adminController.js - Admin service → Hospital data: reads and writes
backend/controllers/adminController.js - Admin service → Appointment data: reads
backend/controllers/adminController.js - Medical records service → Medical record data: reads and writes
backend/controllers/medicalRecordController.js - Medical records service → Patient data: looks up
backend/controllers/medicalRecordController.js - Medical records service → Doctor data: validates doctor
backend/controllers/medicalRecordController.js - Medical records service → Appointment data: checks consultation
backend/controllers/medicalRecordController.js - Cloudinary upload → Medical records service: uploads files
backend/routes/medicalRecordRoutes.js