# ijnokmsc/wowtranslatecontrol architecture

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

- Interactive diagram: https://gitdiagram.com/ijnokmsc/wowtranslatecontrol
- Repository: https://github.com/ijnokmsc/wowtranslatecontrol

## Overview

WoWTranslateControl is a Windows console and in-game DLL pair for real-time, bidirectional WoW 3.3.5 chat translation. The main workflow runs from game chat through the injected engine and local proxy, which filters and preprocesses messages, obtains a translation from the selected provider, and returns it to the game; outgoing translation is also supported. The README documents additional filtering, caching, glossary, setup, and diagnostics capabilities. Some native and pipeline details are unsampled, so those connections are limited to documented or indexed evidence.

Main entry points: [`Core/ProxyServer.cs`](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/ProxyServer.cs) (Translation proxy), [`patches/335/src/direct_main.cpp`](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/patches/335/src/direct_main.cpp) (Direct translation engine), [`MainWindow.xaml.cs`](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/MainWindow.xaml.cs) (Control console), [`Core/Providers/ProviderManager.cs`](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Providers/ProviderManager.cs) (Provider selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Console and settings"]
  node_main_ui["Control console<br/>[MainWindow.xaml.cs]"]
  node_settings["App configuration<br/>[AppConfig.cs]"]
  node_provider_config["Provider entries<br/>[ProviderEntry.cs]"]
  node_glossary_ui["Glossary manager"]
  node_provider_ui["Provider manager UI"]
end

subgraph group_translation["Proxy translation"]
  node_proxy["Translation proxy<br/>[ProxyServer.cs]"]
  node_filter["Message filters<br/>[MessageFilter.cs]"]
  node_filter_stage["Filter stage<br/>[FilterStage.cs]"]
  node_glossary_stage["Glossary stage<br/>[GlossaryStage.cs]"]
  node_cache_stage[("Translation cache<br/>[CacheStage.cs]")]
  node_glossary[("Glossary store<br/>[GlossaryStore.cs]")]
  node_glossary_apply["Term protection<br/>[GlossaryApplier.cs]"]
end

subgraph group_providers["Translation providers"]
  node_provider_manager["Provider selection<br/>[ProviderManager.cs]"]
  node_local_provider["llama provider"]
  node_openai_provider["OpenAI-compatible provider"]
  node_google_provider["Google provider"]
end

subgraph group_game["In-game integration"]
  node_proxy_dll["dinput8 proxy<br/>[dinput8_proxy.cpp]"]
  node_direct_engine["Direct translation engine<br/>[direct_main.cpp]"]
  node_native_translator["Native translator<br/>[translator.cpp]"]
  node_lua_driver["Lua driver<br/>[driver_lua.h]"]
end

subgraph group_setup["Local model setup"]
  node_llama_server["llama-server manager"]
  node_setup_wizard["Model setup wizard"]
  node_model_advisor["Hardware and model advisor<br/>[ModelAdvisor.cs]"]
  node_downloader["Model downloader<br/>[Downloader.cs]"]
end

node_player(("Player"))
node_wow_client(("WoW client"))

node_player -->|"chats in"| node_wow_client
node_wow_client -->|"captures chat"| node_direct_engine
node_direct_engine -->|"sends requests"| node_proxy
node_proxy -->|"returns translations"| node_direct_engine
node_direct_engine -->|"rewrites chat"| node_wow_client
node_main_ui -->|"starts service"| node_proxy
node_main_ui -->|"controls process"| node_llama_server
node_main_ui -->|"loads and saves"| node_settings
node_main_ui -.->|"opens manager"| node_provider_ui
node_provider_ui -->|"edits providers"| node_settings
node_glossary_ui -->|"manages terms"| node_glossary
node_proxy -->|"runs stage"| node_filter_stage
node_filter_stage -->|"applies rules"| node_filter
node_proxy -->|"runs stage"| node_glossary_stage
node_glossary_stage -->|"reads terms"| node_glossary
node_glossary_stage -->|"protects terms"| node_glossary_apply
node_proxy -->|"checks and stores"| node_cache_stage
node_proxy -->|"requests translation"| node_provider_manager
node_provider_manager -->|"dispatches local"| node_local_provider
node_provider_manager -->|"dispatches OpenAI"| node_openai_provider
node_provider_manager -->|"dispatches Google"| node_google_provider
node_local_provider -->|"sends inference request"| node_llama_server
node_openai_provider -->|"protects terms"| node_glossary_apply
node_setup_wizard -->|"selects recommendation"| node_model_advisor
node_setup_wizard -->|"downloads files"| node_downloader
node_main_ui -->|"opens wizard"| node_setup_wizard
node_proxy_dll -.->|"loads engine"| node_direct_engine
node_direct_engine -.->|"uses translator"| node_native_translator
node_direct_engine -->|"injects driver"| node_lua_driver

click node_main_ui "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/MainWindow.xaml.cs"
click node_settings "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Models/AppConfig.cs"
click node_provider_config "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Models/ProviderEntry.cs"
click node_glossary_ui "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/GlossaryWindow.xaml.cs"
click node_provider_ui "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/ProviderWindow.xaml.cs"
click node_proxy "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/ProxyServer.cs"
click node_filter "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/MessageFilter.cs"
click node_filter_stage "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Pipeline/FilterStage.cs"
click node_glossary_stage "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Pipeline/GlossaryStage.cs"
click node_cache_stage "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Pipeline/CacheStage.cs"
click node_glossary "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Glossary/GlossaryStore.cs"
click node_glossary_apply "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Glossary/GlossaryApplier.cs"
click node_provider_manager "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Providers/ProviderManager.cs"
click node_local_provider "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Providers/LlamaCppUpstreamProvider.cs"
click node_openai_provider "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Providers/OpenAiCompatProvider.cs"
click node_google_provider "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Providers/GoogleFreeProvider.cs"
click node_llama_server "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/LlamaServerManager.cs"
click node_setup_wizard "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/SetupWizardWindow.xaml.cs"
click node_model_advisor "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Hardware/ModelAdvisor.cs"
click node_downloader "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Hardware/Downloader.cs"
click node_proxy_dll "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/patches/335/src/dinput8_proxy.cpp"
click node_direct_engine "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/patches/335/src/direct_main.cpp"
click node_native_translator "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/patches/335/src/translator.cpp"
click node_lua_driver "https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/patches/335/src/driver_lua.h"

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_ui,node_settings,node_provider_config,node_glossary_ui,node_provider_ui,node_wow_client toneBlue
class node_proxy,node_filter,node_filter_stage,node_glossary_stage,node_cache_stage,node_glossary,node_glossary_apply toneAmber
class node_provider_manager,node_local_provider,node_openai_provider,node_google_provider toneMint
class node_proxy_dll,node_direct_engine,node_native_translator,node_lua_driver toneRose
class node_llama_server,node_setup_wizard,node_model_advisor,node_downloader,node_player toneIndigo
```

## Components

### Console and settings

- [Control console](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/MainWindow.xaml.cs): `MainWindow.xaml.cs`
- [App configuration](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Models/AppConfig.cs): `Models/AppConfig.cs`
- [Provider entries](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Models/ProviderEntry.cs): `Models/ProviderEntry.cs`
- [Glossary manager](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/GlossaryWindow.xaml.cs): `GlossaryWindow.xaml.cs`
- [Provider manager UI](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/ProviderWindow.xaml.cs): `ProviderWindow.xaml.cs`

### Proxy translation

- [Translation proxy](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/ProxyServer.cs): `Core/ProxyServer.cs`
- [Message filters](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/MessageFilter.cs): `Core/MessageFilter.cs`
- [Filter stage](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Pipeline/FilterStage.cs): `Core/Pipeline/FilterStage.cs`
- [Glossary stage](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Pipeline/GlossaryStage.cs): `Core/Pipeline/GlossaryStage.cs`
- [Translation cache](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Pipeline/CacheStage.cs): `Core/Pipeline/CacheStage.cs`
- [Glossary store](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Glossary/GlossaryStore.cs): `Core/Glossary/GlossaryStore.cs`
- [Term protection](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Glossary/GlossaryApplier.cs): `Core/Glossary/GlossaryApplier.cs`

### Translation providers

- [Provider selection](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Providers/ProviderManager.cs): `Core/Providers/ProviderManager.cs`
- [llama provider](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Providers/LlamaCppUpstreamProvider.cs): `Core/Providers/LlamaCppUpstreamProvider.cs`
- [OpenAI-compatible provider](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Providers/OpenAiCompatProvider.cs): `Core/Providers/OpenAiCompatProvider.cs`
- [Google provider](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Providers/GoogleFreeProvider.cs): `Core/Providers/GoogleFreeProvider.cs`

### In-game integration

- [dinput8 proxy](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/patches/335/src/dinput8_proxy.cpp): `patches/335/src/dinput8_proxy.cpp`
- [Direct translation engine](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/patches/335/src/direct_main.cpp): `patches/335/src/direct_main.cpp`
- [Native translator](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/patches/335/src/translator.cpp): `patches/335/src/translator.cpp`
- [Lua driver](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/patches/335/src/driver_lua.h): `patches/335/src/driver_lua.h`

### Local model setup

- [llama-server manager](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/LlamaServerManager.cs): `Core/LlamaServerManager.cs`
- [Model setup wizard](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/SetupWizardWindow.xaml.cs): `SetupWizardWindow.xaml.cs`
- [Hardware and model advisor](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Hardware/ModelAdvisor.cs): `Core/Hardware/ModelAdvisor.cs`
- [Model downloader](https://github.com/ijnokmsc/wowtranslatecontrol/blob/3.0/Core/Hardware/Downloader.cs): `Core/Hardware/Downloader.cs`

### Other components

- **Player**
- **WoW client**

## Connections

- Player → WoW client: chats in
- WoW client → Direct translation engine: captures chat
- Direct translation engine → Translation proxy: sends requests
- Translation proxy → Direct translation engine: returns translations
- Direct translation engine → WoW client: rewrites chat
- Control console → Translation proxy: starts service (evidence: `MainWindow.xaml.cs`)
- Control console → llama-server manager: controls process (evidence: `MainWindow.xaml.cs`)
- Control console → App configuration: loads and saves (evidence: `MainWindow.xaml.cs`)
- Control console → Provider manager UI: opens manager
- Provider manager UI → App configuration: edits providers (evidence: `ProviderWindow.xaml.cs`)
- Glossary manager → Glossary store: manages terms (evidence: `GlossaryWindow.xaml.cs`)
- Translation proxy → Filter stage: runs stage (evidence: `Core/ProxyServer.cs`)
- Filter stage → Message filters: applies rules (evidence: `Core/Pipeline/FilterStage.cs`)
- Translation proxy → Glossary stage: runs stage (evidence: `Core/ProxyServer.cs`)
- Glossary stage → Glossary store: reads terms (evidence: `Core/Pipeline/GlossaryStage.cs`)
- Glossary stage → Term protection: protects terms (evidence: `Core/Pipeline/GlossaryStage.cs`)
- Translation proxy → Translation cache: checks and stores (evidence: `Core/ProxyServer.cs`)
- Translation proxy → Provider selection: requests translation (evidence: `Core/ProxyServer.cs`)
- Provider selection → llama provider: dispatches local (evidence: `Core/Providers/ProviderManager.cs`)
- Provider selection → OpenAI-compatible provider: dispatches OpenAI (evidence: `Core/Providers/ProviderManager.cs`)
- Provider selection → Google provider: dispatches Google (evidence: `Core/Providers/ProviderManager.cs`)
- llama provider → llama-server manager: sends inference request (evidence: `Core/Providers/LlamaCppUpstreamProvider.cs`)
- OpenAI-compatible provider → Term protection: protects terms (evidence: `Core/Providers/OpenAiCompatProvider.cs`)
- Model setup wizard → Hardware and model advisor: selects recommendation (evidence: `SetupWizardWindow.xaml.cs`)
- Model setup wizard → Model downloader: downloads files (evidence: `SetupWizardWindow.xaml.cs`)
- Control console → Model setup wizard: opens wizard (evidence: `MainWindow.xaml.cs`)
- dinput8 proxy → Direct translation engine: loads engine
- Direct translation engine → Native translator: uses translator
- Direct translation engine → Lua driver: injects driver (evidence: `patches/335/src/direct_main.cpp`)
