# fahrikhalid/pokedex architecture

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

- Interactive diagram: https://gitdiagram.com/fahrikhalid/pokedex
- Repository: https://github.com/fahrikhalid/pokedex

## Overview

This is a Flutter Pokedex application. Its apparent user workflow is browsing the Pokémon list, opening a Pokémon detail view, and exploring its information and evolution; the tree also shows API-service and model layers. Dart sources were not excerpted and the README describes only a starter Flutter project, so those relationships are shown as unverified. The available excerpts support the Linux and Windows native-host relationships, but do not establish Dart-level calls or API behavior.

Main entry points: [`lib/modules/pokedex/screens/index.dart`](https://github.com/fahrikhalid/pokedex/blob/main/lib/modules/pokedex/screens/index.dart) (Pokédex list), [`lib/modules/pokedex/screens/detail.dart`](https://github.com/fahrikhalid/pokedex/blob/main/lib/modules/pokedex/screens/detail.dart) (Pokémon detail), [`lib/Services/pokemon_service.dart`](https://github.com/fahrikhalid/pokedex/blob/main/lib/Services/pokemon_service.dart) (Pokémon service), [`linux/my_application.cc`](https://github.com/fahrikhalid/pokedex/blob/main/linux/my_application.cc) (Linux Flutter host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Pokedex experience"]
  node_entry["Flutter entry<br/>[main.dart]"]
  node_routes["App routes<br/>[app_pages.dart]"]
  node_home["Home screen<br/>[index.dart]"]
  node_pokedex["Pokédex list<br/>[index.dart]"]
  node_detail["Pokémon detail<br/>[detail.dart]"]
  node_detail_views["Detail sections"]
end

subgraph group_domain["Data and domain"]
  node_controllers["Pokédex controllers"]
  node_service["Pokémon service"]
  node_models["Pokémon models"]
end

subgraph group_platform["Native platform hosts"]
  node_linux_entry["Linux launcher<br/>[main.cc]"]
  node_linux_host["Linux Flutter host<br/>[my_application.cc]"]
  node_linux_app_header["Linux app declaration<br/>[my_application.h]"]
  node_linux_plugins["Linux plugin registry"]
  node_windows_entry["Windows launcher<br/>[main.cpp]"]
  node_windows_flutter["Windows Flutter window<br/>[flutter_window.h]"]
  node_windows_host["Windows window base<br/>[win32_window.h]"]
  node_windows_window_impl["Windows window handling<br/>[win32_window.cpp]"]
  node_windows_plugins["Windows plugin registry"]
  node_mac_plugins["macOS plugin registry"]
end

node_user(("App user"))
node_api{{"Pokémon API"}}

node_user -.->|"opens"| node_entry
node_entry -.->|"starts"| node_routes
node_routes -.->|"routes to"| node_home
node_home -.->|"opens list"| node_pokedex
node_pokedex -.->|"opens detail"| node_detail
node_detail -.->|"shows sections"| node_detail_views
node_pokedex -.->|"uses"| node_controllers
node_detail -.->|"uses"| node_controllers
node_controllers -.->|"requests data"| node_service
node_service -.->|"fetches from"| node_api
node_service -.->|"decodes to"| node_models
node_linux_entry -->|"creates app"| node_linux_host
node_linux_host -->|"implements"| node_linux_app_header
node_linux_host -->|"includes registry"| node_linux_plugins
node_windows_entry -->|"creates window"| node_windows_flutter
node_windows_flutter -->|"extends"| node_windows_host
node_windows_window_impl -->|"implements"| node_windows_host
node_mac_plugins -.->|"registers plugins"| node_mac_plugins

click node_entry "https://github.com/fahrikhalid/pokedex/blob/main/lib/main.dart"
click node_routes "https://github.com/fahrikhalid/pokedex/blob/main/lib/routes/app_pages.dart"
click node_home "https://github.com/fahrikhalid/pokedex/blob/main/lib/modules/home/screen/index.dart"
click node_pokedex "https://github.com/fahrikhalid/pokedex/blob/main/lib/modules/pokedex/screens/index.dart"
click node_detail "https://github.com/fahrikhalid/pokedex/blob/main/lib/modules/pokedex/screens/detail.dart"
click node_detail_views "https://github.com/fahrikhalid/pokedex/tree/main/lib/modules/pokedex/components"
click node_controllers "https://github.com/fahrikhalid/pokedex/tree/main/lib/controllers/pokedex"
click node_service "https://github.com/fahrikhalid/pokedex/blob/main/lib/Services/pokemon_service.dart"
click node_models "https://github.com/fahrikhalid/pokedex/tree/main/lib/models"
click node_linux_entry "https://github.com/fahrikhalid/pokedex/blob/main/linux/main.cc"
click node_linux_host "https://github.com/fahrikhalid/pokedex/blob/main/linux/my_application.cc"
click node_linux_app_header "https://github.com/fahrikhalid/pokedex/blob/main/linux/my_application.h"
click node_linux_plugins "https://github.com/fahrikhalid/pokedex/blob/main/linux/flutter/generated_plugin_registrant.h"
click node_windows_entry "https://github.com/fahrikhalid/pokedex/blob/main/windows/runner/main.cpp"
click node_windows_flutter "https://github.com/fahrikhalid/pokedex/blob/main/windows/runner/flutter_window.h"
click node_windows_host "https://github.com/fahrikhalid/pokedex/blob/main/windows/runner/win32_window.h"
click node_windows_window_impl "https://github.com/fahrikhalid/pokedex/blob/main/windows/runner/win32_window.cpp"
click node_windows_plugins "https://github.com/fahrikhalid/pokedex/blob/main/windows/flutter/generated_plugin_registrant.h"
click node_mac_plugins "https://github.com/fahrikhalid/pokedex/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_entry,node_routes,node_home,node_pokedex,node_detail,node_detail_views,node_user toneBlue
class node_controllers,node_service,node_models toneAmber
class node_linux_entry,node_linux_host,node_linux_app_header,node_linux_plugins,node_windows_entry,node_windows_flutter,node_windows_host,node_windows_window_impl,node_windows_plugins,node_mac_plugins,node_api toneMint
```

## Components

### Pokedex experience

- [Flutter entry](https://github.com/fahrikhalid/pokedex/blob/main/lib/main.dart): `lib/main.dart`
- [App routes](https://github.com/fahrikhalid/pokedex/blob/main/lib/routes/app_pages.dart): `lib/routes/app_pages.dart`
- [Home screen](https://github.com/fahrikhalid/pokedex/blob/main/lib/modules/home/screen/index.dart): `lib/modules/home/screen/index.dart`
- [Pokédex list](https://github.com/fahrikhalid/pokedex/blob/main/lib/modules/pokedex/screens/index.dart): `lib/modules/pokedex/screens/index.dart`
- [Pokémon detail](https://github.com/fahrikhalid/pokedex/blob/main/lib/modules/pokedex/screens/detail.dart): `lib/modules/pokedex/screens/detail.dart`
- [Detail sections](https://github.com/fahrikhalid/pokedex/tree/main/lib/modules/pokedex/components): `lib/modules/pokedex/components`

### Data and domain

- [Pokédex controllers](https://github.com/fahrikhalid/pokedex/tree/main/lib/controllers/pokedex): `lib/controllers/pokedex`
- [Pokémon service](https://github.com/fahrikhalid/pokedex/blob/main/lib/Services/pokemon_service.dart): `lib/Services/pokemon_service.dart`
- [Pokémon models](https://github.com/fahrikhalid/pokedex/tree/main/lib/models): `lib/models`

### Native platform hosts

- [Linux launcher](https://github.com/fahrikhalid/pokedex/blob/main/linux/main.cc): `linux/main.cc`
- [Linux Flutter host](https://github.com/fahrikhalid/pokedex/blob/main/linux/my_application.cc): `linux/my_application.cc`
- [Linux app declaration](https://github.com/fahrikhalid/pokedex/blob/main/linux/my_application.h): `linux/my_application.h`
- [Linux plugin registry](https://github.com/fahrikhalid/pokedex/blob/main/linux/flutter/generated_plugin_registrant.h): `linux/flutter/generated_plugin_registrant.h`
- [Windows launcher](https://github.com/fahrikhalid/pokedex/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Windows Flutter window](https://github.com/fahrikhalid/pokedex/blob/main/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Windows window base](https://github.com/fahrikhalid/pokedex/blob/main/windows/runner/win32_window.h): `windows/runner/win32_window.h`
- [Windows window handling](https://github.com/fahrikhalid/pokedex/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`
- [Windows plugin registry](https://github.com/fahrikhalid/pokedex/blob/main/windows/flutter/generated_plugin_registrant.h): `windows/flutter/generated_plugin_registrant.h`
- [macOS plugin registry](https://github.com/fahrikhalid/pokedex/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift): `macos/Flutter/GeneratedPluginRegistrant.swift`

### Other components

- **App user**
- **Pokémon API**

## Connections

- App user → Flutter entry: opens
- Flutter entry → App routes: starts
- App routes → Home screen: routes to
- Home screen → Pokédex list: opens list
- Pokédex list → Pokémon detail: opens detail
- Pokémon detail → Detail sections: shows sections
- Pokédex list → Pokédex controllers: uses
- Pokémon detail → Pokédex controllers: uses
- Pokédex controllers → Pokémon service: requests data
- Pokémon service → Pokémon API: fetches from
- Pokémon service → Pokémon models: decodes to
- Linux launcher → Linux Flutter host: creates app (evidence: `linux/main.cc`)
- Linux Flutter host → Linux app declaration: implements (evidence: `linux/my_application.cc`)
- Linux Flutter host → Linux plugin registry: includes registry (evidence: `linux/my_application.cc`)
- Windows launcher → Windows Flutter window: creates window (evidence: `windows/runner/main.cpp`)
- Windows Flutter window → Windows window base: extends (evidence: `windows/runner/flutter_window.h`)
- Windows window handling → Windows window base: implements (evidence: `windows/runner/win32_window.cpp`)
- macOS plugin registry → macOS plugin registry: registers plugins (evidence: `macos/Flutter/GeneratedPluginRegistrant.swift`)
