Multiple packs, browser setup, pack links and a single Docker image #1

Merged
Bewerkt merged 1 commit from claude/minecraft-mod-manager-h5capw into main 2026-10-12 13:06:54 +00:00
Bewerkt commented 2026-10-12 12:59:01 +00:00 (Migrated from github.com)

What changes

Server

  • Multiple modpacks per instance. Each pack gets a link derived from its name: "My Test Pack" → https://<host>/pack/my-test-pack. Optional unlisted links with a random code, plus duplicate and delete.
  • First start is set up entirely in the browser. It is claimed with a one-time setup code from the server log; then you create an admin account and set the address and HTTPS mode. All settings live in the database, with no .env or environment variables.
  • Per pack there is a public page (mod list, join steps, ManageMod download), manifest.json and jar downloads. Modrinth/CurseForge mods get their official CDN link in the manifest.
  • The admin UI is reworked: pack overview, pack detail (mods / add mods / pack settings), instance settings (address, HTTPS, CurseForge key, upload limit).
  • The pack token is removed; the link is the access (unlisted for private packs, with rate limiting against guessing).

Mod

  • Configured with a single packUrl instead of server URL + token.
  • On first start a window asks for the pack link. It runs in a separate process, so it never clashes with Minecraft's window. It checks the link and loader/MC version before saving.
  • Dedicated servers: java -jar mods/managemod.jar join <link> or MANAGEMOD_PACK_URL.
  • Downloads come from the trusted CDNs (Modrinth/CurseForge) first and fall back to the pack server; SHA-256 is always verified.

Docker

  • One image (ghcr.io/bewerkt/managemod) containing the server, the mod jar and Caddy. Caddy requests certificates on demand, only for the configured host. All data lives in /data.
  • A workflow publishes the image on pushes to main and attaches the jar to v* releases. CI now also builds the Docker image.

Tests

  • Server: 22 tests (setup code, CSRF, packs/slugs/unlisted, uploads, per-pack downloads, XSS escaping on the pack page, settings without leaking secrets).
  • Mod: 28 tests (link parsing, trusted mirrors, sync logic).
  • Manual: the setup → create pack → upload → pack page flow in a headless browser; join + sync against a running server; the first-start window driven with a robot in Xvfb; the container (Caddy proxying, internal endpoint not reachable from outside, certificate approval only for the configured host, HTTPS redirect).
  • Not tested locally: the real apk/setcap/Gradle steps of the Dockerfile (blocked by the sandbox network). CI's new Docker job builds them.

🤖 Generated with Claude Code

https://claude.ai/code/session_016zdMyacgAzBQEBSiHc6aZJ


Generated by Claude Code

## What changes **Server** - Multiple modpacks per instance. Each pack gets a link derived from its name: "My Test Pack" → `https://<host>/pack/my-test-pack`. Optional *unlisted* links with a random code, plus duplicate and delete. - First start is set up entirely in the browser. It is claimed with a one-time setup code from the server log; then you create an admin account and set the address and HTTPS mode. All settings live in the database, with no `.env` or environment variables. - Per pack there is a public page (mod list, join steps, ManageMod download), `manifest.json` and jar downloads. Modrinth/CurseForge mods get their official CDN link in the manifest. - The admin UI is reworked: pack overview, pack detail (mods / add mods / pack settings), instance settings (address, HTTPS, CurseForge key, upload limit). - The pack token is removed; the link is the access (unlisted for private packs, with rate limiting against guessing). **Mod** - Configured with a single `packUrl` instead of server URL + token. - On first start a window asks for the pack link. It runs in a separate process, so it never clashes with Minecraft's window. It checks the link and loader/MC version before saving. - Dedicated servers: `java -jar mods/managemod.jar join <link>` or `MANAGEMOD_PACK_URL`. - Downloads come from the trusted CDNs (Modrinth/CurseForge) first and fall back to the pack server; SHA-256 is always verified. **Docker** - One image (`ghcr.io/bewerkt/managemod`) containing the server, the mod jar and Caddy. Caddy requests certificates on demand, only for the configured host. All data lives in `/data`. - A workflow publishes the image on pushes to `main` and attaches the jar to `v*` releases. CI now also builds the Docker image. ## Tests - Server: 22 tests (setup code, CSRF, packs/slugs/unlisted, uploads, per-pack downloads, XSS escaping on the pack page, settings without leaking secrets). - Mod: 28 tests (link parsing, trusted mirrors, sync logic). - Manual: the setup → create pack → upload → pack page flow in a headless browser; `join` + `sync` against a running server; the first-start window driven with a robot in Xvfb; the container (Caddy proxying, internal endpoint not reachable from outside, certificate approval only for the configured host, HTTPS redirect). - Not tested locally: the real `apk`/`setcap`/Gradle steps of the Dockerfile (blocked by the sandbox network). CI's new Docker job builds them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016zdMyacgAzBQEBSiHc6aZJ --- _Generated by [Claude Code](https://claude.ai/code/session_016zdMyacgAzBQEBSiHc6aZJ)_
Sign in to join this conversation.
No description provided.