# dsvva/kuro_scanner architecture

> Architecture diagram of the GitHub repository dsvva/kuro_scanner, 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/dsvva/kuro_scanner
- Repository: https://github.com/dsvva/kuro_scanner

## Overview

KuRo_Scanner is a Windows desktop tool for managing Wuthering Waves accounts and logging in by scanning QR codes from either the screen or a live stream. The main workflow starts in the main window, runs a selected scanner, decodes a QR code, and uses KuRo service logic to confirm login; SMS confirmation is also supported. Account storage, preferences, and account-adding login methods are separate supporting branches. Relationships involving unsampled implementation details are omitted or marked unverified.

Main entry points: [`src/UI/WindowMain.cpp`](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowMain.cpp) (Main Window), [`src/Core/KuRoService.h`](https://github.com/dsvva/kuro_scanner/blob/main/src/Core/KuRoService.h) (KuRo Service Logic), [`src/UI/WindowLogin.cpp`](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowLogin.cpp) (Account Login), [`src/UI/QRCodeForScreen.cpp`](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/QRCodeForScreen.cpp) (Screen Scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop UI"]
  node_main["Main Window<br/>[WindowMain.cpp]"]
  node_loginui["Account Login<br/>[WindowLogin.cpp]"]
  node_smsui["SMS Dialog<br/>[WindowSms.cpp]"]
  node_about["About Window<br/>[WindowAbout.cpp]"]
end

subgraph group_scan["QR Scanning"]
  node_screenjob["Screen Scanner"]
  node_streamjob["Stream Scanner"]
  node_screeninput["Screen Capture<br/>[ScreenShotDXGI.hpp]"]
  node_streamlink["Stream Link Resolver<br/>[LiveStreamLink.cpp]"]
  node_qrdecode["QR Decoder<br/>[QRScanner.cpp]"]
end

subgraph group_auth["Account and Login"]
  node_accounts["Account Manager<br/>[AccountManager.cpp]"]
  node_accountfile[("Account File")]
  node_settings["Preferences<br/>[ConfigManager.cpp]"]
  node_configfile[("Settings File")]
  node_service["KuRo Service Logic<br/>[KuRoService.h]"]
  node_api["KuRo API Client<br/>[KuRoApi.cpp]"]
  node_captcha["GeeTest Window<br/>[WindowGeeTest.cpp]"]
end

subgraph group_integrations["External Inputs"]
  node_gamebackend{{"KuRo Backend"}}
  node_streamplatform{{"Live Platforms"}}
end

node_user(("User"))

node_user -->|"operates"| node_main
node_main -->|"starts or stops"| node_screenjob
node_main -->|"starts or stops"| node_streamjob
node_main -->|"resolves room"| node_streamlink
node_main -->|"manages accounts"| node_accounts
node_main -->|"loads preferences"| node_settings
node_main -->|"opens login"| node_loginui
node_main -->|"uses dialog"| node_smsui
node_screenjob -->|"captures frames"| node_screeninput
node_screenjob -->|"decodes frames"| node_qrdecode
node_streamjob -->|"decodes frames"| node_qrdecode
node_streamjob -.->|"confirms login"| node_service
node_streamlink -.->|"gets stream data"| node_streamplatform
node_loginui -->|"opens challenge"| node_captcha
node_loginui -->|"requests account data"| node_api
node_service -->|"calls login methods"| node_api
node_service -.->|"requests authentication"| node_gamebackend
node_smsui -->|"uses SMS service"| node_service
node_accounts -->|"reads and writes"| node_accountfile
node_settings -->|"stores settings"| node_configfile

click node_main "https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowMain.cpp"
click node_loginui "https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowLogin.cpp"
click node_smsui "https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowSms.cpp"
click node_about "https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowAbout.cpp"
click node_screenjob "https://github.com/dsvva/kuro_scanner/blob/main/src/UI/QRCodeForScreen.cpp"
click node_streamjob "https://github.com/dsvva/kuro_scanner/blob/main/src/UI/QRCodeForStream.cpp"
click node_screeninput "https://github.com/dsvva/kuro_scanner/blob/main/src/Core/ScreenShotDXGI.hpp"
click node_streamlink "https://github.com/dsvva/kuro_scanner/blob/main/src/Core/LiveStreamLink.cpp"
click node_qrdecode "https://github.com/dsvva/kuro_scanner/blob/main/src/Core/QRScanner.cpp"
click node_accounts "https://github.com/dsvva/kuro_scanner/blob/main/src/Core/AccountManager.cpp"
click node_settings "https://github.com/dsvva/kuro_scanner/blob/main/src/UI/ConfigManager.cpp"
click node_service "https://github.com/dsvva/kuro_scanner/blob/main/src/Core/KuRoService.h"
click node_api "https://github.com/dsvva/kuro_scanner/blob/main/src/Core/KuRoApi.cpp"
click node_captcha "https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowGeeTest.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_main,node_loginui,node_smsui,node_about,node_user toneBlue
class node_screenjob,node_streamjob,node_screeninput,node_streamlink,node_qrdecode toneAmber
class node_accounts,node_accountfile,node_settings,node_configfile,node_service,node_api,node_captcha toneMint
class node_gamebackend,node_streamplatform toneRose
```

## Components

### Desktop UI

- [Main Window](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowMain.cpp): `src/UI/WindowMain.cpp`
- [Account Login](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowLogin.cpp): `src/UI/WindowLogin.cpp`
- [SMS Dialog](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowSms.cpp): `src/UI/WindowSms.cpp`
- [About Window](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowAbout.cpp): `src/UI/WindowAbout.cpp`

### QR Scanning

- [Screen Scanner](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/QRCodeForScreen.cpp): `src/UI/QRCodeForScreen.cpp`
- [Stream Scanner](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/QRCodeForStream.cpp): `src/UI/QRCodeForStream.cpp`
- [Screen Capture](https://github.com/dsvva/kuro_scanner/blob/main/src/Core/ScreenShotDXGI.hpp): `src/Core/ScreenShotDXGI.hpp`
- [Stream Link Resolver](https://github.com/dsvva/kuro_scanner/blob/main/src/Core/LiveStreamLink.cpp): `src/Core/LiveStreamLink.cpp`
- [QR Decoder](https://github.com/dsvva/kuro_scanner/blob/main/src/Core/QRScanner.cpp): `src/Core/QRScanner.cpp`

### Account and Login

- [Account Manager](https://github.com/dsvva/kuro_scanner/blob/main/src/Core/AccountManager.cpp): `src/Core/AccountManager.cpp`
- **Account File**
- [Preferences](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/ConfigManager.cpp): `src/UI/ConfigManager.cpp`
- **Settings File**
- [KuRo Service Logic](https://github.com/dsvva/kuro_scanner/blob/main/src/Core/KuRoService.h): `src/Core/KuRoService.h`
- [KuRo API Client](https://github.com/dsvva/kuro_scanner/blob/main/src/Core/KuRoApi.cpp): `src/Core/KuRoApi.cpp`
- [GeeTest Window](https://github.com/dsvva/kuro_scanner/blob/main/src/UI/WindowGeeTest.cpp): `src/UI/WindowGeeTest.cpp`

### External Inputs

- **KuRo Backend**
- **Live Platforms**

### Other components

- **User**

## Connections

- User → Main Window: operates (evidence: `README.md`)
- Main Window → Screen Scanner: starts or stops
- Main Window → Stream Scanner: starts or stops
- Main Window → Stream Link Resolver: resolves room
- Main Window → Account Manager: manages accounts
- Main Window → Preferences: loads preferences
- Main Window → Account Login: opens login
- Main Window → SMS Dialog: uses dialog (evidence: `src/UI/WindowMain.cpp`)
- Screen Scanner → Screen Capture: captures frames (evidence: `src/UI/QRCodeForScreen.cpp`)
- Screen Scanner → QR Decoder: decodes frames (evidence: `src/UI/QRCodeForScreen.cpp`)
- Stream Scanner → QR Decoder: decodes frames (evidence: `src/UI/QRCodeForStream.cpp`)
- Stream Scanner → KuRo Service Logic: confirms login
- Stream Link Resolver → Live Platforms: gets stream data
- Account Login → GeeTest Window: opens challenge
- Account Login → KuRo API Client: requests account data (evidence: `src/UI/WindowLogin.cpp`)
- KuRo Service Logic → KuRo API Client: calls login methods (evidence: `src/Core/KuRoService.h`)
- KuRo Service Logic → KuRo Backend: requests authentication
- SMS Dialog → KuRo Service Logic: uses SMS service (evidence: `src/UI/WindowSms.cpp`)
- Account Manager → Account File: reads and writes (evidence: `src/Core/AccountManager.cpp`)
- Preferences → Settings File: stores settings
