How ayushee-sharma/mp1 works
Reaching the Unreached is a rural-health access platform connecting patients with local doctors and hospitals. Users register or log in, discover providers and availability, book appointments, and manage follow-up; doctors handle appointment status and prescriptions, while admins oversee activity. The React app calls an Express API backed by MongoDB models. The main domain branches are represented alongside auth and API infrastructure. Some frontend pages and backend route/controller wiring were not sampled, so their connections are omitted where the evidence does not establish them.
Main entry points: App.jsx React application · app.js Express API · adminController.js Admin oversight · Doctor.js Doctor records
Components 30
Web experience
- React application
frontend/src/App.jsx - Doctor discovery
frontend/src/pages/FindDoctorsPage.jsx - Doctor profile
frontend/src/pages/DoctorProfilePage.jsx - Hospital directory
frontend/src/pages/HospitalsPage.jsx - Patient dashboard
frontend/src/pages/PatientDashboard.jsx - Doctor dashboard
frontend/src/pages/DoctorDashboard.jsx - Admin dashboard
frontend/src/pages/AdminDashboard.jsx - Appointments view
frontend/src/pages/AppointmentsPage.jsx
Identity and access
- Session context
frontend/src/context/AuthContext.jsx - Auth requests
frontend/src/services/authService.js - Authentication
backend/src/controllers/authController.js - JWT authorization
backend/src/middleware/authMiddleware.js
Care coordination
- Doctor requests
frontend/src/services/doctorService.js - Appointment requests
frontend/src/services/appointmentService.js - Doctor directory and availability
backend/src/controllers/doctorController.js - Appointment lifecycle
backend/src/controllers/appointmentController.js - E-prescriptions
backend/src/controllers/prescriptionController.js - Hospital listings
backend/src/controllers/hospitalController.js
Administration
- Admin requests
frontend/src/services/adminService.js - Admin oversight
backend/src/controllers/adminController.js
API and persistence
- HTTP client
frontend/src/services/api.js - Express API
backend/src/app.js - User records
backend/src/models/User.js - Doctor records
backend/src/models/Doctor.js - Patient records
backend/src/models/Patient.js - Appointment records
backend/src/models/Appointment.js - Prescription records
backend/src/models/Prescription.js - Hospital records
backend/src/models/Hospital.js
Other components
- Patients and providers
- MongoDB
Connections 48
- Patients and providers → React application: uses
frontend/src/App.jsx - React application → Session context: provides session
frontend/src/App.jsx - React application → Doctor discovery: routes to
frontend/src/App.jsx - React application → Doctor profile: routes to
frontend/src/App.jsx - React application → Hospital directory: routes to
frontend/src/App.jsx - React application → Patient dashboard: routes to
frontend/src/App.jsx - React application → Doctor dashboard: routes to
frontend/src/App.jsx - React application → Admin dashboard: routes to
frontend/src/App.jsx - React application → Appointments view: routes to
frontend/src/App.jsx - Session context → Auth requests: calls
frontend/src/context/AuthContext.jsx - Auth requests → HTTP client: sends requests
frontend/src/services/authService.js - Doctor profile → Doctor requests: loads provider
frontend/src/pages/DoctorProfilePage.jsx - Doctor profile → Appointment requests: books visit
frontend/src/pages/DoctorProfilePage.jsx - Doctor dashboard → Appointment requests: manages visits
frontend/src/pages/DoctorDashboard.jsx - Doctor dashboard → Doctor requests: updates availability
frontend/src/pages/DoctorDashboard.jsx - Doctor requests → HTTP client: sends requests
frontend/src/services/doctorService.js - Appointment requests → HTTP client: sends requests
frontend/src/services/appointmentService.js - Admin requests → HTTP client: sends requests
frontend/src/services/adminService.js - Express API → Authentication: mounts routes
backend/src/app.js - Express API → Doctor directory and availability: mounts routes
backend/src/app.js - Express API → Appointment lifecycle: mounts routes
backend/src/app.js - Express API → E-prescriptions: mounts routes
backend/src/app.js - Express API → Admin oversight: mounts routes
backend/src/app.js - Express API → Hospital listings: mounts routes
- Authentication → User records: reads and writes
backend/src/controllers/authController.js - Authentication → Doctor records: creates and reads
backend/src/controllers/authController.js - Authentication → Patient records: creates and reads
backend/src/controllers/authController.js - JWT authorization → User records: resolves identity
backend/src/middleware/authMiddleware.js - Appointment lifecycle → Appointment records: creates and updates
backend/src/controllers/appointmentController.js - Appointment lifecycle → Doctor records: checks provider
backend/src/controllers/appointmentController.js - Appointment lifecycle → Patient records: loads patient
backend/src/controllers/appointmentController.js - Doctor directory and availability → Doctor records: searches and updates
backend/src/controllers/doctorController.js - Doctor directory and availability → Appointment records: checks booked slots
backend/src/controllers/doctorController.js - E-prescriptions → Appointment records: validates visit
backend/src/controllers/prescriptionController.js - E-prescriptions → Doctor records: checks ownership
backend/src/controllers/prescriptionController.js - E-prescriptions → Prescription records: manages records
backend/src/controllers/prescriptionController.js - Admin oversight → User records: counts users
backend/src/controllers/adminController.js - Admin oversight → Doctor records: oversees providers
backend/src/controllers/adminController.js - Admin oversight → Patient records: counts patients
backend/src/controllers/adminController.js - Admin oversight → Appointment records: counts visits
backend/src/controllers/adminController.js - Admin oversight → Hospital records: counts facilities
backend/src/controllers/adminController.js - Hospital listings → Hospital records: serves listings
- Doctor records → MongoDB: persists in
- User records → MongoDB: persists in
- Patient records → MongoDB: persists in
- Appointment records → MongoDB: persists in
- Prescription records → MongoDB: persists in
- Hospital records → MongoDB: persists in