# worldhealthorganization/app architecture

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

- Interactive diagram: https://gitdiagram.com/worldhealthorganization/app
- Repository: https://github.com/worldhealthorganization/app

## Overview

This repository is the WHO COVID-19 mobile app and its supporting service. Users complete onboarding, browse health guidance, news and statistics, and can use a symptom checker; the client also manages country settings and notification preferences. The sampled server handles client settings and case-stat queries, maintains notification subscriptions, and refreshes stored statistics from WHO data. The README is brief, so detailed client features are supported by the source tree and content-bundle names rather than sampled Dart implementation; edges for those paths are omitted where call relationships are not shown.

Main entry points: [`client/lib/main.dart`](https://github.com/worldhealthorganization/app/blob/master/client/lib/main.dart) (Flutter app), [`server/appengine/src/main/java/who/WhoServiceImpl.java`](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/WhoServiceImpl.java) (RPC service), [`server/appengine/src/main/java/who/NotificationsManager.java`](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/NotificationsManager.java) (Subscription manager), [`server/appengine/src/main/java/who/Client.java`](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/Client.java) (Client record)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_app["Flutter app<br/>[main.dart]"]
  node_onboard["Onboarding"]
  node_home["Home and learn"]
  node_guidance["Health guidance"]
  node_symptoms["Symptom checker"]
  node_content["Bundled content"]
end

subgraph group_clientdata["Client data"]
  node_api["WHO service API<br/>[who_service.dart]"]
  node_prefs["Preferences"]
  node_contentload["Content loading"]
  node_rpc["RPC schema<br/>[who.proto]"]
end

subgraph group_service["App service"]
  node_backend["RPC service"]
  node_routing["Servlet routing"]
  node_interceptor["Client identity"]
  node_clientrecord[("Client record<br/>[Client.java]")]
  node_environment["Environment config<br/>[Environment.java]"]
end

subgraph group_statistics["Case statistics"]
  node_refresh["Stats refresh"]
  node_who["WHO data source"]
  node_statsstore[("Stats store")]
  node_cloudstats["Case stats function<br/>[index.ts]"]
end

subgraph group_notifications["Notifications"]
  node_notifications["Subscription manager"]
  node_topics["Topic rules<br/>[Topics.java]"]
  node_fcm["Firebase messaging"]
  node_firebasehook["Settings trigger<br/>[index.ts]"]
end

node_user(("App user"))

node_user -->|"uses"| node_app
node_app -.->|"offers"| node_onboard
node_app -.->|"offers"| node_home
node_app -.->|"offers"| node_guidance
node_app -.->|"offers"| node_symptoms
node_guidance -.->|"uses"| node_content
node_api -.->|"implements"| node_rpc
node_api -.->|"calls"| node_backend
node_prefs -.->|"updates settings"| node_api
node_contentload -.->|"loads"| node_content
node_routing -->|"routes RPC"| node_backend
node_routing -->|"routes cron"| node_refresh
node_interceptor -->|"loads or creates"| node_clientrecord
node_backend -->|"loads current"| node_clientrecord
node_backend -->|"updates subscriptions"| node_notifications
node_notifications -->|"gets topics"| node_topics
node_notifications -->|"subscribes devices"| node_fcm
node_notifications -->|"saves updates"| node_clientrecord
node_backend -->|"loads stats"| node_statsstore
node_refresh -->|"fetches reports"| node_who
node_refresh -->|"saves statistics"| node_statsstore
node_cloudstats -->|"serves static stats"| node_cloudstats
node_firebasehook -->|"watches writes"| node_clientrecord
node_firebasehook -.->|"planned registration"| node_fcm

click node_app "https://github.com/worldhealthorganization/app/blob/master/client/lib/main.dart"
click node_onboard "https://github.com/worldhealthorganization/app/tree/master/client/lib/pages/onboarding"
click node_home "https://github.com/worldhealthorganization/app/tree/master/client/lib/pages/main_pages"
click node_guidance "https://github.com/worldhealthorganization/app/tree/master/client/lib/pages"
click node_symptoms "https://github.com/worldhealthorganization/app/tree/master/client/lib/pages/symptom_checker"
click node_content "https://github.com/worldhealthorganization/app/tree/master/client/assets/content_bundles"
click node_api "https://github.com/worldhealthorganization/app/blob/master/client/lib/api/who_service.dart"
click node_prefs "https://github.com/worldhealthorganization/app/blob/master/client/lib/api/user_preferences.dart"
click node_contentload "https://github.com/worldhealthorganization/app/blob/master/client/lib/api/content/content_loading.dart"
click node_rpc "https://github.com/worldhealthorganization/app/blob/master/api/who/who.proto"
click node_backend "https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/WhoServiceImpl.java"
click node_routing "https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/WhoServletModule.java"
click node_interceptor "https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/ClientInterceptor.java"
click node_clientrecord "https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/Client.java"
click node_environment "https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/Environment.java"
click node_refresh "https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/RefreshCaseStatsServlet.java"
click node_statsstore "https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/StoredCaseStats.java"
click node_cloudstats "https://github.com/worldhealthorganization/app/blob/master/server/functions/src/index.ts"
click node_notifications "https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/NotificationsManager.java"
click node_topics "https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/Topics.java"
click node_firebasehook "https://github.com/worldhealthorganization/app/blob/master/server/functions/src/index.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_onboard,node_home,node_guidance,node_symptoms,node_content,node_user toneBlue
class node_api,node_prefs,node_contentload,node_rpc toneAmber
class node_backend,node_routing,node_interceptor,node_clientrecord,node_environment toneMint
class node_refresh,node_who,node_statsstore,node_cloudstats toneRose
class node_notifications,node_topics,node_fcm,node_firebasehook toneIndigo
```

## Components

### Mobile app

- [Flutter app](https://github.com/worldhealthorganization/app/blob/master/client/lib/main.dart): `client/lib/main.dart`
- [Onboarding](https://github.com/worldhealthorganization/app/tree/master/client/lib/pages/onboarding): `client/lib/pages/onboarding`
- [Home and learn](https://github.com/worldhealthorganization/app/tree/master/client/lib/pages/main_pages): `client/lib/pages/main_pages`
- [Health guidance](https://github.com/worldhealthorganization/app/tree/master/client/lib/pages): `client/lib/pages`
- [Symptom checker](https://github.com/worldhealthorganization/app/tree/master/client/lib/pages/symptom_checker): `client/lib/pages/symptom_checker`
- [Bundled content](https://github.com/worldhealthorganization/app/tree/master/client/assets/content_bundles): `client/assets/content_bundles`

### Client data

- [WHO service API](https://github.com/worldhealthorganization/app/blob/master/client/lib/api/who_service.dart): `client/lib/api/who_service.dart`
- [Preferences](https://github.com/worldhealthorganization/app/blob/master/client/lib/api/user_preferences.dart): `client/lib/api/user_preferences.dart`
- [Content loading](https://github.com/worldhealthorganization/app/blob/master/client/lib/api/content/content_loading.dart): `client/lib/api/content/content_loading.dart`
- [RPC schema](https://github.com/worldhealthorganization/app/blob/master/api/who/who.proto): `api/who/who.proto`

### App service

- [RPC service](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/WhoServiceImpl.java): `server/appengine/src/main/java/who/WhoServiceImpl.java`
- [Servlet routing](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/WhoServletModule.java): `server/appengine/src/main/java/who/WhoServletModule.java`
- [Client identity](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/ClientInterceptor.java): `server/appengine/src/main/java/who/ClientInterceptor.java`
- [Client record](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/Client.java): `server/appengine/src/main/java/who/Client.java`
- [Environment config](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/Environment.java): `server/appengine/src/main/java/who/Environment.java`

### Case statistics

- [Stats refresh](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/RefreshCaseStatsServlet.java): `server/appengine/src/main/java/who/RefreshCaseStatsServlet.java`
- **WHO data source**
- [Stats store](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/StoredCaseStats.java): `server/appengine/src/main/java/who/StoredCaseStats.java`
- [Case stats function](https://github.com/worldhealthorganization/app/blob/master/server/functions/src/index.ts): `server/functions/src/index.ts`

### Notifications

- [Subscription manager](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/NotificationsManager.java): `server/appengine/src/main/java/who/NotificationsManager.java`
- [Topic rules](https://github.com/worldhealthorganization/app/blob/master/server/appengine/src/main/java/who/Topics.java): `server/appengine/src/main/java/who/Topics.java`
- **Firebase messaging**
- [Settings trigger](https://github.com/worldhealthorganization/app/blob/master/server/functions/src/index.ts): `server/functions/src/index.ts`

### Other components

- **App user**

## Connections

- App user → Flutter app: uses
- Flutter app → Onboarding: offers
- Flutter app → Home and learn: offers
- Flutter app → Health guidance: offers
- Flutter app → Symptom checker: offers
- Health guidance → Bundled content: uses
- WHO service API → RPC schema: implements
- WHO service API → RPC service: calls
- Preferences → WHO service API: updates settings
- Content loading → Bundled content: loads
- Servlet routing → RPC service: routes RPC (evidence: `server/appengine/src/main/java/who/WhoServletModule.java`)
- Servlet routing → Stats refresh: routes cron (evidence: `server/appengine/src/main/java/who/WhoServletModule.java`)
- Client identity → Client record: loads or creates (evidence: `server/appengine/src/main/java/who/ClientInterceptor.java`)
- RPC service → Client record: loads current (evidence: `server/appengine/src/main/java/who/WhoServiceImpl.java`)
- RPC service → Subscription manager: updates subscriptions (evidence: `server/appengine/src/main/java/who/WhoServiceImpl.java`)
- Subscription manager → Topic rules: gets topics (evidence: `server/appengine/src/main/java/who/NotificationsManager.java`)
- Subscription manager → Firebase messaging: subscribes devices (evidence: `server/appengine/src/main/java/who/NotificationsManager.java`)
- Subscription manager → Client record: saves updates (evidence: `server/appengine/src/main/java/who/NotificationsManager.java`)
- RPC service → Stats store: loads stats (evidence: `server/appengine/src/main/java/who/WhoServiceImpl.java`)
- Stats refresh → WHO data source: fetches reports (evidence: `server/appengine/src/main/java/who/RefreshCaseStatsServlet.java`)
- Stats refresh → Stats store: saves statistics (evidence: `server/appengine/src/main/java/who/RefreshCaseStatsServlet.java`)
- Case stats function → Case stats function: serves static stats (evidence: `server/functions/src/index.ts`)
- Settings trigger → Client record: watches writes (evidence: `server/functions/src/index.ts`)
- Settings trigger → Firebase messaging: planned registration
