How elyasdark/uhc works
UHC is a cross-platform university health-center platform: patients discover and book appointments directly or through a multilingual AI assistant; doctors manage schedules and check-ins; administrators operate the center and govern access. The README documents broader Flutter capabilities than the supplied tree exposes, so the client is represented without an invented source path. Backend relationships reflect the exported Cloud Functions and sampled assistant/auth code; unsampled client wiring is not inferred.
Main entry points: index.ts Callable API Exports · chatService.ts Chat and Booking Flow · admin.ts Admin Governance · appointments.ts Appointment Actions
Components 26
Patient and Staff App
- Flutter App
- Sign-in and Profiles
- Medical Documents
Appointments and Care
- Appointment Actions
functions/src/appointments.ts - Doctor Availability
functions/src/doctorAvailability.ts - Doctor Management
functions/src/doctors.ts - Department Management
functions/src/departments.ts
Operations and Governance
- Admin Governance
functions/src/admin.ts - User Management
functions/src/users.ts - Audit Records
functions/src/shared/audit.ts - Notifications
functions/src/notifications
AI Scheduling
- Assistant Endpoints
functions/src/assistant/index.ts - Chat and Booking Flow
functions/src/assistant/chatService.ts - Request Interpretation
functions/src/assistant/geminiClient.ts - Schedule Matching
functions/src/assistant/scheduleMatcher.ts - Assistant Localization
functions/src/assistant/localization.ts - Assistant Quotas
functions/src/assistant/quota.ts
Firebase Services
- Callable API Exports
functions/src/index.ts - Firebase Authentication
- Cloud Firestore
- Firebase Storage
- Firebase Messaging
Other components
- Patients and Staff
- Doctors
- Admins
- Google Gemini
Connections 33
- Patients and Staff → Flutter App: use
- Doctors → Flutter App: use
- Admins → Flutter App: use
- Flutter App → Sign-in and Profiles: sign in
- Sign-in and Profiles → Firebase Authentication: authenticate
- Flutter App → Callable API Exports: invoke
- Callable API Exports → Appointment Actions: exports
- Callable API Exports → Doctor Availability: exports
- Callable API Exports → Doctor Management: exports
- Callable API Exports → Department Management: exports
- Callable API Exports → User Management: exports
- Callable API Exports → Admin Governance: exports
- Callable API Exports → Notifications: exports
- Callable API Exports → Assistant Endpoints: exports
- Appointment Actions → Cloud Firestore: read and write
- Doctor Availability → Cloud Firestore: read and write
- Doctor Management → Cloud Firestore: read and write
- Department Management → Cloud Firestore: read and write
- User Management → Cloud Firestore: read and write
- Admin Governance → Cloud Firestore: read and write
- Admin Governance → Audit Records: records actions
- Admin Governance → Firebase Authentication: administers accounts
- Medical Documents → Firebase Storage: upload files
- Flutter App → Notifications: manage alerts
- Notifications → Firebase Messaging: deliver pushes
- Assistant Endpoints → Chat and Booking Flow: dispatches
- Chat and Booking Flow → Cloud Firestore: stores chat
- Chat and Booking Flow → Request Interpretation: interprets request
- Request Interpretation → Google Gemini: requests interpretation
- Chat and Booking Flow → Schedule Matching: finds schedule offers
- Chat and Booking Flow → Assistant Quotas: checks quota
- Chat and Booking Flow → Assistant Localization: uses locale
- Chat and Booking Flow → Appointment Actions: confirms booking