# bzzzthe18th/monkemodmanager architecture

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

- Interactive diagram: https://gitdiagram.com/bzzzthe18th/monkemodmanager
- Repository: https://github.com/bzzzthe18th/monkemodmanager

## Overview

1. **What this repo is**
   - Monke Mod Manager is a Windows desktop installer/updater for Gorilla Tag mods.
   - Its main job is to fetch the latest GitHub releases for a curated mod list, then install or update those mods into the local game files.

2. **Top-level application shape**
   - The app is a **WinForms** program in the `MonkeModManager` project.
   - `Program.cs` is the entry point and launches the main UI.
   - The main screens are `FormMain` and `FormSelectPlatform`, so the app is largely a UI-driven installer rather than a service or library.

3. **User-facing flow**
   - The user starts in the main form, chooses a platform target when needed, and triggers install/update actions.
   - The installer then resolves what mods should be present, downloads the relevant release artifacts, and extracts them into the target game directory.
   - Re-running the app acts as an update mechanism as well as an initial installer.

4. **Mod catalog and release source**
   - `mods.json` is the central catalog of supported mods.
   - The README says mod versions are discovered through the **GitHub API**, so the app does not hardcode binaries; it pulls the latest release metadata at runtime.
   - This creates a clean boundary between the installer and the mod authors’ repositories.

5. **Package acquisition and extraction**
   - `Internals/ReleaseInfo.cs` likely models GitHub release data and the downloadable asset information.
   - `Internals/Unzip.cs` handles archive extraction, which is the final step before files are placed into the game install.
   - The installer therefore has a simple pipeline: metadata lookup → download asset → unzip to destination.

6. **JSON and data parsing**
   - `Internals/SimpleJson.cs` is a custom lightweight JSON parser/serializer used instead of a larger dependency.
   - This suggests the app keeps its runtime dependencies small and handles API responses or catalog data internally.

7. **Platform selection boundary**
   - `FormSelectPlatform` indicates there is an explicit platform split in the install target, likely because different Gorilla Tag distributions or runtime layouts need different output paths.
   - This selection is a key architectural boundary because it affects where files are installed and possibly which mod package variant is chosen.

8. **Local state and app configuration**
   - `app.config`, `Properties/Settings.*`, and `Properties/Resources.*` support desktop-app configuration, saved settings, and embedded UI/resources.
   - `app.manifest` shows the app is packaged as a classic Windows desktop executable with explicit Windows runtime behavior.
   - `update.txt` files in the repo/project likely serve as version/update markers for the app itself or its release packaging.

9. **External dependencies and environment**
   - The app depends on:
     - the **GitHub API** for release metadata,
     - the local filesystem for the Gorilla Tag install path,
     - zip archives for mod distribution.
   - The game installation is the primary external boundary: the manager does not host mods itself; it mutates a local third-party app directory.

10. **Build and release process**
   - The `.sln` and `.csproj` define a standard Visual Studio build.
   - `.github/workflows/actions.yml` indicates CI/release automation exists, likely for building or publishing releases.
   - `MonkeModManager.sln` and the WinForms designer files indicate a conventional Windows desktop release pipeline rather than a containerized or server-based architecture.

11. **How to diagram it**
   - A good architecture diagram would show:
     - the **WinForms UI layer**,
     - the **mod catalog / GitHub API metadata source**,
     - the **download + unzip installer pipeline**,
     - and the **local Gorilla Tag installation** as the final destination.
   - The main data flow is from `mods.json` and GitHub release metadata into downloaded archives, then into extracted files in the game directory.

