# n3rdmade/content-installer architecture

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

- Interactive diagram: https://gitdiagram.com/n3rdmade/content-installer
- Repository: https://github.com/n3rdmade/content-installer

## Overview

Content Installer is a Calagopus Panel extension for discovering, installing, and managing Minecraft plugins, mods, datapacks, and modpacks. The main workflow detects the server and Minecraft version, then filters browsable content or modpacks, resolves versions, and sends installs through panel APIs; users can also identify, update, or remove installed files. Backend routes handle installation, removal, CurseForge proxying, and settings, while embedded Wings scripts perform modpack installation. Source excerpts show key calls; additional capabilities and integrations are included where the README documents them.

Main entry points: [`backend/src/lib.rs`](https://github.com/n3rdmade/content-installer/blob/main/backend/src/lib.rs) (Install and file routes), [`frontend/src/ContentInstallerPage.tsx`](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/ContentInstallerPage.tsx) (Installer page), [`frontend/src/BrowseTab.tsx`](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/BrowseTab.tsx) (Content browser), [`frontend/src/ModpacksTab.tsx`](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/ModpacksTab.tsx) (Modpack browser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery and browsing"]
  node_page["Installer page"]
  node_detection["Server detection<br/>[detect.ts]"]
  node_browse["Content browser<br/>[BrowseTab.tsx]"]
  node_versions["Version formatting<br/>[versions.ts]"]
end

subgraph group_content["Content lifecycle"]
  node_modpacks["Modpack browser<br/>[ModpacksTab.tsx]"]
  node_manage["Installed content manager<br/>[ManageTab.tsx]"]
end

subgraph group_backend["Backend and installation"]
  node_cf_proxy["CurseForge proxy routes<br/>[curseforge.rs]"]
  node_api_routes["Install and file routes<br/>[lib.rs]"]
  node_install_scripts["Modpack install scripts<br/>[install_script.rs]"]
  node_settings[("Extension settings<br/>[settings.rs]")]
  node_admin_config["Admin configuration"]
end

subgraph group_integrations["External services"]
  node_modrinth_client["Modrinth client<br/>[modrinth.ts]"]
  node_curseforge_client["CurseForge client<br/>[curseforge.ts]"]
  node_modrinth["Modrinth API"]
  node_curseforge["CurseForge API"]
  node_wings["Wings installation flow"]
  node_server_files[("Server files")]
end

node_user(("Panel user"))
node_panel["Calagopus Panel"]

node_user -->|"opens"| node_page
node_page -->|"detects server"| node_detection
node_page -->|"renders"| node_browse
node_page -->|"renders"| node_manage
node_page -->|"renders"| node_modpacks
node_browse -->|"searches"| node_modrinth_client
node_browse -->|"searches"| node_curseforge_client
node_browse -->|"formats versions"| node_versions
node_modpacks -->|"searches"| node_modrinth_client
node_modpacks -->|"searches"| node_curseforge_client
node_manage -->|"identifies files"| node_modrinth_client
node_manage -->|"lists files"| node_server_files
node_modrinth_client -->|"queries"| node_modrinth
node_curseforge_client -->|"calls proxy"| node_cf_proxy
node_cf_proxy -->|"fetches"| node_curseforge
node_cf_proxy -->|"reads key"| node_settings
node_admin_config -->|"configures"| node_settings
node_browse -->|"installs content"| node_api_routes
node_manage -->|"updates or removes"| node_api_routes
node_modpacks -->|"requests install"| node_api_routes
node_api_routes -->|"registers routes"| node_cf_proxy
node_api_routes -->|"loads settings"| node_settings
node_api_routes -->|"uses scripts"| node_install_scripts
node_api_routes -->|"starts install flow"| node_wings
node_install_scripts -->|"installs files"| node_server_files
node_api_routes -->|"writes or removes"| node_server_files
node_detection -->|"reads server metadata"| node_server_files

click node_page "https://github.com/n3rdmade/content-installer/blob/main/frontend/src/ContentInstallerPage.tsx"
click node_detection "https://github.com/n3rdmade/content-installer/blob/main/frontend/src/detect.ts"
click node_browse "https://github.com/n3rdmade/content-installer/blob/main/frontend/src/BrowseTab.tsx"
click node_versions "https://github.com/n3rdmade/content-installer/blob/main/frontend/src/versions.ts"
click node_modpacks "https://github.com/n3rdmade/content-installer/blob/main/frontend/src/ModpacksTab.tsx"
click node_manage "https://github.com/n3rdmade/content-installer/blob/main/frontend/src/ManageTab.tsx"
click node_modrinth_client "https://github.com/n3rdmade/content-installer/blob/main/frontend/src/modrinth.ts"
click node_curseforge_client "https://github.com/n3rdmade/content-installer/blob/main/frontend/src/curseforge.ts"
click node_cf_proxy "https://github.com/n3rdmade/content-installer/blob/main/backend/src/curseforge.rs"
click node_api_routes "https://github.com/n3rdmade/content-installer/blob/main/backend/src/lib.rs"
click node_install_scripts "https://github.com/n3rdmade/content-installer/blob/main/backend/src/install_script.rs"
click node_settings "https://github.com/n3rdmade/content-installer/blob/main/backend/src/settings.rs"
click node_admin_config "https://github.com/n3rdmade/content-installer/blob/main/frontend/src/AdminConfigPage.tsx"

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_page,node_detection,node_browse,node_versions,node_user toneBlue
class node_modpacks,node_manage toneAmber
class node_cf_proxy,node_api_routes,node_install_scripts,node_settings,node_admin_config toneMint
class node_modrinth_client,node_curseforge_client,node_modrinth,node_curseforge,node_wings,node_server_files toneRose
class node_panel toneIndigo
```

## Components

### Discovery and browsing

- [Installer page](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/ContentInstallerPage.tsx): `frontend/src/ContentInstallerPage.tsx`
- [Server detection](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/detect.ts): `frontend/src/detect.ts`
- [Content browser](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/BrowseTab.tsx): `frontend/src/BrowseTab.tsx`
- [Version formatting](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/versions.ts): `frontend/src/versions.ts`

### Content lifecycle

- [Modpack browser](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/ModpacksTab.tsx): `frontend/src/ModpacksTab.tsx`
- [Installed content manager](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/ManageTab.tsx): `frontend/src/ManageTab.tsx`

### Backend and installation

- [CurseForge proxy routes](https://github.com/n3rdmade/content-installer/blob/main/backend/src/curseforge.rs): `backend/src/curseforge.rs`
- [Install and file routes](https://github.com/n3rdmade/content-installer/blob/main/backend/src/lib.rs): `backend/src/lib.rs`
- [Modpack install scripts](https://github.com/n3rdmade/content-installer/blob/main/backend/src/install_script.rs): `backend/src/install_script.rs`
- [Extension settings](https://github.com/n3rdmade/content-installer/blob/main/backend/src/settings.rs): `backend/src/settings.rs`
- [Admin configuration](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/AdminConfigPage.tsx): `frontend/src/AdminConfigPage.tsx`

### External services

- [Modrinth client](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/modrinth.ts): `frontend/src/modrinth.ts`
- [CurseForge client](https://github.com/n3rdmade/content-installer/blob/main/frontend/src/curseforge.ts): `frontend/src/curseforge.ts`
- **Modrinth API**
- **CurseForge API**
- **Wings installation flow**
- **Server files**

### Other components

- **Panel user**
- **Calagopus Panel**

## Connections

- Panel user → Installer page: opens (evidence: `README.md`)
- Installer page → Server detection: detects server (evidence: `frontend/src/ContentInstallerPage.tsx`)
- Installer page → Content browser: renders (evidence: `frontend/src/ContentInstallerPage.tsx`)
- Installer page → Installed content manager: renders (evidence: `frontend/src/ContentInstallerPage.tsx`)
- Installer page → Modpack browser: renders (evidence: `frontend/src/ContentInstallerPage.tsx`)
- Content browser → Modrinth client: searches (evidence: `frontend/src/BrowseTab.tsx`)
- Content browser → CurseForge client: searches (evidence: `frontend/src/BrowseTab.tsx`)
- Content browser → Version formatting: formats versions (evidence: `frontend/src/BrowseTab.tsx`)
- Modpack browser → Modrinth client: searches (evidence: `frontend/src/ModpacksTab.tsx`)
- Modpack browser → CurseForge client: searches (evidence: `frontend/src/ModpacksTab.tsx`)
- Installed content manager → Modrinth client: identifies files (evidence: `frontend/src/ManageTab.tsx`)
- Installed content manager → Server files: lists files (evidence: `frontend/src/ManageTab.tsx`)
- Modrinth client → Modrinth API: queries (evidence: `frontend/src/modrinth.ts`)
- CurseForge client → CurseForge proxy routes: calls proxy (evidence: `frontend/src/curseforge.ts`)
- CurseForge proxy routes → CurseForge API: fetches (evidence: `backend/src/curseforge.rs`)
- CurseForge proxy routes → Extension settings: reads key (evidence: `backend/src/curseforge.rs`)
- Admin configuration → Extension settings: configures (evidence: `README.md`)
- Content browser → Install and file routes: installs content (evidence: `README.md`)
- Installed content manager → Install and file routes: updates or removes (evidence: `README.md`)
- Modpack browser → Install and file routes: requests install (evidence: `README.md`)
- Install and file routes → CurseForge proxy routes: registers routes (evidence: `backend/src/lib.rs`)
- Install and file routes → Extension settings: loads settings (evidence: `backend/src/lib.rs`)
- Install and file routes → Modpack install scripts: uses scripts (evidence: `backend/src/lib.rs`)
- Install and file routes → Wings installation flow: starts install flow (evidence: `README.md`)
- Modpack install scripts → Server files: installs files (evidence: `README.md`)
- Install and file routes → Server files: writes or removes (evidence: `README.md`)
- Server detection → Server files: reads server metadata (evidence: `frontend/src/detect.ts`)
