# jwyxym/ygopro3 architecture

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

- Interactive diagram: https://gitdiagram.com/jwyxym/ygopro3
- Repository: https://github.com/jwyxym/ygopro3

## Overview

YGOPro3 is a Yu-Gi-Oh! online dueling client built with Vue and Tauri, using the YGOPro communication standard. The main user flow starts in the app menu, where users can manage decks or cards, then enter a duel or replay; the duel connection coordinates protocol messages, the duel scene, selections, and history. Supporting branches cover game data and localization, settings, and native capabilities. The README documents cross-client online play, while the sampled sources show only parts of the runtime wiring; uncertain native integrations are left unconnected.

Main entry points: [`src/pages/duel/connect.ts`](https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/connect.ts) (Duel Coordinator), [`src/init.vue`](https://github.com/jwyxym/ygopro3/blob/main/src/init.vue) (App Shell), [`src/pages/duel/ygo-protocol/protocol.ts`](https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/ygo-protocol/protocol.ts) (YGO Protocol), [`src/script/game.ts`](https://github.com/jwyxym/ygopro3/blob/main/src/script/game.ts) (Game Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Data"]
  node_app_shell["App Shell<br/>[init.vue]"]
  node_menu["Main Menu<br/>[menu.vue]"]
  node_deck_ui["Deck Editor<br/>[deck.ts]"]
  node_card_browser["Card Browser<br/>[card_list.vue]"]
  node_search["Card Search<br/>[searcher.vue]"]
  node_settings["Settings UI<br/>[setting.vue]"]
end

subgraph group_duel["Duel Runtime"]
  node_duel_connect["Duel Coordinator<br/>[connect.ts]"]
  node_server_setup["Server Setup<br/>[server.vue]"]
  node_protocol["YGO Protocol<br/>[protocol.ts]"]
  node_network["Network Transport<br/>[network.ts]"]
  node_duel_scene["Duel Scene<br/>[scene.tsx]"]
  node_client_card["Duel Cards<br/>[client_card.ts]"]
  node_duel_history["Duel History<br/>[history.tsx]"]
  node_replay["Replay Support<br/>[replay.rs]"]
end

subgraph group_library["Game Library"]
  node_game_data[("Game Data<br/>[game.ts]")]
  node_card_model["Card Model<br/>[card.ts]"]
  node_banlists["Banlists<br/>[lflist.ts]"]
  node_localization["Localization<br/>[i18n.ts]"]
end

subgraph group_native["Native Services"]
  node_native_api["Native API<br/>[api.rs]"]
  node_resources["Game Resources<br/>[lib.rs]"]
end

node_user(("Player"))

node_user -->|"uses"| node_app_shell
node_app_shell -->|"shows"| node_menu
node_app_shell -->|"shows"| node_deck_ui
node_app_shell -->|"shows"| node_card_browser
node_app_shell -->|"shows"| node_duel_connect
node_app_shell -->|"shows"| node_settings
node_card_browser -->|"opens"| node_search
node_deck_ui -->|"uses"| node_game_data
node_search -->|"queries"| node_game_data
node_search -->|"reads"| node_banlists
node_game_data -->|"creates"| node_card_model
node_duel_connect -->|"uses"| node_deck_ui
node_duel_connect -->|"coordinates"| node_protocol
node_duel_connect -->|"uses"| node_network
node_duel_connect -->|"coordinates"| node_duel_scene
node_duel_connect -->|"uses"| node_duel_history
node_protocol -->|"uses"| node_network
node_protocol -->|"updates"| node_duel_scene
node_protocol -->|"records"| node_duel_history
node_duel_scene -->|"renders"| node_client_card
node_duel_connect -.->|"configures"| node_server_setup
node_duel_connect -.->|"loads"| node_replay
node_game_data -.->|"loads data"| node_native_api
node_native_api -.->|"accesses"| node_resources

click node_app_shell "https://github.com/jwyxym/ygopro3/blob/main/src/init.vue"
click node_menu "https://github.com/jwyxym/ygopro3/blob/main/src/pages/menu/menu.vue"
click node_deck_ui "https://github.com/jwyxym/ygopro3/blob/main/src/pages/deck/deck.ts"
click node_card_browser "https://github.com/jwyxym/ygopro3/blob/main/src/pages/card/card_list.vue"
click node_search "https://github.com/jwyxym/ygopro3/blob/main/src/pages/deck/searcher.vue"
click node_game_data "https://github.com/jwyxym/ygopro3/blob/main/src/script/game.ts"
click node_card_model "https://github.com/jwyxym/ygopro3/blob/main/src/script/card.ts"
click node_banlists "https://github.com/jwyxym/ygopro3/blob/main/src/script/lflist.ts"
click node_localization "https://github.com/jwyxym/ygopro3/blob/main/src/script/language/i18n.ts"
click node_duel_connect "https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/connect.ts"
click node_server_setup "https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/server.vue"
click node_protocol "https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/ygo-protocol/protocol.ts"
click node_network "https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/ygo-protocol/network.ts"
click node_duel_scene "https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/scene/scene.tsx"
click node_client_card "https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/scene/client_card.ts"
click node_duel_history "https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/log/history/history.tsx"
click node_replay "https://github.com/jwyxym/ygopro3/blob/main/src-tauri/tauri-plugin-ygopro3/crates/ygopro3_duel/src/replay.rs"
click node_native_api "https://github.com/jwyxym/ygopro3/blob/main/src-tauri/tauri-plugin-ygopro3/crates/ygopro3_api/src/api.rs"
click node_resources "https://github.com/jwyxym/ygopro3/blob/main/src-tauri/tauri-plugin-ygopro3/crates/ygopro3_resource/src/lib.rs"
click node_settings "https://github.com/jwyxym/ygopro3/blob/main/src/pages/setting/setting.vue"

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_shell,node_menu,node_deck_ui,node_card_browser,node_search,node_settings toneBlue
class node_duel_connect,node_server_setup,node_protocol,node_network,node_duel_scene,node_client_card,node_duel_history,node_replay toneAmber
class node_game_data,node_card_model,node_banlists,node_localization toneMint
class node_native_api,node_resources toneRose
class node_user toneIndigo
```

## Components

### App and Data

- [App Shell](https://github.com/jwyxym/ygopro3/blob/main/src/init.vue): `src/init.vue`
- [Main Menu](https://github.com/jwyxym/ygopro3/blob/main/src/pages/menu/menu.vue): `src/pages/menu/menu.vue`
- [Deck Editor](https://github.com/jwyxym/ygopro3/blob/main/src/pages/deck/deck.ts): `src/pages/deck/deck.ts`
- [Card Browser](https://github.com/jwyxym/ygopro3/blob/main/src/pages/card/card_list.vue): `src/pages/card/card_list.vue`
- [Card Search](https://github.com/jwyxym/ygopro3/blob/main/src/pages/deck/searcher.vue): `src/pages/deck/searcher.vue`
- [Settings UI](https://github.com/jwyxym/ygopro3/blob/main/src/pages/setting/setting.vue): `src/pages/setting/setting.vue`

### Duel Runtime

- [Duel Coordinator](https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/connect.ts): `src/pages/duel/connect.ts`
- [Server Setup](https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/server.vue): `src/pages/duel/server.vue`
- [YGO Protocol](https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/ygo-protocol/protocol.ts): `src/pages/duel/ygo-protocol/protocol.ts`
- [Network Transport](https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/ygo-protocol/network.ts): `src/pages/duel/ygo-protocol/network.ts`
- [Duel Scene](https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/scene/scene.tsx): `src/pages/duel/scene/scene.tsx`
- [Duel Cards](https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/scene/client_card.ts): `src/pages/duel/scene/client_card.ts`
- [Duel History](https://github.com/jwyxym/ygopro3/blob/main/src/pages/duel/log/history/history.tsx): `src/pages/duel/log/history/history.tsx`
- [Replay Support](https://github.com/jwyxym/ygopro3/blob/main/src-tauri/tauri-plugin-ygopro3/crates/ygopro3_duel/src/replay.rs): `src-tauri/tauri-plugin-ygopro3/crates/ygopro3_duel/src/replay.rs`

### Game Library

- [Game Data](https://github.com/jwyxym/ygopro3/blob/main/src/script/game.ts): `src/script/game.ts`
- [Card Model](https://github.com/jwyxym/ygopro3/blob/main/src/script/card.ts): `src/script/card.ts`
- [Banlists](https://github.com/jwyxym/ygopro3/blob/main/src/script/lflist.ts): `src/script/lflist.ts`
- [Localization](https://github.com/jwyxym/ygopro3/blob/main/src/script/language/i18n.ts): `src/script/language/i18n.ts`

### Native Services

- [Native API](https://github.com/jwyxym/ygopro3/blob/main/src-tauri/tauri-plugin-ygopro3/crates/ygopro3_api/src/api.rs): `src-tauri/tauri-plugin-ygopro3/crates/ygopro3_api/src/api.rs`
- [Game Resources](https://github.com/jwyxym/ygopro3/blob/main/src-tauri/tauri-plugin-ygopro3/crates/ygopro3_resource/src/lib.rs): `src-tauri/tauri-plugin-ygopro3/crates/ygopro3_resource/src/lib.rs`

### Other components

- **Player**

## Connections

- Player → App Shell: uses (evidence: `src/init.vue`)
- App Shell → Main Menu: shows (evidence: `src/init.vue`)
- App Shell → Deck Editor: shows (evidence: `src/init.vue`)
- App Shell → Card Browser: shows (evidence: `src/init.vue`)
- App Shell → Duel Coordinator: shows (evidence: `src/init.vue`)
- App Shell → Settings UI: shows (evidence: `src/init.vue`)
- Card Browser → Card Search: opens (evidence: `src/pages/card/card_list.vue`)
- Deck Editor → Game Data: uses (evidence: `src/pages/deck/drag.vue`)
- Card Search → Game Data: queries (evidence: `src/pages/deck/searcher.vue`)
- Card Search → Banlists: reads (evidence: `src/pages/deck/searcher.vue`)
- Game Data → Card Model: creates (evidence: `src/script/game.ts`)
- Duel Coordinator → Deck Editor: uses (evidence: `src/pages/duel/connect.ts`)
- Duel Coordinator → YGO Protocol: coordinates (evidence: `src/pages/duel/connect.ts`)
- Duel Coordinator → Network Transport: uses (evidence: `src/pages/duel/connect.ts`)
- Duel Coordinator → Duel Scene: coordinates (evidence: `src/pages/duel/connect.ts`)
- Duel Coordinator → Duel History: uses (evidence: `src/pages/duel/connect.ts`)
- YGO Protocol → Network Transport: uses (evidence: `src/pages/duel/ygo-protocol/protocol.ts`)
- YGO Protocol → Duel Scene: updates (evidence: `src/pages/duel/ygo-protocol/protocol.ts`)
- YGO Protocol → Duel History: records (evidence: `src/pages/duel/ygo-protocol/protocol.ts`)
- Duel Scene → Duel Cards: renders (evidence: `src/pages/duel/scene/scene.tsx`)
- Duel Coordinator → Server Setup: configures
- Duel Coordinator → Replay Support: loads
- Game Data → Native API: loads data
- Native API → Game Resources: accesses