Main entry points: [`MonkeModManager/FormMain.cs`](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/FormMain.cs) (Main Form), [`MonkeModManager/Program.cs`](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Program.cs) (Program), [`MonkeModManager/FormSelectPlatform.cs`](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/FormSelectPlatform.cs) (Platform Select), [`mods.json`](https://github.com/bzzzthe18th/monkemodmanager/blob/master/mods.json) (Mod Catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["UI"]
  node_program["Program<br/>entry<br/>[Program.cs]"]
  node_mainform["Main Form<br/>winforms<br/>[FormMain.cs]"]
  node_platformform["Platform Select<br/>winforms"]
end

subgraph group_core["Core"]
  node_modcatalog["Mod Catalog<br/>[mods.json]"]
  node_releaseinfo["Release Info<br/>metadata<br/>[ReleaseInfo.cs]"]
  node_jsonparser["Simple JSON<br/>parser<br/>[SimpleJson.cs]"]
  node_unzip["Unzip<br/>extractor<br/>[Unzip.cs]"]
  node_download["Download<br/>fetch step"]
end

subgraph group_config["Config"]
  node_settings["Settings<br/>[Settings.settings]"]
  node_resources["Resources<br/>[Resources.resx]"]
  node_appconfig["App Config<br/>runtime config<br/>[app.config]"]
  node_manifest["Manifest<br/>[app.manifest]"]
end

subgraph group_build["Build"]
  node_solution["Solution<br/>build definition"]
  node_workflow["CI Workflow<br/>[actions.yml]"]
end

node_githubapi(("GitHub API<br/>external api"))
node_gameinstall[("Game Install<br/>external fs")]

node_program -->|"starts"| node_mainform
node_mainform -->|"asks"| node_platformform
node_mainform -->|"loads"| node_modcatalog
node_modcatalog -->|"queries"| node_githubapi
node_githubapi -->|"returns"| node_releaseinfo
node_releaseinfo -->|"drives"| node_download
node_download -->|"passes archive"| node_unzip
node_unzip -->|"writes"| node_gameinstall
node_platformform -->|"selects target"| node_gameinstall
node_settings -->|"persists"| node_mainform
node_resources -->|"supplies"| node_mainform
node_appconfig -.->|"configures"| node_program
node_manifest -.->|"declares"| node_program
node_solution -.->|"built by"| node_workflow

click node_program "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Program.cs"
click node_mainform "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/FormMain.cs"
click node_platformform "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/FormSelectPlatform.cs"
click node_modcatalog "https://github.com/bzzzthe18th/monkemodmanager/blob/master/mods.json"
click node_releaseinfo "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Internals/ReleaseInfo.cs"
click node_jsonparser "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Internals/SimpleJson.cs"
click node_unzip "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Internals/Unzip.cs"
click node_settings "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Properties/Settings.settings"
click node_resources "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Properties/Resources.resx"
click node_appconfig "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/app.config"
click node_manifest "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/app.manifest"
click node_solution "https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager.sln"
click node_workflow "https://github.com/bzzzthe18th/monkemodmanager/blob/master/.github/workflows/actions.yml"

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_mainform,node_platformform toneBlue
class node_modcatalog,node_releaseinfo,node_jsonparser,node_unzip,node_download toneAmber
class node_settings,node_resources,node_appconfig,node_manifest toneMint
class node_solution,node_workflow toneRose
class node_githubapi,node_gameinstall toneNeutral
```

## Components

### UI

WinForms screens and startup entry point.

- [Program](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Program.cs): entry · Application entry point that launches the WinForms UI. · `MonkeModManager/Program.cs`
- [Main Form](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/FormMain.cs): winforms · Primary installer and updater screen. · `MonkeModManager/FormMain.cs`
- [Platform Select](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/FormSelectPlatform.cs): winforms · Platform selection dialog that influences install targets. · `MonkeModManager/FormSelectPlatform.cs`

### Core

Catalog, release handling, JSON parsing, and archive extraction.

- [Mod Catalog](https://github.com/bzzzthe18th/monkemodmanager/blob/master/mods.json): catalog · Curated list of supported mods and their metadata source. · `mods.json`
- [Release Info](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Internals/ReleaseInfo.cs): metadata · Models GitHub release data and downloadable assets. · `MonkeModManager/Internals/ReleaseInfo.cs`
- [Simple JSON](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Internals/SimpleJson.cs): parser · Lightweight JSON parsing and serialization utility. · `MonkeModManager/Internals/SimpleJson.cs`
- [Unzip](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Internals/Unzip.cs): extractor · Archive extraction step used before files are written to the game install. · `MonkeModManager/Internals/Unzip.cs`
- **Download**: fetch step · Retrieves release assets referenced by metadata.

### Config

App settings, resources, and desktop runtime configuration.

- [Settings](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Properties/Settings.settings): app settings · Persistent desktop app settings. · `MonkeModManager/Properties/Settings.settings`
- [Resources](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/Properties/Resources.resx): embedded resources · Embedded UI assets and localized strings. · `MonkeModManager/Properties/Resources.resx`
- [App Config](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/app.config): runtime config · Classic Windows application configuration. · `MonkeModManager/app.config`
- [Manifest](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager/app.manifest): desktop manifest · Windows desktop execution and compatibility settings. · `MonkeModManager/app.manifest`

### Build

Solution and CI workflow files.

- [Solution](https://github.com/bzzzthe18th/monkemodmanager/blob/master/MonkeModManager.sln): build definition · Visual Studio solution for the desktop app. · `MonkeModManager.sln`
- [CI Workflow](https://github.com/bzzzthe18th/monkemodmanager/blob/master/.github/workflows/actions.yml): ci · GitHub Actions automation for building or releasing the app. · `.github/workflows/actions.yml`

### Other components

- **GitHub API**: external api · Source of latest release metadata for supported mods.
- **Game Install**: external fs · Local Gorilla Tag directory mutated by installs and updates.

## Connections

- Program → Main Form: starts · Launches the primary installer window.
- Main Form → Platform Select: asks · Prompts for platform when install target needs disambiguation.
- Main Form → Mod Catalog: loads · Reads the curated mod list to determine what should be installed.
- Mod Catalog → GitHub API: queries · Uses GitHub release metadata as the authoritative version source.
- GitHub API → Release Info: returns · Populates release and asset models from API responses.
- Release Info → Download: drives · Identifies the asset to fetch for installation.
- Download → Unzip: passes archive · Hands the downloaded package to the extraction step.
- Unzip → Game Install: writes · Extracts mod files into the local Gorilla Tag directory.
- Platform Select → Game Install: selects target · Chooses the destination layout for the install.
- Settings → Main Form: persists · Stores user preferences and previous app state.
- Resources → Main Form: supplies · Provides embedded UI assets and strings.
- App Config → Program: configures · Supplies desktop runtime configuration.
- Manifest → Program: declares · Defines Windows application behavior at launch.
- Solution → CI Workflow: built by · Source project is packaged through the CI workflow.
