feat: Migrate Arbiter and Modpack Version Checker to monorepo

WHAT WAS DONE:
- Migrated Arbiter (discord-oauth-arbiter) code to services/arbiter/
- Migrated Modpack Version Checker code to services/modpack-version-checker/
- Created .env.example for Arbiter with all required environment variables
- Moved systemd service file to services/arbiter/deploy/
- Organized directory structure per Gemini monorepo recommendations

WHY:
- Consolidate all service code in one repository
- Prepare for Gemini code review (Panel v1.12 compatibility check)
- Enable service-prefixed Git tagging (arbiter-v2.1.0, modpack-v1.0.0)
- Support npm workspaces for shared dependencies

SERVICES MIGRATED:
1. Arbiter (Discord OAuth bot) - Originally written by Gemini + Claude
   - Full source code from ops-manual docs/implementation/
   - Created comprehensive .env.example
   - Ready for Panel v1.12 compatibility verification

2. Modpack Version Checker (Python CLI tool)
   - Full source code from ops-manual docs/tasks/
   - Written for Panel v1.11, needs Gemini review for v1.12
   - Never had code review before

STILL TODO:
- Whitelist Manager - Pull from Billing VPS (38.68.14.188)
  - Currently deployed and running
  - Needs Panel v1.12 API compatibility fix (Task #86)
  - Requires SSH access to pull code

NEXT STEPS:
- Gemini code review for Panel v1.12 API compatibility
- Create package.json for each service
- Test npm workspaces integration
- Deploy after verification

FILES:
- services/arbiter/ (25 new files, full application)
- services/modpack-version-checker/ (21 new files, full application)

Signed-off-by: The Golden Chronicler <claude@firefrostgaming.com>
This commit is contained in:
Claude (The Golden Chronicler #50)
2026-03-31 21:52:42 +00:00
parent 4efdd44691
commit 04e9b407d5
47 changed files with 6366 additions and 0 deletions

View File

@@ -0,0 +1,228 @@
# CLI Reference
Full reference for all `modpack-checker` commands and flags.
---
## Global Flags
| Flag | Description |
|---|---|
| `--version` | Show version and exit |
| `-h`, `--help` | Show help for any command |
---
## config
Manage configuration settings stored in `~/.config/modpack-checker/config.json`.
### config set-key
```
modpack-checker config set-key API_KEY
```
Save and validate a CurseForge API key. The key is tested against the API immediately; a warning is shown if validation fails but the key is still saved.
**Get a free key at:** https://console.curseforge.com
---
### config set-webhook
```
modpack-checker config set-webhook WEBHOOK_URL
```
Save a Discord webhook URL. A test embed is sent immediately to confirm the webhook works.
---
### config set-interval
```
modpack-checker config set-interval HOURS
```
Set how many hours the scheduler waits between checks. Accepts values 1168.
**Default:** 6
---
### config show
```
modpack-checker config show
```
Display the current configuration. The API key is masked (first 4 / last 4 characters shown).
---
## add
```
modpack-checker add MODPACK_ID
```
Add a CurseForge modpack to the watch list. The modpack name is fetched from the API and stored locally. Run `check` afterward to record the initial version.
**Arguments:**
| Argument | Type | Description |
|---|---|---|
| `MODPACK_ID` | int | CurseForge project ID (from the modpack's URL) |
**Example:**
```bash
modpack-checker add 238222 # All The Mods 9
```
---
## remove
```
modpack-checker remove MODPACK_ID
```
Remove a modpack and all its check history. Prompts for confirmation.
**Arguments:**
| Argument | Type | Description |
|---|---|---|
| `MODPACK_ID` | int | CurseForge project ID |
---
## list
```
modpack-checker list
```
Display all watched modpacks in a table showing:
- CurseForge ID
- Name
- Last known version
- Last check timestamp
- Whether Discord alerts are enabled
---
## check
```
modpack-checker check [OPTIONS]
```
Check watched modpacks against the CurseForge API and report on their status.
**Options:**
| Flag | Description |
|---|---|
| `--id INTEGER`, `-m INTEGER` | Check only this modpack ID |
| `--notify` / `--no-notify` | Send Discord notifications (default: on) |
**Output:**
- `✓` — up to date
- `↑` — update available (version shown)
- `→` — initial version recorded (first check)
- `✗` — API error
---
## status
```
modpack-checker status MODPACK_ID [OPTIONS]
```
Show a detailed panel for one modpack plus its check history.
**Arguments:**
| Argument | Type | Description |
|---|---|---|
| `MODPACK_ID` | int | CurseForge project ID |
**Options:**
| Flag | Default | Description |
|---|---|---|
| `--limit INTEGER`, `-n INTEGER` | 10 | Number of history entries to display |
---
## notifications
```
modpack-checker notifications MODPACK_ID [--enable | --disable]
```
Toggle Discord alerts for a specific modpack without removing it from the watch list.
**Options:**
| Flag | Description |
|---|---|
| `--enable` | Enable notifications (default) |
| `--disable` | Suppress notifications for this modpack |
---
## schedule
```
modpack-checker schedule [OPTIONS]
```
Start a blocking background process that checks for updates on a repeating interval. Requires the `[scheduler]` extra (`pip install "modpack-version-checker[scheduler]"`).
**Options:**
| Flag | Description |
|---|---|
| `--hours INTEGER`, `-h INTEGER` | Override the configured interval |
Runs a check immediately on startup, then repeats at the configured interval. Press `Ctrl-C` to stop.
---
## Configuration File
Location: `~/.config/modpack-checker/config.json`
```json
{
"curseforge_api_key": "your-key-here",
"discord_webhook_url": "https://discord.com/api/webhooks/...",
"database_path": "/home/user/.config/modpack-checker/modpacks.db",
"check_interval_hours": 6,
"notification_on_update": true
}
```
---
## Database
Location: `~/.config/modpack-checker/modpacks.db` (SQLite)
The database is managed automatically. To reset completely:
```bash
rm ~/.config/modpack-checker/modpacks.db
```
---
## Exit Codes
| Code | Meaning |
|---|---|
| `0` | Success |
| `1` | Error (API failure, modpack not found, missing config, etc.) |

View File

@@ -0,0 +1,166 @@
# Installation Guide
## Requirements
- Python 3.9 or newer
- pip (comes with Python)
- A free CurseForge API key
---
## Step 1 — Install Python
Verify Python is installed:
```bash
python3 --version
# Should show: Python 3.9.x or newer
```
If not installed, download from [python.org](https://www.python.org/downloads/).
---
## Step 2 — Install Modpack Version Checker
### Option A: pip (recommended)
```bash
pip install modpack-version-checker
```
### Option B: Install with scheduler support
```bash
pip install "modpack-version-checker[scheduler]"
```
This adds APScheduler for the `modpack-checker schedule` background daemon command.
### Option C: Install from source
```bash
git clone https://github.com/firefrostgaming/modpack-version-checker.git
cd modpack-version-checker
pip install -e ".[scheduler]"
```
---
## Step 3 — Get a CurseForge API Key (free)
1. Go to [console.curseforge.com](https://console.curseforge.com)
2. Log in or create a free account
3. Click **Create API Key**
4. Copy the key
---
## Step 4 — Configure
```bash
modpack-checker config set-key YOUR_API_KEY_HERE
```
The key is stored in `~/.config/modpack-checker/config.json`.
---
## Step 5 (Optional) — Set Up Discord Notifications
1. In your Discord server, go to **Channel Settings → Integrations → Webhooks**
2. Click **New Webhook** and copy the URL
3. Run:
```bash
modpack-checker config set-webhook https://discord.com/api/webhooks/YOUR_WEBHOOK_URL
```
A test message will be sent to confirm it works.
---
## Step 6 — Add Your First Modpack
Find your modpack's CurseForge project ID in the URL:
`https://www.curseforge.com/minecraft/modpacks/all-the-mods-9` → go to the page, the ID is in the sidebar.
```bash
modpack-checker add 238222 # All The Mods 9
modpack-checker add 361392 # RLCraft
```
---
## Step 7 — Check for Updates
```bash
modpack-checker check
```
---
## Background Scheduler (Optional)
Run continuous checks automatically:
```bash
# Check every 6 hours (default)
modpack-checker schedule
# Check every 12 hours
modpack-checker schedule --hours 12
```
To run as a Linux systemd service, create `/etc/systemd/system/modpack-checker.service`:
```ini
[Unit]
Description=Modpack Version Checker
After=network.target
[Service]
Type=simple
User=YOUR_USERNAME
ExecStart=/usr/local/bin/modpack-checker schedule --hours 6
Restart=on-failure
[Install]
WantedBy=multi-user.target
```
Then:
```bash
sudo systemctl enable --now modpack-checker
```
---
## Uninstall
```bash
pip uninstall modpack-version-checker
# Remove config and database (optional)
rm -rf ~/.config/modpack-checker/
```
---
## Troubleshooting
**`modpack-checker: command not found`**
- Make sure pip's script directory is in your PATH
- Try: `python3 -m modpack_checker.cli`
**`Invalid API key`**
- Double-check the key at [console.curseforge.com](https://console.curseforge.com)
- Ensure there are no extra spaces when setting it
**`Connection failed`**
- Check your internet connection
- CurseForge API may be temporarily down; try again in a few minutes
**`Modpack shows Unknown`**
- Verify the project ID is correct by checking the CurseForge page
- Some older modpacks have no files listed via the API

View File

@@ -0,0 +1,91 @@
# Modpack Version Checker
**Monitor CurseForge modpack versions and get instantly notified when updates are released.**
Stop manually checking CurseForge every day. Modpack Version Checker tracks your modpacks and fires a Discord alert the moment a new version drops — saving you 20+ minutes of daily maintenance.
---
## Features
- **Multi-modpack tracking** — watch as many packs as you need in a single database
- **Discord notifications** — rich embeds with old/new version info sent automatically
- **Version history** — full log of every check and what version was found
- **Per-modpack notification control** — silence specific packs without removing them
- **Built-in scheduler** — runs in the background and checks on a configurable interval
- **Manual override** — force a check any time with `modpack-checker check`
- **Graceful error handling** — API downtime shows clear messages, never crashes
---
## Quick Start
```bash
# 1. Install
pip install modpack-version-checker
# 2. Set your CurseForge API key (free at console.curseforge.com)
modpack-checker config set-key YOUR_API_KEY
# 3. Add a modpack (use its CurseForge project ID)
modpack-checker add 238222 # All The Mods 9
# 4. Check for updates
modpack-checker check
```
---
## Installation
See [INSTALLATION.md](INSTALLATION.md) for full setup instructions including optional Discord notifications and background scheduling.
---
## Commands
| Command | Description |
|---|---|
| `modpack-checker add <id>` | Add a modpack to the watch list |
| `modpack-checker remove <id>` | Remove a modpack from the watch list |
| `modpack-checker list` | Show all watched modpacks and versions |
| `modpack-checker check` | Check all modpacks for updates now |
| `modpack-checker check --id <id>` | Check a single modpack |
| `modpack-checker status <id>` | Show detailed info + check history |
| `modpack-checker notifications <id> --enable/--disable` | Toggle alerts per modpack |
| `modpack-checker schedule` | Start background scheduler |
| `modpack-checker config set-key <key>` | Save CurseForge API key |
| `modpack-checker config set-webhook <url>` | Save Discord webhook URL |
| `modpack-checker config set-interval <hours>` | Set check interval |
| `modpack-checker config show` | Display current configuration |
See [API.md](API.md) for full command reference with all flags.
---
## Pricing
| Tier | Price | Features |
|---|---|---|
| Standard | $9.99 | All features listed above |
One-time purchase. No subscriptions. Available on [BuiltByBit](https://builtbybit.com).
---
## Requirements
- Python 3.9 or newer
- A free CurseForge API key ([get one here](https://console.curseforge.com))
- Linux, macOS, or Windows
---
## Support
- Discord: [Firefrost Gaming Support Server]
- Response time: within 48 hours
---
*Built by Firefrost Gaming*