# lx934/mcbotconsole architecture

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

- Interactive diagram: https://gitdiagram.com/lx934/mcbotconsole
- Repository: https://github.com/lx934/mcbotconsole

## Overview

McBotConsole is a WinForms client backed by a Node.js Minecraft bot runtime. The main workflow is configuring a batch run, sending it through the backend bridge, and receiving status and results; adjacent capabilities include diagnostics, plugin management, reports, patching, and update checks. The backend source and several UI files are represented in the index, but excerpts do not expose all runtime wiring, so uncertain links are omitted or marked unverified.

Main entry points: [`MainForm.cs`](https://github.com/lx934/mcbotconsole/blob/main/MainForm.cs) (Main window), [`Patching/PatchManager.cs`](https://github.com/lx934/mcbotconsole/blob/main/Patching/PatchManager.cs) (Patch engine), [`NodeBackend.cs`](https://github.com/lx934/mcbotconsole/blob/main/NodeBackend.cs) (Backend bridge), [`backend/index.js`](https://github.com/lx934/mcbotconsole/blob/main/backend/index.js) (Bot and plugin runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Desktop client"]
  node_main["Main window<br/>[MainForm.cs]"]
  node_settings["Run settings<br/>[SettingsDialog.cs]"]
  node_bridge["Backend bridge<br/>[NodeBackend.cs]"]
  node_protocol["Message models<br/>[GuiMessage.cs]"]
end

subgraph group_runtime["Bot runtime"]
  node_backend["Bot and plugin runtime<br/>[index.js]"]
end

subgraph group_ops["Operations"]
  node_diagnostics["Server analyzer"]
  node_network["Network probes<br/>[NetworkTool.cs]"]
  node_dns["DNS resolution<br/>[DnsHelper.cs]"]
  node_debug["Debug console"]
  node_plugins["Plugin manager<br/>[PluginDialog.cs]"]
  node_reports["Run reports<br/>[ReportDialog.cs]"]
  node_reportstore[("Report storage<br/>[ReportManager.cs]")]
end

subgraph group_maintenance["Maintenance"]
  node_patchui["Patch interface<br/>[PatchDialog.cs]"]
  node_patchmanager["Patch engine<br/>[PatchManager.cs]"]
  node_verifier["Patch verification"]
  node_updater["Restart updater<br/>[updater.cpp]"]
  node_updatecheck["Update checker<br/>[UpdateChecker.cs]"]
  node_version["Version rules<br/>[VersionInfo.cs]"]
  node_updatedialog["Update details<br/>[UpdateDialog.cs]"]
end

node_user(("Operator"))
node_minecraft(("Minecraft server"))

node_user -->|"operates"| node_main
node_main -->|"opens"| node_settings
node_main -->|"sends run"| node_bridge
node_bridge -.->|"exchanges messages"| node_backend
node_backend -->|"connects bots"| node_minecraft
node_main -->|"opens"| node_diagnostics
node_diagnostics -->|"runs probes"| node_network
node_main -->|"resolves host"| node_dns
node_main -->|"opens"| node_debug
node_main -->|"opens"| node_plugins
node_main -->|"opens"| node_reports
node_reports -->|"loads and exports"| node_reportstore
node_main -.->|"opens"| node_patchui
node_patchui -->|"applies or rolls back"| node_patchmanager
node_patchmanager -.->|"verifies patch"| node_verifier
node_patchmanager -.->|"restarts through"| node_updater
node_main -->|"checks updates"| node_updatecheck
node_updatecheck -->|"compares versions"| node_version
node_main -->|"shows details"| node_updatedialog

click node_main "https://github.com/lx934/mcbotconsole/blob/main/MainForm.cs"
click node_settings "https://github.com/lx934/mcbotconsole/blob/main/SettingsDialog.cs"
click node_bridge "https://github.com/lx934/mcbotconsole/blob/main/NodeBackend.cs"
click node_protocol "https://github.com/lx934/mcbotconsole/blob/main/GuiMessage.cs"
click node_backend "https://github.com/lx934/mcbotconsole/blob/main/backend/index.js"
click node_diagnostics "https://github.com/lx934/mcbotconsole/blob/main/ServerInfoDialog.cs"
click node_network "https://github.com/lx934/mcbotconsole/blob/main/NetworkTool.cs"
click node_dns "https://github.com/lx934/mcbotconsole/blob/main/DnsHelper.cs"
click node_debug "https://github.com/lx934/mcbotconsole/blob/main/DebugConsoleDialog.cs"
click node_plugins "https://github.com/lx934/mcbotconsole/blob/main/PluginDialog.cs"
click node_reports "https://github.com/lx934/mcbotconsole/blob/main/ReportDialog.cs"
click node_reportstore "https://github.com/lx934/mcbotconsole/blob/main/ReportManager.cs"
click node_patchui "https://github.com/lx934/mcbotconsole/blob/main/Patching/PatchDialog.cs"
click node_patchmanager "https://github.com/lx934/mcbotconsole/blob/main/Patching/PatchManager.cs"
click node_verifier "https://github.com/lx934/mcbotconsole/blob/main/Patching/OfficialVerifier.cs"
click node_updater "https://github.com/lx934/mcbotconsole/blob/main/updater/updater.cpp"
click node_updatecheck "https://github.com/lx934/mcbotconsole/blob/main/UpdateChecker.cs"
click node_version "https://github.com/lx934/mcbotconsole/blob/main/VersionInfo.cs"
click node_updatedialog "https://github.com/lx934/mcbotconsole/blob/main/UpdateDialog.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_main,node_settings,node_bridge,node_protocol toneBlue
class node_backend toneAmber
class node_diagnostics,node_network,node_dns,node_debug,node_plugins,node_reports,node_reportstore,node_minecraft toneMint
class node_patchui,node_patchmanager,node_verifier,node_updater,node_updatecheck,node_version,node_updatedialog toneRose
class node_user toneIndigo
```

## Components

### Desktop client

- [Main window](https://github.com/lx934/mcbotconsole/blob/main/MainForm.cs): `MainForm.cs`
- [Run settings](https://github.com/lx934/mcbotconsole/blob/main/SettingsDialog.cs): `SettingsDialog.cs`
- [Backend bridge](https://github.com/lx934/mcbotconsole/blob/main/NodeBackend.cs): `NodeBackend.cs`
- [Message models](https://github.com/lx934/mcbotconsole/blob/main/GuiMessage.cs): `GuiMessage.cs`

### Bot runtime

- [Bot and plugin runtime](https://github.com/lx934/mcbotconsole/blob/main/backend/index.js): `backend/index.js`

### Operations

- [Server analyzer](https://github.com/lx934/mcbotconsole/blob/main/ServerInfoDialog.cs): `ServerInfoDialog.cs`
- [Network probes](https://github.com/lx934/mcbotconsole/blob/main/NetworkTool.cs): `NetworkTool.cs`
- [DNS resolution](https://github.com/lx934/mcbotconsole/blob/main/DnsHelper.cs): `DnsHelper.cs`
- [Debug console](https://github.com/lx934/mcbotconsole/blob/main/DebugConsoleDialog.cs): `DebugConsoleDialog.cs`
- [Plugin manager](https://github.com/lx934/mcbotconsole/blob/main/PluginDialog.cs): `PluginDialog.cs`
- [Run reports](https://github.com/lx934/mcbotconsole/blob/main/ReportDialog.cs): `ReportDialog.cs`
- [Report storage](https://github.com/lx934/mcbotconsole/blob/main/ReportManager.cs): `ReportManager.cs`

### Maintenance

- [Patch interface](https://github.com/lx934/mcbotconsole/blob/main/Patching/PatchDialog.cs): `Patching/PatchDialog.cs`
- [Patch engine](https://github.com/lx934/mcbotconsole/blob/main/Patching/PatchManager.cs): `Patching/PatchManager.cs`
- [Patch verification](https://github.com/lx934/mcbotconsole/blob/main/Patching/OfficialVerifier.cs): `Patching/OfficialVerifier.cs`
- [Restart updater](https://github.com/lx934/mcbotconsole/blob/main/updater/updater.cpp): `updater/updater.cpp`
- [Update checker](https://github.com/lx934/mcbotconsole/blob/main/UpdateChecker.cs): `UpdateChecker.cs`
- [Version rules](https://github.com/lx934/mcbotconsole/blob/main/VersionInfo.cs): `VersionInfo.cs`
- [Update details](https://github.com/lx934/mcbotconsole/blob/main/UpdateDialog.cs): `UpdateDialog.cs`

### Other components

- **Operator**
- **Minecraft server**

## Connections

- Operator → Main window: operates (evidence: `README.md`)
- Main window → Run settings: opens (evidence: `MainForm.cs`)
- Main window → Backend bridge: sends run (evidence: `MainForm.cs`)
- Backend bridge → Bot and plugin runtime: exchanges messages
- Bot and plugin runtime → Minecraft server: connects bots (evidence: `README.md`)
- Main window → Server analyzer: opens (evidence: `MainForm.cs`)
- Server analyzer → Network probes: runs probes (evidence: `ServerInfoDialog.cs`)
- Main window → DNS resolution: resolves host (evidence: `MainForm.cs`)
- Main window → Debug console: opens (evidence: `MainForm.cs`)
- Main window → Plugin manager: opens (evidence: `MainForm.cs`)
- Main window → Run reports: opens (evidence: `MainForm.cs`)
- Run reports → Report storage: loads and exports (evidence: `ReportDialog.cs`)
- Main window → Patch interface: opens
- Patch interface → Patch engine: applies or rolls back (evidence: `README.md`)
- Patch engine → Patch verification: verifies patch
- Patch engine → Restart updater: restarts through
- Main window → Update checker: checks updates (evidence: `MainForm.cs`)
- Update checker → Version rules: compares versions (evidence: `UpdateChecker.cs`)
- Main window → Update details: shows details (evidence: `MainForm.cs`)
