# qldwj/my architecture

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

- Interactive diagram: https://gitdiagram.com/qldwj/my
- Repository: https://github.com/qldwj/my

## Overview

Kazumi is a Flutter anime discovery and viewing app. Users browse Bangumi titles, inspect a title and its sources, select an episode, and watch with playback controls and danmaku; collections, history, and downloads support ongoing viewing. The README also documents comments, related works, image search, plugins, social features, and settings, so these appear as separate product branches. Dart implementation details were not excerpted; those links are limited to README-documented relationships. Desktop native components reflect the sampled runner code and SOURCE INDEX.

Main entry points: [`lib/pages/index_page.dart`](https://github.com/qldwj/my/blob/main/lib/pages/index_page.dart) (Browse titles), [`windows/runner/flutter_window.cpp`](https://github.com/qldwj/my/blob/main/windows/runner/flutter_window.cpp) (Windows host), [`lib/pages/info/source_sheet.dart`](https://github.com/qldwj/my/blob/main/lib/pages/info/source_sheet.dart) (Source selection), [`lib/pages/info`](https://github.com/qldwj/my/tree/main/lib/pages/info) (Title details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Anime discovery"]
  node_discovery["Browse titles<br/>[index_page.dart]"]
  node_bangumi["Bangumi catalog<br/>[bangumi_api.dart]"]
  node_search["Title search"]
  node_image_search["Image search"]
  node_details["Title details"]
  node_related["Related works"]
end

subgraph group_viewing["Viewing"]
  node_source_select["Source selection<br/>[source_sheet.dart]"]
  node_player["Video player"]
  node_danmaku["Danmaku"]
end

subgraph group_library["Library and offline"]
  node_collections["Collections"]
  node_history["Watch history"]
  node_downloads["Offline downloads"]
end

subgraph group_community["Community and plugins"]
  node_plugins["Rule plugins"]
  node_comments["Comments"]
  node_social["Social features"]
end

subgraph group_runtime["App runtime"]
  node_settings["App settings"]
  node_flutter_app["Flutter application<br/>[main.dart]"]
  node_desktop_window["Windows host<br/>[flutter_window.cpp]"]
  node_win32_window["Win32 window<br/>[win32_window.h]"]
  node_external_player["External player"]
  node_linux_app["Linux host<br/>[my_application.cc]"]
  node_linux_portal["Player portal"]
end

node_viewer(("Viewer"))

node_viewer -->|"browses"| node_discovery
node_discovery -->|"loads catalog"| node_bangumi
node_viewer -->|"searches titles"| node_search
node_viewer -->|"searches by image"| node_image_search
node_discovery -.->|"opens title"| node_details
node_details -->|"shows related"| node_related
node_viewer -->|"chooses source"| node_source_select
node_plugins -->|"provides rules"| node_source_select
node_source_select -->|"starts playback"| node_player
node_player -->|"displays danmaku"| node_danmaku
node_viewer -->|"comments on titles"| node_comments
node_viewer -->|"manages collection"| node_collections
node_viewer -->|"resumes viewing"| node_history
node_viewer -->|"downloads episodes"| node_downloads
node_viewer -->|"uses friend features"| node_social
node_viewer -->|"configures app"| node_settings
node_flutter_app -.->|"runs within"| node_desktop_window
node_desktop_window -->|"inherits window"| node_win32_window
node_desktop_window -->|"opens external player"| node_external_player
node_linux_app -->|"uses player portal"| node_linux_portal

click node_discovery "https://github.com/qldwj/my/blob/main/lib/pages/index_page.dart"
click node_bangumi "https://github.com/qldwj/my/blob/main/lib/request/apis/bangumi_api.dart"
click node_search "https://github.com/qldwj/my/tree/main/lib/pages/search"
click node_image_search "https://github.com/qldwj/my/blob/main/lib/pages/search/image_search_page.dart"
click node_details "https://github.com/qldwj/my/tree/main/lib/pages/info"
click node_related "https://github.com/qldwj/my/blob/main/lib/modules/bangumi/bangumi_relation.dart"
click node_source_select "https://github.com/qldwj/my/blob/main/lib/pages/info/source_sheet.dart"
click node_plugins "https://github.com/qldwj/my/tree/main/lib/plugins"
click node_player "https://github.com/qldwj/my/blob/main/lib/pages/player/player_controller.dart"
click node_danmaku "https://github.com/qldwj/my/blob/main/lib/modules/danmaku/danmaku_module.dart"
click node_comments "https://github.com/qldwj/my/blob/main/lib/pages/info/info_comments_view.dart"
click node_collections "https://github.com/qldwj/my/tree/main/lib/pages/collect"
click node_history "https://github.com/qldwj/my/tree/main/lib/pages/history"
click node_downloads "https://github.com/qldwj/my/tree/main/lib/pages/download"
click node_social "https://github.com/qldwj/my/tree/main/lib/pages/my"
click node_settings "https://github.com/qldwj/my/tree/main/lib/pages/settings"
click node_flutter_app "https://github.com/qldwj/my/blob/main/lib/main.dart"
click node_desktop_window "https://github.com/qldwj/my/blob/main/windows/runner/flutter_window.cpp"
click node_win32_window "https://github.com/qldwj/my/blob/main/windows/runner/win32_window.h"
click node_external_player "https://github.com/qldwj/my/blob/main/windows/runner/external_player_utils.cpp"
click node_linux_app "https://github.com/qldwj/my/blob/main/linux/my_application.cc"
click node_linux_portal "https://github.com/qldwj/my/blob/main/linux/external_player_portal.cc"

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_discovery,node_bangumi,node_search,node_image_search,node_details,node_related,node_viewer toneBlue
class node_source_select,node_player,node_danmaku toneAmber
class node_collections,node_history,node_downloads toneMint
class node_plugins,node_comments,node_social toneRose
class node_settings,node_flutter_app,node_desktop_window,node_win32_window,node_external_player,node_linux_app,node_linux_portal toneIndigo
```

## Components

### Anime discovery

- [Browse titles](https://github.com/qldwj/my/blob/main/lib/pages/index_page.dart): `lib/pages/index_page.dart`
- [Bangumi catalog](https://github.com/qldwj/my/blob/main/lib/request/apis/bangumi_api.dart): `lib/request/apis/bangumi_api.dart`
- [Title search](https://github.com/qldwj/my/tree/main/lib/pages/search): `lib/pages/search`
- [Image search](https://github.com/qldwj/my/blob/main/lib/pages/search/image_search_page.dart): `lib/pages/search/image_search_page.dart`
- [Title details](https://github.com/qldwj/my/tree/main/lib/pages/info): `lib/pages/info`
- [Related works](https://github.com/qldwj/my/blob/main/lib/modules/bangumi/bangumi_relation.dart): `lib/modules/bangumi/bangumi_relation.dart`

### Viewing

- [Source selection](https://github.com/qldwj/my/blob/main/lib/pages/info/source_sheet.dart): `lib/pages/info/source_sheet.dart`
- [Video player](https://github.com/qldwj/my/blob/main/lib/pages/player/player_controller.dart): `lib/pages/player/player_controller.dart`
- [Danmaku](https://github.com/qldwj/my/blob/main/lib/modules/danmaku/danmaku_module.dart): `lib/modules/danmaku/danmaku_module.dart`

### Library and offline

- [Collections](https://github.com/qldwj/my/tree/main/lib/pages/collect): `lib/pages/collect`
- [Watch history](https://github.com/qldwj/my/tree/main/lib/pages/history): `lib/pages/history`
- [Offline downloads](https://github.com/qldwj/my/tree/main/lib/pages/download): `lib/pages/download`

### Community and plugins

- [Rule plugins](https://github.com/qldwj/my/tree/main/lib/plugins): `lib/plugins`
- [Comments](https://github.com/qldwj/my/blob/main/lib/pages/info/info_comments_view.dart): `lib/pages/info/info_comments_view.dart`
- [Social features](https://github.com/qldwj/my/tree/main/lib/pages/my): `lib/pages/my`

### App runtime

- [App settings](https://github.com/qldwj/my/tree/main/lib/pages/settings): `lib/pages/settings`
- [Flutter application](https://github.com/qldwj/my/blob/main/lib/main.dart): `lib/main.dart`
- [Windows host](https://github.com/qldwj/my/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Win32 window](https://github.com/qldwj/my/blob/main/windows/runner/win32_window.h): `windows/runner/win32_window.h`
- [External player](https://github.com/qldwj/my/blob/main/windows/runner/external_player_utils.cpp): `windows/runner/external_player_utils.cpp`
- [Linux host](https://github.com/qldwj/my/blob/main/linux/my_application.cc): `linux/my_application.cc`
- [Player portal](https://github.com/qldwj/my/blob/main/linux/external_player_portal.cc): `linux/external_player_portal.cc`

### Other components

- **Viewer**

## Connections

- Viewer → Browse titles: browses (evidence: `README.md`)
- Browse titles → Bangumi catalog: loads catalog (evidence: `README.md`)
- Viewer → Title search: searches titles (evidence: `README.md`)
- Viewer → Image search: searches by image (evidence: `README.md`)
- Browse titles → Title details: opens title
- Title details → Related works: shows related (evidence: `README.md`)
- Viewer → Source selection: chooses source (evidence: `README.md`)
- Rule plugins → Source selection: provides rules (evidence: `README.md`)
- Source selection → Video player: starts playback (evidence: `README.md`)
- Video player → Danmaku: displays danmaku (evidence: `README.md`)
- Viewer → Comments: comments on titles (evidence: `README.md`)
- Viewer → Collections: manages collection (evidence: `README.md`)
- Viewer → Watch history: resumes viewing (evidence: `README.md`)
- Viewer → Offline downloads: downloads episodes (evidence: `README.md`)
- Viewer → Social features: uses friend features (evidence: `README.md`)
- Viewer → App settings: configures app (evidence: `README.md`)
- Flutter application → Windows host: runs within
- Windows host → Win32 window: inherits window
- Windows host → External player: opens external player (evidence: `windows/runner/flutter_window.cpp`)
- Linux host → Player portal: uses player portal (evidence: `linux/my_application.cc`)
