# keremkuyucu/geogame architecture

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

- Interactive diagram: https://gitdiagram.com/keremkuyucu/geogame
- Repository: https://github.com/keremkuyucu/geogame

## Overview

GeoGame is a cross-platform geography trivia game. The README documents seven game modes, localization, profiles and stats, leaderboards, Child Mode, and offline play with score synchronization. The source excerpts cover only native platform hosts, not the Flutter application internals; therefore app-level components use supported directory paths and links are limited to documented capabilities. The Windows runner is shown as platform hosting, not as game logic.

Main entry points: [`lib/screens/games`](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games) (Game modes), [`lib/main.dart`](https://github.com/keremkuyucu/geogame/blob/main/lib/main.dart) (Flutter app), [`windows/runner/flutter_window.cpp`](https://github.com/keremkuyucu/geogame/blob/main/windows/runner/flutter_window.cpp) (Flutter window host), [`lib/services/game_service.dart`](https://github.com/keremkuyucu/geogame/blob/main/lib/services/game_service.dart) (Game services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Gameplay"]
  node_app["Flutter app<br/>[main.dart]"]
  node_modes["Game modes"]
  node_coat["Coat of arms"]
  node_flags["Flag quiz"]
  node_capitals["Capital quiz"]
  node_distance["Distance game"]
  node_borderline["Borderline"]
  node_borderpath["Border Path"]
  node_findmap["Find on Map"]
end

subgraph group_community["Player features"]
  node_auth["Authentication"]
  node_profiles["Profiles and stats"]
  node_leaderboard["Leaderboard"]
  node_settings["Settings and Child Mode"]
end

subgraph group_data["Game data"]
  node_game_service["Game services<br/>[game_service.dart]"]
  node_countries["Country data<br/>[countries.dart]"]
  node_geojson["Map geometry"]
  node_translations["Translations"]
  node_offline["Offline score sync"]
end

subgraph group_platform["Platform hosting"]
  node_android_host["Android host<br/>[MainActivity.kt]"]
  node_windows_entry["Windows runner<br/>[main.cpp]"]
  node_flutter_window["Flutter window host<br/>[flutter_window.cpp]"]
  node_win32_window["Win32 window<br/>[win32_window.cpp]"]
end

node_player(("Player"))

node_player -->|"plays"| node_app
node_app -->|"offers"| node_modes
node_modes -->|"includes"| node_coat
node_modes -->|"includes"| node_flags
node_modes -->|"includes"| node_capitals
node_modes -->|"includes"| node_distance
node_modes -->|"includes"| node_borderline
node_modes -->|"includes"| node_borderpath
node_modes -->|"includes"| node_findmap
node_player -->|"views rankings"| node_leaderboard
node_player -->|"views stats"| node_profiles
node_player -->|"sets Child Mode"| node_settings
node_player -.->|"signs in"| node_auth
node_game_service -.->|"syncs scores"| node_offline
node_android_host -->|"hosts"| node_app
node_windows_entry -->|"creates"| node_flutter_window
node_flutter_window -->|"inherits"| node_win32_window

click node_app "https://github.com/keremkuyucu/geogame/blob/main/lib/main.dart"
click node_modes "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games"
click node_coat "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/coat_of_arms"
click node_flags "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/flag"
click node_capitals "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/capital"
click node_distance "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/distance"
click node_borderline "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/borderline"
click node_borderpath "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/borderpath"
click node_findmap "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/findmap"
click node_auth "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/auth"
click node_profiles "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/profiles"
click node_leaderboard "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/leaderboard"
click node_settings "https://github.com/keremkuyucu/geogame/tree/main/lib/screens/settings"
click node_game_service "https://github.com/keremkuyucu/geogame/blob/main/lib/services/game_service.dart"
click node_countries "https://github.com/keremkuyucu/geogame/blob/main/lib/models/countries.dart"
click node_geojson "https://github.com/keremkuyucu/geogame/blob/main/lib/services/geojson_service.dart"
click node_translations "https://github.com/keremkuyucu/geogame/tree/main/assets/lang"
click node_offline "https://github.com/keremkuyucu/geogame/tree/main/lib/services"
click node_android_host "https://github.com/keremkuyucu/geogame/blob/main/android/app/src/main/kotlin/com/keremkuyucu/geogame/MainActivity.kt"
click node_windows_entry "https://github.com/keremkuyucu/geogame/blob/main/windows/runner/main.cpp"
click node_flutter_window "https://github.com/keremkuyucu/geogame/blob/main/windows/runner/flutter_window.cpp"
click node_win32_window "https://github.com/keremkuyucu/geogame/blob/main/windows/runner/win32_window.cpp"

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_modes,node_coat,node_flags,node_capitals,node_distance,node_borderline,node_borderpath,node_findmap toneBlue
class node_auth,node_profiles,node_leaderboard,node_settings toneAmber
class node_game_service,node_countries,node_geojson,node_translations,node_offline toneMint
class node_android_host,node_windows_entry,node_flutter_window,node_win32_window toneRose
class node_player toneIndigo
```

## Components

### Gameplay

- [Flutter app](https://github.com/keremkuyucu/geogame/blob/main/lib/main.dart): `lib/main.dart`
- [Game modes](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games): `lib/screens/games`
- [Coat of arms](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/coat_of_arms): `lib/screens/games/coat_of_arms`
- [Flag quiz](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/flag): `lib/screens/games/flag`
- [Capital quiz](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/capital): `lib/screens/games/capital`
- [Distance game](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/distance): `lib/screens/games/distance`
- [Borderline](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/borderline): `lib/screens/games/borderline`
- [Border Path](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/borderpath): `lib/screens/games/borderpath`
- [Find on Map](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/games/findmap): `lib/screens/games/findmap`

### Player features

- [Authentication](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/auth): `lib/screens/auth`
- [Profiles and stats](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/profiles): `lib/screens/profiles`
- [Leaderboard](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/leaderboard): `lib/screens/leaderboard`
- [Settings and Child Mode](https://github.com/keremkuyucu/geogame/tree/main/lib/screens/settings): `lib/screens/settings`

### Game data

- [Game services](https://github.com/keremkuyucu/geogame/blob/main/lib/services/game_service.dart): `lib/services/game_service.dart`
- [Country data](https://github.com/keremkuyucu/geogame/blob/main/lib/models/countries.dart): `lib/models/countries.dart`
- [Map geometry](https://github.com/keremkuyucu/geogame/blob/main/lib/services/geojson_service.dart): `lib/services/geojson_service.dart`
- [Translations](https://github.com/keremkuyucu/geogame/tree/main/assets/lang): `assets/lang`
- [Offline score sync](https://github.com/keremkuyucu/geogame/tree/main/lib/services): `lib/services`

### Platform hosting

- [Android host](https://github.com/keremkuyucu/geogame/blob/main/android/app/src/main/kotlin/com/keremkuyucu/geogame/MainActivity.kt): `android/app/src/main/kotlin/com/keremkuyucu/geogame/MainActivity.kt`
- [Windows runner](https://github.com/keremkuyucu/geogame/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window host](https://github.com/keremkuyucu/geogame/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Win32 window](https://github.com/keremkuyucu/geogame/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`

### Other components

- **Player**

## Connections

- Player → Flutter app: plays (evidence: `README.md`)
- Flutter app → Game modes: offers (evidence: `README.md`)
- Game modes → Coat of arms: includes (evidence: `README.md`)
- Game modes → Flag quiz: includes (evidence: `README.md`)
- Game modes → Capital quiz: includes (evidence: `README.md`)
- Game modes → Distance game: includes (evidence: `README.md`)
- Game modes → Borderline: includes (evidence: `README.md`)
- Game modes → Border Path: includes (evidence: `README.md`)
- Game modes → Find on Map: includes (evidence: `README.md`)
- Player → Leaderboard: views rankings (evidence: `README.md`)
- Player → Profiles and stats: views stats (evidence: `README.md`)
- Player → Settings and Child Mode: sets Child Mode (evidence: `README.md`)
- Player → Authentication: signs in
- Game services → Offline score sync: syncs scores
- Android host → Flutter app: hosts (evidence: `README.md`)
- Windows runner → Flutter window host: creates (evidence: `windows/runner/main.cpp`)
- Flutter window host → Win32 window: inherits
