# metaltrack/mcservermanager architecture

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

- Interactive diagram: https://gitdiagram.com/metaltrack/mcservermanager
- Repository: https://github.com/metaltrack/mcservermanager

## Overview

MCServerManager is a console-oriented Minecraft server launcher with supporting Java runtime checks, Git commands, and webhook notifications. The implemented workflow in Program.cs prompts for a repository path, checks Java, starts a configured server process, reports start/stop notifications, and waits for exit. ServerManager provides a separate coordination layer, but the shown entry point does not use it. README.md only names the project; GUI, Git synchronization, and richer lifecycle behavior appear as comments or state definitions, so they are not presented as implemented workflows.

Main entry points: [`MCServerManager.Core/ServerManager.cs`](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/ServerManager.cs) (Server coordinator), [`Program.cs`](https://github.com/metaltrack/mcservermanager/blob/master/Program.cs) (Console workflow), [`MCServerManager.Core/Services/NotificationService.cs`](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Services/NotificationService.cs) (Webhook notices), [`MCServerManager.Core/Services/JavaHandlerService.cs`](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Services/JavaHandlerService.cs) (Java checker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application flow"]
  node_program["Console workflow<br/>[Program.cs]"]
  node_manager["Server coordinator<br/>[ServerManager.cs]"]
end

subgraph group_runtime["Server runtime"]
  node_java["Java checker"]
  node_minecraft["Server process"]
  node_notification["Webhook notices"]
end

subgraph group_repository["Repository tools"]
  node_git["Git commands<br/>[GitService.cs]"]
end

subgraph group_models["Domain data"]
  node_javainfo["Java details<br/>[JavaInfo.cs]"]
  node_server_profile["Server profile<br/>[ServerProfile.cs]"]
  node_server_state["Lifecycle state<br/>[ServerState.cs]"]
  node_git_result["Git result<br/>[GitResult.cs]"]
  node_user_model["User details<br/>[UserModel.cs]"]
end

node_operator(("Operator"))
node_java_runtime["Java runtime"]
node_git_cli["Git CLI"]
node_webhook["Webhook endpoint"]

node_operator -->|"provides path"| node_program
node_program -->|"checks Java"| node_java
node_java -->|"runs version check"| node_java_runtime
node_java -->|"updates details"| node_javainfo
node_program -->|"configures"| node_server_profile
node_program -->|"starts and awaits"| node_minecraft
node_minecraft -->|"reads settings"| node_server_profile
node_minecraft -->|"launches process"| node_java_runtime
node_program -->|"sends notices"| node_notification
node_notification -->|"formats notice"| node_server_profile
node_notification -->|"formats notice"| node_user_model
node_notification -->|"posts message"| node_webhook
node_manager -->|"retains profile"| node_server_profile
node_manager -->|"tracks state"| node_server_state
node_manager -->|"creates helper"| node_git
node_manager -->|"creates helper"| node_java
node_manager -->|"creates process service"| node_minecraft
node_git -->|"runs commands"| node_git_cli
node_git -->|"returns result"| node_git_result

click node_program "https://github.com/metaltrack/mcservermanager/blob/master/Program.cs"
click node_manager "https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/ServerManager.cs"
click node_java "https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Services/JavaHandlerService.cs"
click node_javainfo "https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Models/JavaInfo.cs"
click node_minecraft "https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Services/MinecraftServerService.cs"
click node_server_profile "https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Models/ServerProfile.cs"
click node_server_state "https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Models/ServerState.cs"
click node_git "https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Services/GitService.cs"
click node_git_result "https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Models/GitResult.cs"
click node_notification "https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Services/NotificationService.cs"
click node_user_model "https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Models/UserModel.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_program,node_manager toneBlue
class node_java,node_minecraft,node_notification toneAmber
class node_git,node_webhook toneMint
class node_javainfo,node_server_profile,node_server_state,node_git_result,node_user_model toneRose
class node_operator,node_java_runtime,node_git_cli toneIndigo
```

## Components

### Application flow

- [Console workflow](https://github.com/metaltrack/mcservermanager/blob/master/Program.cs): `Program.cs`
- [Server coordinator](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/ServerManager.cs): `MCServerManager.Core/ServerManager.cs`

### Server runtime

- [Java checker](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Services/JavaHandlerService.cs): `MCServerManager.Core/Services/JavaHandlerService.cs`
- [Server process](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Services/MinecraftServerService.cs): `MCServerManager.Core/Services/MinecraftServerService.cs`
- [Webhook notices](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Services/NotificationService.cs): `MCServerManager.Core/Services/NotificationService.cs`

### Repository tools

- [Git commands](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Services/GitService.cs): `MCServerManager.Core/Services/GitService.cs`

### Domain data

- [Java details](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Models/JavaInfo.cs): `MCServerManager.Core/Models/JavaInfo.cs`
- [Server profile](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Models/ServerProfile.cs): `MCServerManager.Core/Models/ServerProfile.cs`
- [Lifecycle state](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Models/ServerState.cs): `MCServerManager.Core/Models/ServerState.cs`
- [Git result](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Models/GitResult.cs): `MCServerManager.Core/Models/GitResult.cs`
- [User details](https://github.com/metaltrack/mcservermanager/blob/master/MCServerManager.Core/Models/UserModel.cs): `MCServerManager.Core/Models/UserModel.cs`

### Other components

- **Operator**
- **Java runtime**
- **Git CLI**
- **Webhook endpoint**

## Connections

- Operator → Console workflow: provides path (evidence: `Program.cs`)
- Console workflow → Java checker: checks Java (evidence: `Program.cs`)
- Java checker → Java runtime: runs version check (evidence: `MCServerManager.Core/Services/JavaHandlerService.cs`)
- Java checker → Java details: updates details (evidence: `MCServerManager.Core/Services/JavaHandlerService.cs`)
- Console workflow → Server profile: configures (evidence: `Program.cs`)
- Console workflow → Server process: starts and awaits (evidence: `Program.cs`)
- Server process → Server profile: reads settings (evidence: `MCServerManager.Core/Services/MinecraftServerService.cs`)
- Server process → Java runtime: launches process (evidence: `MCServerManager.Core/Services/MinecraftServerService.cs`)
- Console workflow → Webhook notices: sends notices (evidence: `Program.cs`)
- Webhook notices → Server profile: formats notice (evidence: `MCServerManager.Core/Services/NotificationService.cs`)
- Webhook notices → User details: formats notice (evidence: `MCServerManager.Core/Services/NotificationService.cs`)
- Webhook notices → Webhook endpoint: posts message (evidence: `MCServerManager.Core/Services/NotificationService.cs`)
- Server coordinator → Server profile: retains profile (evidence: `MCServerManager.Core/ServerManager.cs`)
- Server coordinator → Lifecycle state: tracks state (evidence: `MCServerManager.Core/ServerManager.cs`)
- Server coordinator → Git commands: creates helper (evidence: `MCServerManager.Core/ServerManager.cs`)
- Server coordinator → Java checker: creates helper (evidence: `MCServerManager.Core/ServerManager.cs`)
- Server coordinator → Server process: creates process service (evidence: `MCServerManager.Core/ServerManager.cs`)
- Git commands → Git CLI: runs commands (evidence: `MCServerManager.Core/Services/GitService.cs`)
- Git commands → Git result: returns result (evidence: `MCServerManager.Core/Services/GitService.cs`)
