# adilououssei/myhospital-mobile architecture

> Architecture diagram of the GitHub repository adilououssei/myhospital-mobile, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adilououssei/myhospital-mobile
- Repository: https://github.com/adilououssei/myhospital-mobile

## Overview

MyHospital is a French-language mobile health app. Users can authenticate, find doctors and care facilities, book and manage consultations, and access health, profile, pharmacy, and support features. The sampled code confirms app initialization and session restoration, appointment retrieval and evaluation loading, and service calls to the backend. Several screens and service modules are present in the tree but their wiring was not sampled, so their links are omitted where uncertain.

Main entry points: [`App.tsx`](https://github.com/adilououssei/myhospital-mobile/blob/main/App.tsx) (App shell), [`app/services/api.config.ts`](https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/api.config.ts) (API client), [`app/navigation/RootNavigator.tsx`](https://github.com/adilououssei/myhospital-mobile/blob/main/app/navigation/RootNavigator.tsx) (Root navigation), [`app/components/AppointmentsScreen.tsx`](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/AppointmentsScreen.tsx) (Appointments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_app["App shell<br/>[App.tsx]"]
  node_rootnav["Root navigation<br/>[RootNavigator.tsx]"]
  node_authnav["Auth stack<br/>[AuthStack.tsx]"]
  node_tabs["Main tabs<br/>[MainTabs.tsx]"]
end

subgraph group_care["Care and appointments"]
  node_doctors["Doctor directory"]
  node_doctor["Doctor details"]
  node_booking["Booking choices"]
  node_appointments["Appointments"]
  node_video["Video consultation"]
  node_hospital["Hospitals<br/>[HospitalScreen.tsx]"]
  node_pharmacy["Pharmacies<br/>[PharmacyScreen.tsx]"]
end

subgraph group_account["Account and health"]
  node_login["Login and signup<br/>[LoginScreen.tsx]"]
  node_profile["Patient profile<br/>[ProfileScreen.tsx]"]
  node_health["Health information"]
  node_notifications["Notifications"]
end

subgraph group_services["Services and integrations"]
  node_pharmacyhook["On-call pharmacy data"]
  node_notificationcontext["Notification state"]
  node_appointmentsservice["Appointment service"]
  node_evaluationservice["Evaluation service"]
  node_authservice["Authentication service<br/>[authService.ts]"]
  node_profileservice["Profile service<br/>[profileService.ts]"]
  node_api["API client<br/>[api.config.ts]"]
  node_storage[("Local token storage<br/>[secureStorage.ts]")]
end

node_user(("Patient"))
node_backend["Health backend"]
node_localstore[("Device storage")]

node_user -->|"opens"| node_app
node_app -->|"renders"| node_rootnav
node_rootnav -->|"routes unauthenticated"| node_authnav
node_rootnav -->|"routes authenticated"| node_tabs
node_authnav -->|"shows"| node_login
node_user -->|"browses"| node_doctors
node_user -->|"manages"| node_appointments
node_user -->|"finds care"| node_hospital
node_user -->|"finds pharmacies"| node_pharmacy
node_user -->|"manages account"| node_profile
node_user -->|"views"| node_health
node_user -->|"checks"| node_notifications
node_appointments -->|"loads appointments"| node_appointmentsservice
node_appointments -->|"loads pending evaluations"| node_evaluationservice
node_notificationcontext --> node_appointmentsservice
node_app -->|"restores session"| node_storage
node_app -->|"reads saved user"| node_localstore
node_authservice -->|"sends auth requests"| node_api
node_appointmentsservice -->|"sends appointment requests"| node_api
node_profileservice -->|"sends profile requests"| node_api
node_api -->|"requests data"| node_backend
node_pharmacyhook -->|"fetches pharmacy data"| node_backend
node_pharmacyhook -->|"loads and saves favorites"| node_localstore
node_notificationcontext -->|"requests unread count"| node_backend

click node_app "https://github.com/adilououssei/myhospital-mobile/blob/main/App.tsx"
click node_rootnav "https://github.com/adilououssei/myhospital-mobile/blob/main/app/navigation/RootNavigator.tsx"
click node_authnav "https://github.com/adilououssei/myhospital-mobile/blob/main/app/navigation/AuthStack.tsx"
click node_tabs "https://github.com/adilououssei/myhospital-mobile/blob/main/app/navigation/MainTabs.tsx"
click node_login "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/LoginScreen.tsx"
click node_doctors "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/DoctorsDirectoryScreen.tsx"
click node_doctor "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/DoctorDetailScreen.tsx"
click node_booking "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/BookingTypeScreen.tsx"
click node_appointments "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/AppointmentsScreen.tsx"
click node_video "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/VideoCallScreen.tsx"
click node_hospital "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/HospitalScreen.tsx"
click node_pharmacy "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/PharmacyScreen.tsx"
click node_pharmacyhook "https://github.com/adilououssei/myhospital-mobile/blob/main/useOnCallPharmacies.ts"
click node_profile "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/ProfileScreen.tsx"
click node_health "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/HealthInfoScreen.tsx"
click node_notifications "https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/NotificationsScreen.tsx"
click node_notificationcontext "https://github.com/adilououssei/myhospital-mobile/blob/main/app/context/NotificationContext.tsx"
click node_appointmentsservice "https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/rendezvous.service.ts"
click node_evaluationservice "https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/evaluation.service.ts"
click node_authservice "https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/authService.ts"
click node_profileservice "https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/profileService.ts"
click node_api "https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/api.config.ts"
click node_storage "https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/secureStorage.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_rootnav,node_authnav,node_tabs toneBlue
class node_doctors,node_doctor,node_booking,node_appointments,node_video,node_hospital,node_pharmacy,node_localstore toneAmber
class node_login,node_profile,node_health,node_notifications toneMint
class node_pharmacyhook,node_notificationcontext,node_appointmentsservice,node_evaluationservice,node_authservice,node_profileservice,node_api,node_storage toneRose
class node_user,node_backend toneIndigo
```

## Components

### App and navigation

- [App shell](https://github.com/adilououssei/myhospital-mobile/blob/main/App.tsx): `App.tsx`
- [Root navigation](https://github.com/adilououssei/myhospital-mobile/blob/main/app/navigation/RootNavigator.tsx): `app/navigation/RootNavigator.tsx`
- [Auth stack](https://github.com/adilououssei/myhospital-mobile/blob/main/app/navigation/AuthStack.tsx): `app/navigation/AuthStack.tsx`
- [Main tabs](https://github.com/adilououssei/myhospital-mobile/blob/main/app/navigation/MainTabs.tsx): `app/navigation/MainTabs.tsx`

### Care and appointments

- [Doctor directory](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/DoctorsDirectoryScreen.tsx): `app/components/DoctorsDirectoryScreen.tsx`
- [Doctor details](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/DoctorDetailScreen.tsx): `app/components/DoctorDetailScreen.tsx`
- [Booking choices](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/BookingTypeScreen.tsx): `app/components/BookingTypeScreen.tsx`
- [Appointments](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/AppointmentsScreen.tsx): `app/components/AppointmentsScreen.tsx`
- [Video consultation](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/VideoCallScreen.tsx): `app/components/VideoCallScreen.tsx`
- [Hospitals](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/HospitalScreen.tsx): `app/components/HospitalScreen.tsx`
- [Pharmacies](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/PharmacyScreen.tsx): `app/components/PharmacyScreen.tsx`

### Account and health

- [Login and signup](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/LoginScreen.tsx): `app/components/LoginScreen.tsx`
- [Patient profile](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/ProfileScreen.tsx): `app/components/ProfileScreen.tsx`
- [Health information](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/HealthInfoScreen.tsx): `app/components/HealthInfoScreen.tsx`
- [Notifications](https://github.com/adilououssei/myhospital-mobile/blob/main/app/components/NotificationsScreen.tsx): `app/components/NotificationsScreen.tsx`

### Services and integrations

- [On-call pharmacy data](https://github.com/adilououssei/myhospital-mobile/blob/main/useOnCallPharmacies.ts): `useOnCallPharmacies.ts`
- [Notification state](https://github.com/adilououssei/myhospital-mobile/blob/main/app/context/NotificationContext.tsx): `app/context/NotificationContext.tsx`
- [Appointment service](https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/rendezvous.service.ts): `app/services/rendezvous.service.ts`
- [Evaluation service](https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/evaluation.service.ts): `app/services/evaluation.service.ts`
- [Authentication service](https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/authService.ts): `app/services/authService.ts`
- [Profile service](https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/profileService.ts): `app/services/profileService.ts`
- [API client](https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/api.config.ts): `app/services/api.config.ts`
- [Local token storage](https://github.com/adilououssei/myhospital-mobile/blob/main/app/services/secureStorage.ts): `app/services/secureStorage.ts`

### Other components

- **Patient**
- **Health backend**
- **Device storage**

## Connections

- Patient → App shell: opens
- App shell → Root navigation: renders
- Root navigation → Auth stack: routes unauthenticated
- Root navigation → Main tabs: routes authenticated
- Auth stack → Login and signup: shows
- Patient → Doctor directory: browses
- Patient → Appointments: manages
- Patient → Hospitals: finds care
- Patient → Pharmacies: finds pharmacies
- Patient → Patient profile: manages account
- Patient → Health information: views
- Patient → Notifications: checks
- Appointments → Appointment service: loads appointments
- Appointments → Evaluation service: loads pending evaluations
- Notification state → Appointment service
- App shell → Local token storage: restores session
- App shell → Device storage: reads saved user
- Authentication service → API client: sends auth requests
- Appointment service → API client: sends appointment requests
- Profile service → API client: sends profile requests
- API client → Health backend: requests data
- On-call pharmacy data → Health backend: fetches pharmacy data
- On-call pharmacy data → Device storage: loads and saves favorites
- Notification state → Health backend: requests unread count
