# luolangaga/tubatool architecture

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

- Interactive diagram: https://gitdiagram.com/luolangaga/tubatool
- Repository: https://github.com/luolangaga/tubatool

## Overview

TubaWinUI3 is a Windows desktop toolbox for hardware inspection, benchmarking, maintenance, conversion, networking, gaming, and AI-assisted PC operation. The main workflow is selecting a tool in the UI, running its domain service, and viewing or acting on the result. The graph retains the README’s major capability branches; some subsystem links use documented responsibilities and tree paths because their source was not sampled.

Main entry points: [`TubaWinUi3.WinUI3/MainWindow.xaml.cs`](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/MainWindow.xaml.cs) (Main window), [`TubaWinUi3.WinUI3/Services/AiAssistantService.cs`](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/AiAssistantService.cs) (Assistant service), [`TubaWinUi3.WinUI3/Pages/PerformanceBenchmarkPage.cs`](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/PerformanceBenchmarkPage.cs) (Performance tests), [`TubaWinUi3.WinUI3/Pages/AiAgentPage.xaml.cs`](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/AiAgentPage.xaml.cs) (AI assistant UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop experience"]
  node_app["WinUI application<br/>[App.xaml.cs]"]
  node_window["Main window<br/>[MainWindow.xaml.cs]"]
  node_catalog["Tool catalog<br/>[ToolCatalog.cs]"]
  node_builtin["Built-in tools"]
end

subgraph group_assistant["AI assistance"]
  node_agentpage["AI assistant UI"]
  node_assistantservice["Assistant service"]
  node_runtime["Agent runtime<br/>[AgentRuntime.cs]"]
  node_agenttools["Agent tools<br/>[Tools]"]
  node_provider["AI providers<br/>[AiProvider.cs]"]
end

subgraph group_hardware["Hardware tools"]
  node_hardwarepage["Hardware inspection"]
  node_hardware["Hardware service"]
  node_benchmarkpage["Performance tests"]
  node_benchmark["Benchmark service"]
  node_cloud["Benchmark cloud"]
end

subgraph group_maintenance["System and network"]
  node_cleanpage["Storage cleanup UI"]
  node_storage["Storage usage"]
  node_rogue["Rogue cleaner<br/>[RogueCleaner]"]
  node_blockengine["Context blocking<br/>[BlockEngine.cs]"]
  node_speedpage["Speed test UI"]
  node_speed["Speed test engine<br/>[SpeedTestEngine.cs]"]
end

subgraph group_gaming["Gaming and conversion"]
  node_gamepage["Game monitor UI"]
  node_gamerecord["Game recording"]
  node_tunnel["Game tunnel<br/>[GameTunnel]"]
  node_convertpage["Format converter"]
  node_docengine["Document engine"]
end

node_user(("PC user"))
node_aiendpoint(("AI endpoint"))

node_user -->|"uses"| node_window
node_app -->|"registers tools"| node_builtin
node_window -->|"browses tools"| node_catalog
node_window -->|"opens tools"| node_builtin
node_user -->|"asks"| node_agentpage
node_agentpage -->|"submits request"| node_assistantservice
node_assistantservice -->|"runs agent"| node_runtime
node_runtime -->|"dispatches calls"| node_agenttools
node_assistantservice -->|"requests completion"| node_provider
node_provider -.->|"calls model"| node_aiendpoint
node_user -->|"checks PC"| node_hardwarepage
node_hardwarepage -->|"reads hardware"| node_hardware
node_user -->|"runs tests"| node_benchmarkpage
node_benchmarkpage -->|"runs benchmarks"| node_benchmark
node_benchmarkpage -.->|"uploads results"| node_cloud
node_user -->|"reviews usage"| node_cleanpage
node_cleanpage -->|"scans and deletes"| node_storage
node_user -->|"scans system"| node_rogue
node_user -->|"blocks context items"| node_blockengine
node_user -->|"tests connection"| node_speedpage
node_speedpage -->|"measures throughput"| node_speed
node_user -->|"reviews records"| node_gamepage
node_gamepage -->|"reads recordings"| node_gamerecord
node_user -->|"sets up game link"| node_tunnel
node_user -->|"converts files"| node_convertpage
node_convertpage -->|"converts documents"| node_docengine

click node_app "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/App.xaml.cs"
click node_window "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/MainWindow.xaml.cs"
click node_catalog "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/ToolCatalog.cs"
click node_builtin "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/BuiltinToolRegistry.cs"
click node_agentpage "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/AiAgentPage.xaml.cs"
click node_assistantservice "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/AiAssistantService.cs"
click node_runtime "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/Agent/AgentRuntime.cs"
click node_agenttools "https://github.com/luolangaga/tubatool/tree/master/TubaWinUi3.WinUI3/Services/Agent/Tools"
click node_provider "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/Ai/AiProvider.cs"
click node_hardwarepage "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/HardwarePage.xaml.cs"
click node_hardware "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/HardwareInfoService.cs"
click node_benchmarkpage "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/PerformanceBenchmarkPage.cs"
click node_benchmark "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/PerformanceBenchmarkService.cs"
click node_cloud "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/BenchmarkCloudService.cs"
click node_cleanpage "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/StorageUsageDialog.xaml.cs"
click node_storage "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/StorageUsageService.cs"
click node_rogue "https://github.com/luolangaga/tubatool/tree/master/TubaWinUi3.WinUI3/Services/RogueCleaner"
click node_blockengine "https://github.com/luolangaga/tubatool/blob/master/TubaWinUI3.BackEnd/BlockEngine.cs"
click node_speedpage "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/SpeedTestPage.xaml.cs"
click node_speed "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/SpeedTestEngine.cs"
click node_gamepage "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/GameMonitorRecordsPage.xaml.cs"
click node_gamerecord "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/GameMonitorRecorder.cs"
click node_tunnel "https://github.com/luolangaga/tubatool/tree/master/TubaWinUi3.WinUI3/Services/GameTunnel"
click node_convertpage "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/FormatConverterPage.xaml.cs"
click node_docengine "https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/DocumentEngineService.cs"

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,node_window,node_catalog,node_builtin,node_user toneBlue
class node_agentpage,node_assistantservice,node_runtime,node_agenttools,node_provider toneAmber
class node_hardwarepage,node_hardware,node_benchmarkpage,node_benchmark,node_cloud toneMint
class node_cleanpage,node_storage,node_rogue,node_blockengine,node_speedpage,node_speed toneRose
class node_gamepage,node_gamerecord,node_tunnel,node_convertpage,node_docengine,node_aiendpoint toneIndigo
```

## Components

### Desktop experience

- [WinUI application](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/App.xaml.cs): `TubaWinUi3.WinUI3/App.xaml.cs`
- [Main window](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/MainWindow.xaml.cs): `TubaWinUi3.WinUI3/MainWindow.xaml.cs`
- [Tool catalog](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/ToolCatalog.cs): `TubaWinUi3.WinUI3/Services/ToolCatalog.cs`
- [Built-in tools](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/BuiltinToolRegistry.cs): `TubaWinUi3.WinUI3/Services/BuiltinToolRegistry.cs`

### AI assistance

- [AI assistant UI](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/AiAgentPage.xaml.cs): `TubaWinUi3.WinUI3/Pages/AiAgentPage.xaml.cs`
- [Assistant service](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/AiAssistantService.cs): `TubaWinUi3.WinUI3/Services/AiAssistantService.cs`
- [Agent runtime](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/Agent/AgentRuntime.cs): `TubaWinUi3.WinUI3/Services/Agent/AgentRuntime.cs`
- [Agent tools](https://github.com/luolangaga/tubatool/tree/master/TubaWinUi3.WinUI3/Services/Agent/Tools): `TubaWinUi3.WinUI3/Services/Agent/Tools`
- [AI providers](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/Ai/AiProvider.cs): `TubaWinUi3.WinUI3/Services/Ai/AiProvider.cs`

### Hardware tools

- [Hardware inspection](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/HardwarePage.xaml.cs): `TubaWinUi3.WinUI3/Pages/HardwarePage.xaml.cs`
- [Hardware service](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/HardwareInfoService.cs): `TubaWinUi3.WinUI3/Services/HardwareInfoService.cs`
- [Performance tests](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/PerformanceBenchmarkPage.cs): `TubaWinUi3.WinUI3/Pages/PerformanceBenchmarkPage.cs`
- [Benchmark service](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/PerformanceBenchmarkService.cs): `TubaWinUi3.WinUI3/Services/PerformanceBenchmarkService.cs`
- [Benchmark cloud](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/BenchmarkCloudService.cs): `TubaWinUi3.WinUI3/Services/BenchmarkCloudService.cs`

### System and network

- [Storage cleanup UI](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/StorageUsageDialog.xaml.cs): `TubaWinUi3.WinUI3/Pages/StorageUsageDialog.xaml.cs`
- [Storage usage](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/StorageUsageService.cs): `TubaWinUi3.WinUI3/Services/StorageUsageService.cs`
- [Rogue cleaner](https://github.com/luolangaga/tubatool/tree/master/TubaWinUi3.WinUI3/Services/RogueCleaner): `TubaWinUi3.WinUI3/Services/RogueCleaner`
- [Context blocking](https://github.com/luolangaga/tubatool/blob/master/TubaWinUI3.BackEnd/BlockEngine.cs): `TubaWinUI3.BackEnd/BlockEngine.cs`
- [Speed test UI](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/SpeedTestPage.xaml.cs): `TubaWinUi3.WinUI3/Pages/SpeedTestPage.xaml.cs`
- [Speed test engine](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/SpeedTestEngine.cs): `TubaWinUi3.WinUI3/Services/SpeedTestEngine.cs`

### Gaming and conversion

- [Game monitor UI](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/GameMonitorRecordsPage.xaml.cs): `TubaWinUi3.WinUI3/Pages/GameMonitorRecordsPage.xaml.cs`
- [Game recording](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/GameMonitorRecorder.cs): `TubaWinUi3.WinUI3/Services/GameMonitorRecorder.cs`
- [Game tunnel](https://github.com/luolangaga/tubatool/tree/master/TubaWinUi3.WinUI3/Services/GameTunnel): `TubaWinUi3.WinUI3/Services/GameTunnel`
- [Format converter](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Pages/FormatConverterPage.xaml.cs): `TubaWinUi3.WinUI3/Pages/FormatConverterPage.xaml.cs`
- [Document engine](https://github.com/luolangaga/tubatool/blob/master/TubaWinUi3.WinUI3/Services/DocumentEngineService.cs): `TubaWinUi3.WinUI3/Services/DocumentEngineService.cs`

### Other components

- **PC user**
- **AI endpoint**

## Connections

- PC user → Main window: uses
- WinUI application → Built-in tools: registers tools
- Main window → Tool catalog: browses tools
- Main window → Built-in tools: opens tools
- PC user → AI assistant UI: asks
- AI assistant UI → Assistant service: submits request
- Assistant service → Agent runtime: runs agent
- Agent runtime → Agent tools: dispatches calls
- Assistant service → AI providers: requests completion
- AI providers → AI endpoint: calls model
- PC user → Hardware inspection: checks PC
- Hardware inspection → Hardware service: reads hardware
- PC user → Performance tests: runs tests
- Performance tests → Benchmark service: runs benchmarks
- Performance tests → Benchmark cloud: uploads results
- PC user → Storage cleanup UI: reviews usage
- Storage cleanup UI → Storage usage: scans and deletes
- PC user → Rogue cleaner: scans system
- PC user → Context blocking: blocks context items
- PC user → Speed test UI: tests connection
- Speed test UI → Speed test engine: measures throughput
- PC user → Game monitor UI: reviews records
- Game monitor UI → Game recording: reads recordings
- PC user → Game tunnel: sets up game link
- PC user → Format converter: converts files
- Format converter → Document engine: converts documents
