# loping151/xutheringwavesuid architecture

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

- Interactive diagram: https://gitdiagram.com/loping151/xutheringwavesuid
- Repository: https://github.com/loping151/xutheringwavesuid
- Video tour (about a minute): https://gitdiagram.com/loping151/xutheringwavesuid/video

## Overview

XutheringWavesUID is a multi-platform Wuthering Waves bot plugin, with an online recognition/calculation companion described in the README. Users invoke bot commands for game-data lookups, account activity, character builds, rankings, and other game utilities; the plugin fetches and transforms data and commonly returns rendered cards. It also includes a browser-based panel-image editor. The tree and README establish these capability areas, but sampled source is partial, so links between unsampled command handlers and subsystems are omitted rather than inferred.

Main entry points: [`XutheringWavesUID/utils/api/api.py`](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/api/api.py) (Game API client), [`XutheringWavesUID/wutheringwaves_charinfo/draw_char_card.py`](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_charinfo/draw_char_card.py) (Character cards), [`XutheringWavesUID/__init__.py`](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/__init__.py) (Plugin entry), [`XutheringWavesUID/wutheringwaves_resource/panel_editor/routes.py`](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_resource/panel_editor/routes.py) (Editor routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Bot interaction"]
  node_plugin["Plugin entry<br/>[__init__.py]"]
end

subgraph group_game["Game data"]
  node_account["Account login<br/>[__init__.py]"]
  node_user_data["User features<br/>[__init__.py]"]
  node_game_api["Game API client<br/>[api.py]"]
  node_account_api["API models<br/>[account.py]"]
  node_gacha["Gacha history<br/>[gacha_handler.py]"]
  node_gacha_db[("Gacha records")]
end

subgraph group_analysis["Build analysis"]
  node_damage["Damage calculation<br/>[damage.py]"]
  node_score["Echo scoring<br/>[score.py]"]
  node_ascension["Build data<br/>[model.py]"]
  node_rank["Rankings<br/>[__init__.py]"]
  node_matrix_rank["Matrix rankings<br/>[matrix_rank.py]"]
end

subgraph group_cards["Cards and reports"]
  node_character["Character cards<br/>[draw_char_card.py]"]
  node_role_info["Role information<br/>[__init__.py]"]
  node_stamina["Stamina status"]
  node_abyss["Challenge cards<br/>[__init__.py]"]
  node_calendar["Calendar<br/>[__init__.py]"]
  node_wiki["Game wiki<br/>[__init__.py]"]
end

subgraph group_tools["Web and utilities"]
  node_panel_web["Panel editor UI<br/>[app.js]"]
  node_panel_routes["Editor routes<br/>[routes.py]"]
  node_panel_storage["Image storage<br/>[storage.py]"]
  node_resource["Game resources"]
  node_database[("Plugin database<br/>[models.py]")]
end

node_user(("Bot user"))
node_framework["Bot framework"]
node_rank_service["Ranking service"]
node_game_service["Kuro game service"]

node_user -->|"sends commands"| node_framework
node_framework -->|"dispatches events"| node_plugin
node_plugin -->|"routes login"| node_account
node_plugin -->|"routes requests"| node_user_data
node_account -->|"requests account"| node_game_api
node_user_data -->|"requests game data"| node_game_api
node_game_api -->|"calls API"| node_game_service
node_game_service -->|"returns data"| node_game_api
node_game_api -->|"validates responses"| node_account_api
node_game_api -->|"supplies data"| node_character
node_game_api -->|"supplies data"| node_role_info
node_game_api -->|"supplies data"| node_stamina
node_game_api -->|"supplies data"| node_abyss
node_game_api -->|"supplies data"| node_calendar
node_game_api -->|"supplies data"| node_wiki
node_gacha -->|"stores records"| node_gacha_db
node_character -->|"calculates score"| node_score
node_character -->|"calculates damage"| node_damage
node_character -->|"uses build data"| node_ascension
node_matrix_rank -->|"submits ranking query"| node_rank_service
node_rank -.->|"uses ranking service"| node_rank_service
node_rank -->|"renders matrix ranks"| node_matrix_rank
node_panel_web -->|"calls editor API"| node_panel_routes
node_panel_routes -->|"reads and writes images"| node_panel_storage
node_panel_routes -.->|"uses plugin state"| node_database
node_resource -.->|"downloads resources"| node_game_service

click node_plugin "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/__init__.py"
click node_account "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_login/__init__.py"
click node_user_data "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_user/__init__.py"
click node_game_api "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/api/api.py"
click node_account_api "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/api/model/account.py"
click node_character "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_charinfo/draw_char_card.py"
click node_role_info "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_roleinfo/__init__.py"
click node_stamina "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_stamina/draw_waves_stamina.py"
click node_abyss "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_abyss/__init__.py"
click node_calendar "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_calendar/__init__.py"
click node_wiki "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_wiki/__init__.py"
click node_gacha "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_gachalog/gacha_handler.py"
click node_gacha_db "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/database/waves_gacha_cloud.py"
click node_damage "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/damage/damage.py"
click node_score "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/score.py"
click node_ascension "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/ascension/model.py"
click node_rank "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_rank/__init__.py"
click node_matrix_rank "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_rank/matrix_rank.py"
click node_panel_web "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_resource/panel_editor/static/app.js"
click node_panel_routes "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_resource/panel_editor/routes.py"
click node_panel_storage "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_resource/panel_editor/storage.py"
click node_resource "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/resource/download_all_resource.py"
click node_database "https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/database/models.py"

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_plugin,node_user toneBlue
class node_account,node_user_data,node_game_api,node_account_api,node_gacha,node_gacha_db toneAmber
class node_damage,node_score,node_ascension,node_rank,node_matrix_rank toneMint
class node_character,node_role_info,node_stamina,node_abyss,node_calendar,node_wiki toneRose
class node_panel_web,node_panel_routes,node_panel_storage,node_resource,node_database,node_framework,node_rank_service,node_game_service toneIndigo
```

## Components

### Bot interaction

- [Plugin entry](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/__init__.py): `XutheringWavesUID/__init__.py`

### Game data

- [Account login](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_login/__init__.py): `XutheringWavesUID/wutheringwaves_login/__init__.py`
- [User features](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_user/__init__.py): `XutheringWavesUID/wutheringwaves_user/__init__.py`
- [Game API client](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/api/api.py): `XutheringWavesUID/utils/api/api.py`
- [API models](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/api/model/account.py): `XutheringWavesUID/utils/api/model/account.py`
- [Gacha history](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_gachalog/gacha_handler.py): `XutheringWavesUID/wutheringwaves_gachalog/gacha_handler.py`
- [Gacha records](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/database/waves_gacha_cloud.py): `XutheringWavesUID/utils/database/waves_gacha_cloud.py`

### Build analysis

- [Damage calculation](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/damage/damage.py): `XutheringWavesUID/utils/damage/damage.py`
- [Echo scoring](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/score.py): `XutheringWavesUID/utils/score.py`
- [Build data](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/ascension/model.py): `XutheringWavesUID/utils/ascension/model.py`
- [Rankings](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_rank/__init__.py): `XutheringWavesUID/wutheringwaves_rank/__init__.py`
- [Matrix rankings](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_rank/matrix_rank.py): `XutheringWavesUID/wutheringwaves_rank/matrix_rank.py`

### Cards and reports

- [Character cards](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_charinfo/draw_char_card.py): `XutheringWavesUID/wutheringwaves_charinfo/draw_char_card.py`
- [Role information](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_roleinfo/__init__.py): `XutheringWavesUID/wutheringwaves_roleinfo/__init__.py`
- [Stamina status](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_stamina/draw_waves_stamina.py): `XutheringWavesUID/wutheringwaves_stamina/draw_waves_stamina.py`
- [Challenge cards](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_abyss/__init__.py): `XutheringWavesUID/wutheringwaves_abyss/__init__.py`
- [Calendar](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_calendar/__init__.py): `XutheringWavesUID/wutheringwaves_calendar/__init__.py`
- [Game wiki](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_wiki/__init__.py): `XutheringWavesUID/wutheringwaves_wiki/__init__.py`

### Web and utilities

- [Panel editor UI](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_resource/panel_editor/static/app.js): `XutheringWavesUID/wutheringwaves_resource/panel_editor/static/app.js`
- [Editor routes](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_resource/panel_editor/routes.py): `XutheringWavesUID/wutheringwaves_resource/panel_editor/routes.py`
- [Image storage](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/wutheringwaves_resource/panel_editor/storage.py): `XutheringWavesUID/wutheringwaves_resource/panel_editor/storage.py`
- [Game resources](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/resource/download_all_resource.py): `XutheringWavesUID/utils/resource/download_all_resource.py`
- [Plugin database](https://github.com/loping151/xutheringwavesuid/blob/main/XutheringWavesUID/utils/database/models.py): `XutheringWavesUID/utils/database/models.py`

### Other components

- **Bot user**
- **Bot framework**
- **Ranking service**
- **Kuro game service**

## Connections

- Bot user → Bot framework: sends commands
- Bot framework → Plugin entry: dispatches events
- Plugin entry → Account login: routes login
- Plugin entry → User features: routes requests
- Account login → Game API client: requests account
- User features → Game API client: requests game data
- Game API client → Kuro game service: calls API
- Kuro game service → Game API client: returns data
- Game API client → API models: validates responses
- Game API client → Character cards: supplies data
- Game API client → Role information: supplies data
- Game API client → Stamina status: supplies data
- Game API client → Challenge cards: supplies data
- Game API client → Calendar: supplies data
- Game API client → Game wiki: supplies data
- Gacha history → Gacha records: stores records
- Character cards → Echo scoring: calculates score
- Character cards → Damage calculation: calculates damage
- Character cards → Build data: uses build data
- Matrix rankings → Ranking service: submits ranking query
- Rankings → Ranking service: uses ranking service
- Rankings → Matrix rankings: renders matrix ranks
- Panel editor UI → Editor routes: calls editor API
- Editor routes → Image storage: reads and writes images
- Editor routes → Plugin database: uses plugin state
- Game resources → Kuro game service: downloads resources
