How dhileepk-18/mediguide works
MediGuide is a role-based healthcare portal for patients, doctors, and administrators. Users authenticate into role-specific workflows; patients can consult the AI assistant, check symptoms, discover doctors and book appointments, and manage prescriptions, medicines, and health records, while doctors and administrators manage clinical and operational records. React pages call the Express REST API, whose controllers use MongoDB when connected and otherwise the local in-memory store. The README documents Gemini as the AI provider. Some domain modules were not sampled, so their internal call paths are not asserted here.
Main entry points: server.js Express REST API · api.js API client · prescriptionController.js Prescription management · App.jsx Role-based portal
Components 31
Web application
- Role-based portal
frontend/src/App.jsx - Login and registration
frontend/src/pages/public/LoginPage.jsx - AI assistant
frontend/src/pages/patient/AiAssistantPage.jsx - Symptom checker
frontend/src/pages/patient/SymptomCheckerPage.jsx - Appointments
frontend/src/pages/patient/AppointmentsPage.jsx - Patient records
frontend/src/pages/patient/HealthRecordsPage.jsx - Medicine reminders
frontend/src/pages/patient/MedicinesPage.jsx - Prescriptions
frontend/src/pages/doctor/DoctorPrescriptionsPage.jsx - Administration
frontend/src/pages/admin/AdminDashboard.jsx - Authentication state
frontend/src/store/authStore.js - API client
frontend/src/services/api.js
REST backend
- Express REST API
backend/src/server.js - Authentication routes
backend/src/routes/authRoutes.js - Admin routes
backend/src/routes/adminRoutes.js - Authentication
backend/src/controllers/authController.js - Administration
backend/src/controllers/adminController.js
AI and triage
- AI requests
backend/src/controllers/aiController.js - Clinical AI service
backend/src/services/aiService.js - Triage model service
ml-service/app.py
Clinical records
- Appointment management
backend/src/controllers/appointmentController.js - Prescription management
backend/src/controllers/prescriptionController.js - Prescription PDF
backend/src/services/pdfService.js - Health records
backend/src/controllers/healthRecordController.js - Medicine schedules
backend/src/controllers/medicineController.js
Persistence and identity
- MongoDB
backend/src/config/db.js - Local data store
backend/src/store/inMemoryStore.js - Domain schemas
backend/src/models/schemas.js
Other components
- Patient
- Doctor
- Administrator
- Google Gemini
Connections 35
- Patient → Role-based portal: uses
README.md - Doctor → Role-based portal: uses
README.md - Administrator → Role-based portal: uses
README.md - Role-based portal → Authentication state: checks access
frontend/src/App.jsx - Login and registration → Authentication state: updates session
frontend/src/store/authStore.js - Authentication state → API client: requests identity
frontend/src/store/authStore.js - AI assistant → API client: sends prompts
frontend/src/pages/patient/AiAssistantPage.jsx - Symptom checker → API client: submits symptoms
- Appointments → API client: books visits
frontend/src/pages/patient/AppointmentsPage.jsx - Patient records → API client: manages records
- Medicine reminders → API client: tracks doses
- Prescriptions → API client: manages prescriptions
frontend/src/pages/doctor/DoctorPrescriptionsPage.jsx - Administration → API client: manages operations
- API client → Express REST API: calls REST API
README.md - Express REST API → Authentication routes: mounts routes
backend/src/server.js - Express REST API → Admin routes: mounts routes
backend/src/server.js - Authentication routes → Authentication: dispatches
backend/src/routes/authRoutes.js - Admin routes → Administration: dispatches
backend/src/routes/adminRoutes.js - Express REST API → Appointment management: serves appointment routes
- Express REST API → AI requests: serves AI routes
backend/src/server.js - Express REST API → Health records: serves record routes
- Express REST API → Medicine schedules: serves medicine routes
- Express REST API → Prescription management: serves prescription routes
backend/src/server.js - Authentication → MongoDB: reads and writes
backend/src/controllers/authController.js - Authentication → Local data store: fallback reads and writes
backend/src/controllers/authController.js - Administration → MongoDB: reads and writes
backend/src/controllers/adminController.js - Administration → Local data store: fallback reads and writes
backend/src/controllers/adminController.js - Appointment management → MongoDB: reads and writes
backend/src/controllers/appointmentController.js - Appointment management → Local data store: fallback reads and writes
backend/src/controllers/appointmentController.js - Prescription management → MongoDB: reads and writes
backend/src/controllers/prescriptionController.js - Prescription management → Local data store: fallback reads and writes
backend/src/controllers/prescriptionController.js - Prescription management → Prescription PDF: generates PDF
backend/src/controllers/prescriptionController.js - AI requests → Clinical AI service: delegates requests
- Clinical AI service → Google Gemini: uses provider
README.md - Symptom checker → Triage model service: requests triage