How faris-ragai/hayah works
Hayah is a Flutter UI-only doctor–patient app: users sign in or register, then navigate role-specific screens for patient records and doctor access. Its demo data is in memory, while preferences and pictures are described as device-saved; there is no backend, real QR scanning, or real sync. The README documents the major screen flows and capabilities. Sampled source covers native desktop startup only, so Dart-module interactions below follow documented flows rather than inspected calls.
Main entry points: patient_shell_screen.dart Patient tabs · patient_file_screen.dart Patient file view · mock_database.dart In-memory data · main.dart App startup
Components 30
App entry and navigation
- App startup
lib/main.dart - App routing
lib/screens/app_router.dart - Welcome and login
lib/screens/login_screen.dart
Patient experience
- Patient tabs
lib/screens/patient_shell_screen.dart - Medical file
lib/screens/my_medical_file_screen.dart - Prescriptions
lib/screens/my_roshettas_screen.dart - Patient profile
lib/screens/patient_profile_screen.dart - Patient QR
lib/screens/my_qr_screen.dart - Allowed doctors
lib/screens/allowed_doctors_screen.dart - History log
lib/screens/history_log_screen.dart
Doctor experience
- Doctor tabs
lib/screens/doctor_shell_screen.dart - Patient search
lib/screens/search_screen.dart - QR scan simulation
lib/screens/scan_qr_screen.dart - Patient file view
lib/screens/patient_file_screen.dart - Access decision
lib/screens/no_access_screen.dart - Medical info entry
lib/screens/add_medical_info_screen.dart - Prescription authoring
lib/screens/new_roshetta_screen.dart
Domain and services
- Health record models
lib/model/medical_entry.dart - Prescription model
lib/model/roshetta.dart - Authentication
lib/service/auth_service.dart - Patient operations
lib/service/patient_service.dart - In-memory data
lib/service/mock_database.dart - Settings and sync
lib/screens/settings_screen.dart - Language support
lib/service/localization_service.dart - Picture handling
lib/service/image_service.dart
Platform hosts
- Windows Flutter host
windows/runner/flutter_window.cpp - Windows native window
windows/runner/win32_window.cpp - Linux application host
linux/runner/my_application.cc - Linux startup
linux/runner/main.cc
Other components
- Patient or doctor
Connections 32
- Patient or doctor → App startup: opens
- App startup → Welcome and login: starts at
- Welcome and login → Authentication: authenticates
README.md - Welcome and login → App routing: routes roles
README.md - App routing → Patient tabs: opens patient
README.md - App routing → Doctor tabs: opens doctor
README.md - Patient tabs → Medical file: opens file
README.md - Patient tabs → Prescriptions: opens prescriptions
README.md - Patient tabs → Patient profile: opens profile
README.md - Patient tabs → Patient QR: opens QR
README.md - Patient tabs → Allowed doctors: opens access list
README.md - Patient tabs → History log: opens history
README.md - Doctor tabs → Patient search: opens search
README.md - Doctor tabs → QR scan simulation: opens scan
README.md - Patient search → Patient file view: opens patient
README.md - QR scan simulation → Patient file view: opens patient
README.md - Patient file view → Access decision: may deny access
README.md - Patient file view → Medical info entry: opens entry
README.md - Patient file view → Prescription authoring: opens authoring
README.md - Patient file view → History log: opens history
README.md - Medical info entry → Patient operations: records data
- Prescription authoring → Patient operations: records prescription
- Patient operations → In-memory data: uses demo data
README.md - Medical file → In-memory data: reads demo data
README.md - Prescriptions → In-memory data: reads demo data
README.md - Settings and sync → Language support: switches language
README.md - Settings and sync → In-memory data: shows sync state
README.md - Patient profile → Picture handling: uses pictures
README.md - Prescription authoring → Picture handling: uses pictures
README.md - App startup → Windows Flutter host: runs Flutter view
- Windows Flutter host → Windows native window: extends window
- Linux startup → Linux application host: creates application
linux/runner/main.cc