# patricklumowa/project-remnants-setup architecture

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

- Interactive diagram: https://gitdiagram.com/patricklumowa/project-remnants-setup
- Repository: https://github.com/patricklumowa/project-remnants-setup

## Overview

Project Remnants Setup is a Windows installer and configuration utility for the Project Zomboid NPCFW Java agent, with optional local Ollama and remote API model setup. The main workflow starts in the GUI or command line, locates the game and agent, configures the game’s Java arguments and dependencies, and saves provider settings. Separate model-catalog and benchmark capabilities support choosing and assessing local models. Edges are limited to calls and relationships visible in excerpts or the source index; unsampled modules are represented only where documented by those references.

Main entry points: [`src/ProjectRemnants.Setup/MainForm.cs`](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/MainForm.cs) (Setup window), [`src/ProjectRemnants.Setup/Install/ProjectZomboidConfig.cs`](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Install/ProjectZomboidConfig.cs) (Game config editing), [`src/ProjectRemnants.Setup/Llm/ModelCatalogForm.cs`](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/ModelCatalogForm.cs) (Model catalog), [`src/ProjectRemnants.Setup/Llm/OllamaDriver.cs`](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/OllamaDriver.cs) (Ollama runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_program["Application entry<br/>[Program.cs]"]
  node_cli["Command-line modes<br/>[CommandLine.cs]"]
  node_gui["Setup window<br/>[MainForm.cs]"]
  node_elevation["Elevated restart<br/>[Elevation.cs]"]
end

subgraph group_install["Game installation"]
  node_locator["Game discovery<br/>[GameLocator.cs]"]
  node_agent["Agent discovery<br/>[AgentLocator.cs]"]
  node_gameconfig["Game config editing"]
  node_dependencies["Agent dependencies"]
  node_gamefiles[("Game installation files")]
end

subgraph group_models["Model setup"]
  node_configstore[("Provider settings")]
  node_catalogform["Model catalog"]
  node_ollama["Ollama runtime<br/>[OllamaDriver.cs]"]
  node_catalog["Ollama catalog<br/>[OllamaCatalog.cs]"]
  node_fit["Model fit assessment<br/>[ModelFit.cs]"]
  node_remote["Remote API bridge<br/>[RemoteApiBridge.cs]"]
  node_discovery["Remote model discovery"]
end

subgraph group_benchmark["Model benchmarking"]
  node_benchmarkform["Benchmark interface<br/>[BenchmarkForm.cs]"]
  node_benchmarkpack["Benchmark pack<br/>[BenchmarkPack.cs]"]
  node_benchmarkrun["Ollama benchmark<br/>[OllamaBenchmark.cs]"]
end

node_user(("Setup user"))

node_user -->|"launches"| node_program
node_program -->|"dispatches arguments"| node_cli
node_program -->|"opens by default"| node_gui
node_cli -->|"installs or removes"| node_gameconfig
node_gui -->|"discovers installs"| node_locator
node_gui -->|"finds agent"| node_agent
node_gui -->|"configures game"| node_gameconfig
node_gui -.->|"manages files"| node_dependencies
node_gui -.->|"restarts elevated"| node_elevation
node_gameconfig -->|"validates agent path"| node_agent
node_gameconfig -->|"manages dependencies"| node_dependencies
node_gameconfig -->|"edits configuration"| node_gamefiles
node_dependencies -->|"backs up and installs"| node_gamefiles
node_gui -->|"loads and saves"| node_configstore
node_gui -->|"configures provider"| node_ollama
node_gui -->|"configures provider"| node_remote
node_gui -->|"opens catalog"| node_catalogform
node_gui -->|"discovers remote models"| node_discovery
node_catalogform -->|"queries and pulls"| node_ollama
node_catalogform -->|"loads catalog"| node_catalog
node_catalogform -->|"evaluates model sizes"| node_fit
node_ollama -->|"uses sizing rules"| node_fit
node_gui -->|"opens benchmark"| node_benchmarkform
node_benchmarkform -.->|"uses pack"| node_benchmarkpack
node_benchmarkform -.->|"runs benchmarks"| node_benchmarkrun
node_benchmarkrun -.->|"tests local models"| node_ollama

click node_program "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Program.cs"
click node_cli "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/CommandLine.cs"
click node_gui "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/MainForm.cs"
click node_elevation "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Elevation.cs"
click node_locator "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Install/GameLocator.cs"
click node_agent "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Install/AgentLocator.cs"
click node_gameconfig "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Install/ProjectZomboidConfig.cs"
click node_dependencies "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Install/JavaAgentDependencies.cs"
click node_configstore "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/LlmConfigurationStore.cs"
click node_catalogform "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/ModelCatalogForm.cs"
click node_ollama "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/OllamaDriver.cs"
click node_catalog "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/OllamaCatalog.cs"
click node_fit "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/ModelFit.cs"
click node_remote "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/RemoteApiBridge.cs"
click node_discovery "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/RemoteModelDiscovery.cs"
click node_benchmarkform "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Benchmark/BenchmarkForm.cs"
click node_benchmarkpack "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Benchmark/BenchmarkPack.cs"
click node_benchmarkrun "https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Benchmark/OllamaBenchmark.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_cli,node_gui,node_elevation,node_user toneBlue
class node_locator,node_agent,node_gameconfig,node_dependencies,node_gamefiles toneAmber
class node_configstore,node_catalogform,node_ollama,node_catalog,node_fit,node_remote,node_discovery toneMint
class node_benchmarkform,node_benchmarkpack,node_benchmarkrun toneRose
```

## Components

### Application entry

- [Application entry](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Program.cs): `src/ProjectRemnants.Setup/Program.cs`
- [Command-line modes](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/CommandLine.cs): `src/ProjectRemnants.Setup/CommandLine.cs`
- [Setup window](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/MainForm.cs): `src/ProjectRemnants.Setup/MainForm.cs`
- [Elevated restart](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Elevation.cs): `src/ProjectRemnants.Setup/Elevation.cs`

### Game installation

- [Game discovery](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Install/GameLocator.cs): `src/ProjectRemnants.Setup/Install/GameLocator.cs`
- [Agent discovery](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Install/AgentLocator.cs): `src/ProjectRemnants.Setup/Install/AgentLocator.cs`
- [Game config editing](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Install/ProjectZomboidConfig.cs): `src/ProjectRemnants.Setup/Install/ProjectZomboidConfig.cs`
- [Agent dependencies](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Install/JavaAgentDependencies.cs): `src/ProjectRemnants.Setup/Install/JavaAgentDependencies.cs`
- **Game installation files**

### Model setup

- [Provider settings](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/LlmConfigurationStore.cs): `src/ProjectRemnants.Setup/Llm/LlmConfigurationStore.cs`
- [Model catalog](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/ModelCatalogForm.cs): `src/ProjectRemnants.Setup/Llm/ModelCatalogForm.cs`
- [Ollama runtime](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/OllamaDriver.cs): `src/ProjectRemnants.Setup/Llm/OllamaDriver.cs`
- [Ollama catalog](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/OllamaCatalog.cs): `src/ProjectRemnants.Setup/Llm/OllamaCatalog.cs`
- [Model fit assessment](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/ModelFit.cs): `src/ProjectRemnants.Setup/Llm/ModelFit.cs`
- [Remote API bridge](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/RemoteApiBridge.cs): `src/ProjectRemnants.Setup/Llm/RemoteApiBridge.cs`
- [Remote model discovery](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Llm/RemoteModelDiscovery.cs): `src/ProjectRemnants.Setup/Llm/RemoteModelDiscovery.cs`

### Model benchmarking

- [Benchmark interface](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Benchmark/BenchmarkForm.cs): `src/ProjectRemnants.Setup/Benchmark/BenchmarkForm.cs`
- [Benchmark pack](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Benchmark/BenchmarkPack.cs): `src/ProjectRemnants.Setup/Benchmark/BenchmarkPack.cs`
- [Ollama benchmark](https://github.com/patricklumowa/project-remnants-setup/blob/main/src/ProjectRemnants.Setup/Benchmark/OllamaBenchmark.cs): `src/ProjectRemnants.Setup/Benchmark/OllamaBenchmark.cs`

### Other components

- **Setup user**

## Connections

- Setup user → Application entry: launches (evidence: `src/ProjectRemnants.Setup/Program.cs`)
- Application entry → Command-line modes: dispatches arguments (evidence: `src/ProjectRemnants.Setup/Program.cs`)
- Application entry → Setup window: opens by default (evidence: `src/ProjectRemnants.Setup/Program.cs`)
- Command-line modes → Game config editing: installs or removes (evidence: `src/ProjectRemnants.Setup/CommandLine.cs`)
- Setup window → Game discovery: discovers installs (evidence: `src/ProjectRemnants.Setup/MainForm.cs`)
- Setup window → Agent discovery: finds agent (evidence: `src/ProjectRemnants.Setup/MainForm.cs`)
- Setup window → Game config editing: configures game (evidence: `src/ProjectRemnants.Setup/MainForm.cs`)
- Setup window → Agent dependencies: manages files
- Setup window → Elevated restart: restarts elevated (evidence: `src/ProjectRemnants.Setup/MainForm.cs`)
- Game config editing → Agent discovery: validates agent path (evidence: `src/ProjectRemnants.Setup/Install/ProjectZomboidConfig.cs`)
- Game config editing → Agent dependencies: manages dependencies (evidence: `src/ProjectRemnants.Setup/Install/ProjectZomboidConfig.cs`)
- Game config editing → Game installation files: edits configuration (evidence: `src/ProjectRemnants.Setup/Install/ProjectZomboidConfig.cs`)
- Agent dependencies → Game installation files: backs up and installs (evidence: `src/ProjectRemnants.Setup/Install/JavaAgentDependencies.cs`)
- Setup window → Provider settings: loads and saves (evidence: `src/ProjectRemnants.Setup/MainForm.cs`)
- Setup window → Ollama runtime: configures provider (evidence: `src/ProjectRemnants.Setup/MainForm.cs`)
- Setup window → Remote API bridge: configures provider (evidence: `src/ProjectRemnants.Setup/MainForm.cs`)
- Setup window → Model catalog: opens catalog (evidence: `src/ProjectRemnants.Setup/MainForm.cs`)
- Setup window → Remote model discovery: discovers remote models (evidence: `src/ProjectRemnants.Setup/MainForm.cs`)
- Model catalog → Ollama runtime: queries and pulls (evidence: `src/ProjectRemnants.Setup/Llm/ModelCatalogForm.cs`)
- Model catalog → Ollama catalog: loads catalog (evidence: `src/ProjectRemnants.Setup/Llm/ModelCatalogForm.cs`)
- Model catalog → Model fit assessment: evaluates model sizes (evidence: `src/ProjectRemnants.Setup/Llm/ModelCatalogForm.cs`)
- Ollama runtime → Model fit assessment: uses sizing rules (evidence: `src/ProjectRemnants.Setup/Llm/OllamaDriver.cs`)
- Setup window → Benchmark interface: opens benchmark (evidence: `src/ProjectRemnants.Setup/MainForm.cs`)
- Benchmark interface → Benchmark pack: uses pack
- Benchmark interface → Ollama benchmark: runs benchmarks
- Ollama benchmark → Ollama runtime: tests local models
