# yvesdylane/worldtime-app architecture

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

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

## Overview

World Time is a Flutter app for choosing a city and viewing its current local time and day/night state. The documented user flow runs from app navigation through a loading screen to time retrieval and display; users can return to location selection to update the displayed city. The README describes these capabilities, while the sampled source primarily covers native desktop launch code, so the app-flow edges cite the README and the platform-shell connections cite only visible imports or calls.

Main entry points: [`lib/pages/loading.dart`](https://github.com/yvesdylane/worldtime-app/blob/main/lib/pages/loading.dart) (Loading screen), [`lib/main.dart`](https://github.com/yvesdylane/worldtime-app/blob/main/lib/main.dart) (App entry), [`lib/services/world_time.dart`](https://github.com/yvesdylane/worldtime-app/blob/main/lib/services/world_time.dart) (Time service), [`lib/pages/home.dart`](https://github.com/yvesdylane/worldtime-app/blob/main/lib/pages/home.dart) (Time display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App workflow"]
  node_app_entry["App entry<br/>[main.dart]"]
  node_loading["Loading screen<br/>[loading.dart]"]
  node_time_service["Time service<br/>[world_time.dart]"]
  node_home["Time display<br/>[home.dart]"]
  node_locations["Location choices"]
end

subgraph group_hosts["Platform hosts"]
  node_linux_host["Linux host<br/>[my_application.cc]"]
  node_linux_plugins["Linux plugin registry"]
  node_windows_entry["Windows entry<br/>[main.cpp]"]
  node_windows_flutter["Windows Flutter window<br/>[flutter_window.cpp]"]
  node_windows_base["Windows window base<br/>[win32_window.cpp]"]
  node_windows_plugins["Windows plugin registry"]
  node_ios_host["iOS host<br/>[AppDelegate.swift]"]
  node_macos_plugins["macOS plugin registry"]
end

node_user(("User"))
node_time_api["Time API"]

node_user -->|"opens app"| node_app_entry
node_app_entry -->|"routes to"| node_loading
node_loading -->|"fetches time"| node_time_service
node_time_service -->|"requests time"| node_time_api
node_time_service -->|"returns time"| node_loading
node_app_entry -->|"routes to"| node_home
node_home -->|"offers update"| node_locations
node_locations -->|"updates location"| node_loading
node_linux_host -->|"registers plugins"| node_linux_plugins
node_windows_entry -->|"creates window"| node_windows_flutter
node_windows_flutter -->|"extends window"| node_windows_base
node_ios_host -->|"imports registrant"| node_macos_plugins

click node_app_entry "https://github.com/yvesdylane/worldtime-app/blob/main/lib/main.dart"
click node_loading "https://github.com/yvesdylane/worldtime-app/blob/main/lib/pages/loading.dart"
click node_time_service "https://github.com/yvesdylane/worldtime-app/blob/main/lib/services/world_time.dart"
click node_home "https://github.com/yvesdylane/worldtime-app/blob/main/lib/pages/home.dart"
click node_locations "https://github.com/yvesdylane/worldtime-app/blob/main/lib/pages/choice_location.dart"
click node_linux_host "https://github.com/yvesdylane/worldtime-app/blob/main/linux/my_application.cc"
click node_linux_plugins "https://github.com/yvesdylane/worldtime-app/blob/main/linux/flutter/generated_plugin_registrant.h"
click node_windows_entry "https://github.com/yvesdylane/worldtime-app/blob/main/windows/runner/main.cpp"
click node_windows_flutter "https://github.com/yvesdylane/worldtime-app/blob/main/windows/runner/flutter_window.cpp"
click node_windows_base "https://github.com/yvesdylane/worldtime-app/blob/main/windows/runner/win32_window.cpp"
click node_windows_plugins "https://github.com/yvesdylane/worldtime-app/blob/main/windows/flutter/generated_plugin_registrant.h"
click node_ios_host "https://github.com/yvesdylane/worldtime-app/blob/main/ios/Runner/AppDelegate.swift"
click node_macos_plugins "https://github.com/yvesdylane/worldtime-app/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift"

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_entry,node_loading,node_time_service,node_home,node_locations,node_user toneBlue
class node_linux_host,node_linux_plugins,node_windows_entry,node_windows_flutter,node_windows_base,node_windows_plugins,node_ios_host,node_macos_plugins toneAmber
class node_time_api toneMint
```

## Components

### App workflow

- [App entry](https://github.com/yvesdylane/worldtime-app/blob/main/lib/main.dart): `lib/main.dart`
- [Loading screen](https://github.com/yvesdylane/worldtime-app/blob/main/lib/pages/loading.dart): `lib/pages/loading.dart`
- [Time service](https://github.com/yvesdylane/worldtime-app/blob/main/lib/services/world_time.dart): `lib/services/world_time.dart`
- [Time display](https://github.com/yvesdylane/worldtime-app/blob/main/lib/pages/home.dart): `lib/pages/home.dart`
- [Location choices](https://github.com/yvesdylane/worldtime-app/blob/main/lib/pages/choice_location.dart): `lib/pages/choice_location.dart`

### Platform hosts

- [Linux host](https://github.com/yvesdylane/worldtime-app/blob/main/linux/my_application.cc): `linux/my_application.cc`
- [Linux plugin registry](https://github.com/yvesdylane/worldtime-app/blob/main/linux/flutter/generated_plugin_registrant.h): `linux/flutter/generated_plugin_registrant.h`
- [Windows entry](https://github.com/yvesdylane/worldtime-app/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Windows Flutter window](https://github.com/yvesdylane/worldtime-app/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Windows window base](https://github.com/yvesdylane/worldtime-app/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`
- [Windows plugin registry](https://github.com/yvesdylane/worldtime-app/blob/main/windows/flutter/generated_plugin_registrant.h): `windows/flutter/generated_plugin_registrant.h`
- [iOS host](https://github.com/yvesdylane/worldtime-app/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [macOS plugin registry](https://github.com/yvesdylane/worldtime-app/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift): `macos/Flutter/GeneratedPluginRegistrant.swift`

### Other components

- **User**
- **Time API**

## Connections

- User → App entry: opens app (evidence: `README.md`)
- App entry → Loading screen: routes to (evidence: `README.md`)
- Loading screen → Time service: fetches time (evidence: `README.md`)
- Time service → Time API: requests time (evidence: `README.md`)
- Time service → Loading screen: returns time (evidence: `README.md`)
- App entry → Time display: routes to (evidence: `README.md`)
- Time display → Location choices: offers update (evidence: `README.md`)
- Location choices → Loading screen: updates location (evidence: `README.md`)
- Linux host → Linux plugin registry: registers plugins (evidence: `linux/my_application.cc`)
- Windows entry → Windows Flutter window: creates window (evidence: `windows/runner/main.cpp`)
- Windows Flutter window → Windows window base: extends window
- iOS host → macOS plugin registry: imports registrant (evidence: `ios/Runner/AppDelegate.swift`)
