# acentrist/mecchacamouflage architecture

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

## Overview

Meccha Camouflage is a Windows desktop companion for MECCHA CHAMELEON, with in-game character painting, imported-image painting, and ESP. The primary workflow is user edits in the WebView UI, the desktop host translates commands through a session and bridge service, and an injected native bridge applies them in the game. Settings and image designs are persisted separately. The graph reflects documented capabilities and the supplied tree; several subsystem links use enclosing source paths because their implementation was not sampled.

Main entry points: [`src/csharp/MecchaCamouflage.Controller/HostSession.cs`](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/HostSession.cs) (Host Session), [`src/csharp/MecchaCamouflage.WebHost/MainForm.cs`](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.WebHost/MainForm.cs) (Desktop Host), [`src/native/bridge/bridge.cpp`](https://github.com/acentrist/mecchacamouflage/blob/main/src/native/bridge/bridge.cpp) (Native Bridge), [`src/csharp/MecchaCamouflage.Controller/RuntimeBridgeService.cs`](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/RuntimeBridgeService.cs) (Runtime Bridge Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_webui["WebView UI<br/>[app.js]"]
  node_host["Desktop Host<br/>[MainForm.cs]"]
end

subgraph group_session["App Session"]
  node_session["Host Session<br/>[HostSession.cs]"]
  node_payload["Payload Builder"]
  node_localization["Localization"]
  node_diagnostics["Diagnostics"]
  node_defender["Defender Exclusion"]
end

subgraph group_bridge["Bridge Runtime"]
  node_runtime["Runtime Bridge Service"]
  node_client["Bridge Client<br/>[BridgeClient.cs]"]
  node_injector["Native Injector<br/>[injector.cpp]"]
end

subgraph group_native["Native Game Runtime"]
  node_nativebridge["Native Bridge<br/>[bridge.cpp]"]
  node_contract["Runtime Contract"]
  node_esp["ESP Projection"]
end

subgraph group_state["User Data"]
  node_settings[("Settings Store<br/>[SettingsStore.cs]")]
  node_designs[("Image Designs")]
end

node_user(("User"))
node_game(("MECCHA CHAMELEON"))

node_user -->|"edits paint / ESP"| node_webui
node_webui -->|"posts commands"| node_host
node_host -->|"dispatches commands"| node_session
node_host -->|"loads strings"| node_localization
node_host -.->|"ensures exclusion"| node_defender
node_session -->|"loads / saves"| node_settings
node_session -->|"manages designs"| node_designs
node_session -->|"builds requests"| node_payload
node_session -->|"controls runtime"| node_runtime
node_session -->|"records state"| node_diagnostics
node_runtime -->|"starts injection"| node_injector
node_runtime -->|"sends requests"| node_client
node_injector -->|"injects bridge"| node_nativebridge
node_client -->|"sends TCP commands"| node_nativebridge
node_nativebridge -->|"uses runtime logic"| node_contract
node_nativebridge -->|"applies paint / ESP"| node_game
node_esp -->|"projects presentation"| node_session

click node_webui "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.WebHost/web/app.js"
click node_host "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.WebHost/MainForm.cs"
click node_session "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/HostSession.cs"
click node_payload "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Core/BridgePayloadBuilder.cs"
click node_settings "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Core/SettingsStore.cs"
click node_designs "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Core/ImageDesignLibrary.cs"
click node_runtime "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/RuntimeBridgeService.cs"
click node_client "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/BridgeClient.cs"
click node_injector "https://github.com/acentrist/mecchacamouflage/blob/main/src/native/injector/injector.cpp"
click node_nativebridge "https://github.com/acentrist/mecchacamouflage/blob/main/src/native/bridge/bridge.cpp"
click node_contract "https://github.com/acentrist/mecchacamouflage/blob/main/src/native/include/runtime_contract.hpp"
click node_esp "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Core/NativePresentProjection.cs"
click node_localization "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Core/Localization/LocalizationCatalog.cs"
click node_diagnostics "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/DiagnosticsState.cs"
click node_defender "https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/WindowsDefenderExclusionService.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_webui,node_host,node_user toneBlue
class node_session,node_payload,node_localization,node_diagnostics,node_defender toneAmber
class node_runtime,node_client,node_injector toneMint
class node_nativebridge,node_contract,node_esp toneRose
class node_settings,node_designs,node_game toneIndigo
```

## Components

### Desktop UI

- [WebView UI](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.WebHost/web/app.js): `src/csharp/MecchaCamouflage.WebHost/web/app.js`
- [Desktop Host](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.WebHost/MainForm.cs): `src/csharp/MecchaCamouflage.WebHost/MainForm.cs`

### App Session

- [Host Session](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/HostSession.cs): `src/csharp/MecchaCamouflage.Controller/HostSession.cs`
- [Payload Builder](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Core/BridgePayloadBuilder.cs): `src/csharp/MecchaCamouflage.Core/BridgePayloadBuilder.cs`
- [Localization](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Core/Localization/LocalizationCatalog.cs): `src/csharp/MecchaCamouflage.Core/Localization/LocalizationCatalog.cs`
- [Diagnostics](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/DiagnosticsState.cs): `src/csharp/MecchaCamouflage.Controller/DiagnosticsState.cs`
- [Defender Exclusion](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/WindowsDefenderExclusionService.cs): `src/csharp/MecchaCamouflage.Controller/WindowsDefenderExclusionService.cs`

### Bridge Runtime

- [Runtime Bridge Service](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/RuntimeBridgeService.cs): `src/csharp/MecchaCamouflage.Controller/RuntimeBridgeService.cs`
- [Bridge Client](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Controller/BridgeClient.cs): `src/csharp/MecchaCamouflage.Controller/BridgeClient.cs`
- [Native Injector](https://github.com/acentrist/mecchacamouflage/blob/main/src/native/injector/injector.cpp): `src/native/injector/injector.cpp`

### Native Game Runtime

- [Native Bridge](https://github.com/acentrist/mecchacamouflage/blob/main/src/native/bridge/bridge.cpp): `src/native/bridge/bridge.cpp`
- [Runtime Contract](https://github.com/acentrist/mecchacamouflage/blob/main/src/native/include/runtime_contract.hpp): `src/native/include/runtime_contract.hpp`
- [ESP Projection](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Core/NativePresentProjection.cs): `src/csharp/MecchaCamouflage.Core/NativePresentProjection.cs`

### User Data

- [Settings Store](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Core/SettingsStore.cs): `src/csharp/MecchaCamouflage.Core/SettingsStore.cs`
- [Image Designs](https://github.com/acentrist/mecchacamouflage/blob/main/src/csharp/MecchaCamouflage.Core/ImageDesignLibrary.cs): `src/csharp/MecchaCamouflage.Core/ImageDesignLibrary.cs`

### Other components

- **User**
- **MECCHA CHAMELEON**

## Connections

- User → WebView UI: edits paint / ESP
- WebView UI → Desktop Host: posts commands
- Desktop Host → Host Session: dispatches commands
- Desktop Host → Localization: loads strings
- Desktop Host → Defender Exclusion: ensures exclusion
- Host Session → Settings Store: loads / saves
- Host Session → Image Designs: manages designs
- Host Session → Payload Builder: builds requests
- Host Session → Runtime Bridge Service: controls runtime
- Host Session → Diagnostics: records state
- Runtime Bridge Service → Native Injector: starts injection
- Runtime Bridge Service → Bridge Client: sends requests
- Native Injector → Native Bridge: injects bridge
- Bridge Client → Native Bridge: sends TCP commands
- Native Bridge → Runtime Contract: uses runtime logic
- Native Bridge → MECCHA CHAMELEON: applies paint / ESP
- ESP Projection → Host Session: projects presentation
