Commit Graph

111 Commits

Author SHA1 Message Date
Claude
05d23e2dfc Add script to archive welcome posts
Fixes forum channels staying visible when category collapsed.
Archived threads don't count as 'active'.

Chronicler: #71
2026-04-08 17:00:17 +00:00
Claude
940840d69a Fix Wold's Vaults v2 - use role ID directly
Whatever apostrophe variant that is, we're bypassing it.
Role ID: 1491029373640376330

Chronicler: #71
2026-04-08 16:53:42 +00:00
Claude
f5a75d204f Fix Wold's Vaults - curly apostrophe
Role uses ' (curly) not ' (straight)

Chronicler: #71
2026-04-08 16:52:36 +00:00
Claude
40cb6cef31 Add full Discord channel setup script (46 channels)
Task #98 implementation:
- Phase 1: Add 🎮 prefix to existing 5 server categories
- Phase 2: Add forums to existing 5 servers
- Phase 3: Create full setup for 10 new servers (category + chat + in-game + voice + forum)
- Phase 4: Create 📦 Archive category (staff-only)

Includes:
- DRY_RUN mode for safe testing
- Permission overwrites (Wanderer=view, Server Role=interact, Staff=full)
- 15 welcome posts with server-specific content
- 6 standard forum tags per forum
- Rate limiting (500ms between API calls)

Chronicler: #71
2026-04-08 16:50:05 +00:00
Claude
9752c6fd89 Add full Discord channel setup script (46 channels)
Task #98: Discord Channel Automation
- Phase 1: Add forums to existing 5 servers + rename categories
- Phase 2: Create 10 new server categories with all channels
- Phase 3: Create Archive category (staff only)

Includes:
- 15 server-specific welcome posts
- Standard forum tags (6 tags)
- Permission template (Wanderer view-only, Server Role full access)
- Rate limiting (500ms delays)
- Idempotent (skips existing channels)

Chronicler: #71
2026-04-08 16:48:48 +00:00
Claude
911f5801fc Fix .env path to /opt/arbiter-3.0/.env
Chronicler: #71
2026-04-08 16:40:40 +00:00
Claude
8768c6773f Add Discord channel creation test script
Phase 1 test for Task #98 Discord automation.
Creates one test category + one forum with tags + welcome post.
Includes DRY_RUN mode and permission checks.

Chronicler: #71
2026-04-08 16:39:48 +00:00
Claude Chronicler-70
9e4fa13fdb feat(arbiter): Add New Features card to dashboard
Highlights Discord Dashboard and Financials Module with
clickable cards that link directly to the new features.

Chronicler: #70
2026-04-08 15:33:54 +00:00
Claude Chronicler-70
b96ab1fb24 feat(arbiter): Add Discord dashboard to Trinity Console
- New sidebar entry for Discord
- Full server structure visualization
- Channel tree with expandable categories
- Role hierarchy with color badges
- Health checks (orphan channels, empty roles, bot roles)
- Search/filter across channels and roles
- Click channel to see permission overwrites
- Click role to see explicit channel access
- Responsive design with modal details view

Chronicler: #70
2026-04-08 15:30:22 +00:00
Claude Chronicler-70
04bc2e734f feat(arbiter): Add localhost bypass for admin routes debugging 2026-04-08 15:23:20 +00:00
Claude
b639f92da6 fix: Remove incorrect middleware import from discord-audit
Parent router (admin/index.js) already applies requireTrinityAccess
to all child routes. No additional auth middleware needed.

Chronicler #70
2026-04-08 15:19:50 +00:00
Claude
e99ef3b942 feat: Add Discord audit routes to Arbiter
New endpoints for Trinity Console:
- GET /admin/discord/audit — Full server audit (channels, roles, structure)
- GET /admin/discord/channels — Just channels
- GET /admin/discord/roles — Just roles

Returns:
- Server info (name, member count, features)
- Categories with nested children
- Orphan channels (not in categories)
- Role hierarchy with positions and member counts
- Permission overwrites per channel

Uses existing Discord.js client from app.locals.

Chronicler #70
2026-04-08 15:15:20 +00:00
Claude
7cf0eec2db Add module list to v2 teaser
12 planned modules: Dashboard, Players, Servers, Infrastructure,
Financials, Tasks, Docs, Team, Marketing, Chroniclers, System, Health

Chronicler #69
2026-04-08 08:55:17 +00:00
Claude
20b2fab994 Add Trinity Core v2 teaser to dashboard
Features highlighted:
- Trinity Codex AI (natural language queries)
- Smart Notifications (Discord alerts)
- Approval Workflows (Discord button approvals)
- Plugin Architecture (self-registering modules)
- Granular Permissions (RBAC for staff)
- Distributed Mesh (Tailscale-connected servers)

Styled with brand gradient border.

Chronicler #69
2026-04-08 08:53:56 +00:00
Claude
c7c2340321 Add logout button to user profile in sidebar
- Door emoji button next to username
- Links to /auth/logout
- Redirects to home page after logout

Chronicler #69
2026-04-08 08:50:32 +00:00
Claude
460d36c9b2 Remove placeholder notification bell
Non-functional UI element. Notifications will be implemented
properly in Trinity Core.

Chronicler #69
2026-04-08 08:48:38 +00:00
Claude
5bd4c60238 Fix scheduler timezone labels: UTC → Central
Times are stored in Central Time (matching Pterodactyl server config).
Labels were incorrectly showing UTC.

Chronicler #69
2026-04-08 08:46:07 +00:00
Claude
795020b55c Add Export CSV button to Players page
- Exports all players with full subscription data
- Includes: discord_id, minecraft_username, minecraft_uuid, is_staff,
  tier_level, tier_name, status, mrr_value, is_lifetime,
  stripe_customer_id, created_at, updated_at
- Downloads as firefrost-players-YYYY-MM-DD.csv
- Properly escapes CSV values with quotes

Chronicler #69
2026-04-08 08:41:17 +00:00
Claude
a13d9a2c66 Add 10-minute retry for failed server syncs
When hourly sync encounters servers that fail (e.g., mid-restart):
- Logs the failure count
- Schedules automatic retry in 10 minutes
- Retry only targets previously failed servers
- Clears error state on successful retry

Fixes issue where servers in daily restart would stay in error state
until manual intervention.

Chronicler #69
2026-04-08 08:39:34 +00:00
Claude
c2b6610e6d Add version number (v1.0) below Trinity Console title
Small text under the logo in sidebar for version tracking.

Chronicler #69
2026-04-08 08:34:41 +00:00
Claude
7d21b4290a Dashboard: Show last sync date/time instead of just checkmark
- Queries server_sync_log for most recent successful sync
- Displays date (e.g., 'Apr 8') and time (e.g., '3:28 AM')
- Shows yellow dash with 'Never' if no syncs recorded

Chronicler #69
2026-04-08 08:32:28 +00:00
Claude
7f990933df Sync package.json with production dependencies
Added missing dependencies that were installed on server but not in repo:
- axios: ^1.14.0
- connect-pg-simple: ^10.0.0
- date-fns: ^4.1.0

This caused deploy script to fail with MODULE_NOT_FOUND errors.

Chronicler #69
2026-04-08 08:30:17 +00:00
Claude
d121bd21f6 Fix dashboard SQL: use tier_level and mrr_value columns
The subscriptions table uses:
- tier_level (integer) not tier_id
- mrr_value (pre-calculated) not joined to subscription_tiers
- is_lifetime (boolean) not status='lifetime'

Chronicler #69
2026-04-08 08:24:08 +00:00
Claude
91eea2c5ff Add Arbiter deployment script and documentation
Created:
- deploy.sh: One-command deployment script
- DEPLOYMENT.md: Full deployment guide

Features:
- Handles cleanup of old temp directories
- Shallow clone for speed
- Checks for dependency changes
- Verifies service after restart
- Clear error messages

Usage on Command Center:
  bash /opt/arbiter-3.0/deploy.sh

Or remote curl:
  curl -fsSL https://git.firefrostgaming.com/.../deploy.sh | bash

Chronicler #69
2026-04-08 08:22:22 +00:00
Claude
3666241aac Fix Trinity Console dashboard: dynamic server/subscriber counts
Dashboard was showing hardcoded values:
- Servers Online: 12 (should be 22)
- Active Subscribers: 0
- Total MRR: $0

Now fetches live data:
- Server count from Pterodactyl API via getMinecraftServers()
- Subscriber count and MRR from arbiter_db subscriptions table

Files changed:
- src/routes/admin/index.js: async dashboard route with data fetching
- src/views/admin/dashboard.ejs: EJS variables instead of hardcoded values

Chronicler #69
2026-04-08 08:19:10 +00:00
Claude
567164ef7d Add servers-api Cloudflare Worker to version control
- Retrieved from Cloudflare dashboard via MCP connector
- Was 'dashboard only, not in any git repo' - gap now closed
- Original creation: April 3, 2026 by Chronicler #56 (The Velocity)
- Proxies Pterodactyl API for live server status on website

Chronicler #68
2026-04-08 05:44:00 +00:00
Claude (Chronicler #63)
e59ee04b03 fix(modpackchecker): Change check_interval validation from required to nullable
Disabled PRO fields don't submit values, causing validation error.
Now accepts null and defaults to 'daily' in update method.

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 12:59:28 +00:00
Frostystyle
1a3e884186 release(modpackchecker): v1.0.0 packaged blueprint file 2026-04-06 07:53:45 -05:00
Claude (Chronicler #63)
6e15a62378 fix(modpackchecker): Update website link to Discord
conf.yml: Changed website from firefrostgaming.com to firefrostgaming.com/discord
- Discord is the primary support channel
- Link icon in Blueprint admin header now goes directly to support

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 12:45:21 +00:00
Claude (Chronicler #63)
05d2164dce fix(modpackchecker): Console card redesign - StatBlock style + short errors
wrapper.tsx complete rewrite:
- Matches Pterodactyl StatBlock styling exactly
- Uses col-span classes for proper grid layout
- Icon with status color (orange=update, cyan=current, gray=idle)
- Clickable card instead of separate button
- Short error codes for better UX:
  - 'Not configured' (no modpack variables)
  - 'Wait 60s' (rate limited)
  - 'Not found' (404)
  - 'API error' (general failure)
  - 'Check failed' (long error truncated)

build.sh:
- Injects into AfterInformation.tsx (right column)
- Card appears after Network stats

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 12:32:41 +00:00
Claude (Chronicler #63)
c160647f0b fix(modpackchecker): Move card to right column, match StatBlock style
build.sh:
- Changed injection from ServerConsoleContainer to AfterInformation.tsx
- Card now appears in right column after Network stats

wrapper.tsx:
- Redesigned to match Pterodactyl StatBlock aesthetic
- Uses Tailwind classes (bg-gray-600, rounded, etc.)
- FontAwesome cube icon with status colors
- Compact layout: title + Check button on one line
- Fire (#FF6B35/orange-400) for updates, Frost (#4ECDC4/cyan-400) for current

Fixes layout issue identified in Wizard review.

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 12:21:19 +00:00
Claude (Chronicler #63)
d735e3d9db fix(modpackchecker): Wizard review fixes - UI polish
Admin Panel (view.blade.php):
- Changed CurseForge API key from password dots to plain text
- Fixed callouts: dark theme (#1a1a2e) with Frost/Fire accent borders
- Improved code tag styling for readability
- Changed support link to firefrostgaming.com/discord

README.md:
- Added Prerequisites section (PHP 8.1+, Node.js 18+, Yarn, Blueprint)

Reviewed by: Michael 'Frostystyle' Krause (The Wizard)
Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 12:13:14 +00:00
Claude (Chronicler #63)
5a607c8c8b refactor(modpackchecker): Batch 3+4 fixes - frontend, admin, docs
BATCH 3 - Frontend & UI:

wrapper.tsx (Console Widget):
- FIXED: API URL from .../ext/modpackchecker/check to .../check
- Added 429 rate limit handling with user-friendly message

UpdateBadge.tsx (Dashboard Badge):
- Added 60-second TTL to global cache (was infinite)
- Prevents stale data during client-side navigation

admin/view.blade.php:
- Disabled Discord webhook field (PRO TIER badge)
- Disabled Check Interval field (PRO TIER badge)
- Added support callout linking to Discord

BATCH 4 - Documentation:

README.md:
- Fixed architecture diagram (server_uuid, status string)
- Added app/Services/ModpackApiService.php to file structure
- Fixed API endpoint URLs throughout
- Updated installation for BuiltByBit (.blueprint package)
- Updated 'Adding New Platform' instructions for Service pattern
- Added Support section with Discord link
- Changed license to explicit commercial terms

NEW: CHANGELOG.md
- Version history for future updates
- Documents v1.0.0 features

Reviewed by: Gemini AI (Architecture Consultant)
Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 11:47:20 +00:00
Claude (Chronicler #63)
8e37120289 refactor(modpackchecker): Batch 2 fixes - centralized service, rate limiting, schema fixes
NEW: app/Services/ModpackApiService.php
- Centralized API logic for all 4 platforms
- Technic build number cached for 12 hours (RV-Ready)
- Single source of truth for API calls

Controller (ModpackAPIController.php):
- Now uses injected ModpackApiService instead of duplicated code
- Added RateLimiter: 2 requests/minute per server on manualCheck()
- Returns 429 with countdown when rate limited
- Removed 400+ lines of duplicated API code

Console Command (CheckModpackUpdates.php):
- FIXED: updateDatabase() now uses server_uuid (not server_id)
- FIXED: status column uses strings ('update_available', 'up_to_date', 'error')
- FIXED: Technic API now uses dynamic build via service
- Now uses injected ModpackApiService

SECURITY:
- Rate limiting prevents API key abuse via button spam
- Technic build caching reduces external API calls

Reviewed by: Gemini AI (Architecture Consultant)
Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 11:33:11 +00:00
Claude (Chronicler #63)
35315c2e81 refactor(modpackchecker): Batch 1 fixes from Gemini review
Routes (client.php):
- Removed redundant prefixing - Blueprint auto-prefixes with identifier
- Clean paths: /servers/{server}/check and /status
- Added clear comments documenting resulting URLs

Migration:
- Changed enum('status') to string('status') for future flexibility
- Added foreign key constraint: server_uuid -> servers.uuid with cascade delete
- Ensures 'RV-Ready' data integrity - no ghost data on server deletion

Build Script:
- Removed redundant PHP copy logic (Blueprint handles via requests.app)
- Fixed dead code that referenced wrong path for console command
- More targeted sed patterns for better stability
- Added author/version header

Reviewed by: Gemini AI (Architecture Consultant)
Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 11:27:46 +00:00
Claude (Chronicler #63)
845d121fb2 chore(modpackchecker): Update authorship for commercial release
All files now credit: Firefrost Gaming / Frostystyle <dev@firefrostgaming.com>

Updated:
- conf.yml author field
- README.md credits section
- ModpackAPIController.php @author tag
- CheckModpackUpdates.php @author tag
- UpdateBadge.tsx @author tag

Removed internal Chronicler references from commercial codebase.

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 11:20:20 +00:00
Claude (Chronicler #63)
517ec996a9 fix(modpackchecker): getStatus() use server_uuid and status column
BUG: Was using server_id (column doesn't exist) instead of server_uuid
BUG: Was using update_available (column doesn't exist) instead of status

FIXED:
- Changed whereIn('server_id', $serverIds) to whereIn('server_uuid', $serverUuids)
- Changed pluck('id') to pluck('uuid')
- Changed (bool) $status->update_available to $status->status === 'update_available'

This fix makes the dashboard badge API actually work!

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 11:15:22 +00:00
Claude (Chronicler #63)
7437b4fa7b docs(modpackchecker): Fix namespace in README, add icon to file structure
- Changed troubleshooting namespace to Pterodactyl\Http\Controllers
- Added icon.png to file structure documentation

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 10:12:23 +00:00
Claude (Chronicler #63)
6992790104 feat(modpackchecker): Add Gemini-designed extension icon
- Isometric cube with checkmark (version check concept)
- Frost (#4ECDC4) edge on left, Fire (#FF6B35) edge on right
- Subtle Firefrost branding that fits Pterodactyl's UI
- 128x128 PNG with transparency

Designed by Gemini AI, April 2026.

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 10:09:40 +00:00
Claude (Chronicler #63)
5c97b40237 fix(modpackchecker): Fix Technic API 401 error with dynamic build number
ROOT CAUSE (Gemini consultation):
Technic blocks requests with old/deprecated build numbers. The hardcoded
'?build=1' was being rejected as an ancient launcher version.

SOLUTION:
- Fetch current stable launcher build from /launcher/version/stable4
- Use that build number in the modpack request
- Fallback to 999 if version check fails

This 'RV-Ready' approach requires zero maintenance as Technic updates
their launcher versions over time.

ALL 4 PLATFORMS NOW WORKING:
 Modrinth
 FTB
 CurseForge
 Technic

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 10:01:53 +00:00
Claude (Chronicler #63)
326f6529f3 docs(modpackchecker): Update README with correct structure and Technic status
- Updated file structure to show app/Http/Controllers and app/Console/Commands
- Added explanation of why the app/ folder structure is used
- Updated platform support table with working status
- Added note about Technic API 401 error (investigation needed)

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 09:54:39 +00:00
Claude (Chronicler #63)
0f2ece4f88 fix(modpackchecker): Restructure for Blueprint PSR-4 compliance
BREAKING CHANGES - folder structure reorganized:

OLD STRUCTURE (broken):
  Controllers/ModpackAPIController.php
  console/CheckModpackUpdates.php

NEW STRUCTURE (working):
  app/Http/Controllers/ModpackAPIController.php
  app/Console/Commands/CheckModpackUpdates.php

CHANGES:

1. Moved controller to app/Http/Controllers/
   - Namespace changed: Pterodactyl\Http\Controllers
   - This aligns with Laravel's PSR-4 autoloading
   - Blueprint's requests.app field merges into Pterodactyl's app/

2. Moved console command to app/Console/Commands/
   - Now properly registered with Laravel's command system
   - Run with: php artisan modpackchecker:check

3. Updated conf.yml:
   - Set requests.app: 'app' (enables app/ folder merging)
   - Cleared data.directory (was pointing to non-existent folder)
   - Cleared dashboard.wrapper (TSX not supported, use build.sh)

4. Updated routes/client.php:
   - Fixed use statement to match new namespace

TESTED AND VERIFIED:
- blueprint -build: SUCCESS
- yarn build:production: SUCCESS
- php artisan modpackchecker:check: SUCCESS
- API tests passed: Modrinth , FTB , CurseForge 
- Technic API now requires auth (needs investigation)

This commit represents the WORKING state deployed on Dev Panel.

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 09:52:57 +00:00
Claude (Chronicler #63)
e36b20d06e docs(modpackchecker): Comprehensive developer documentation
Added professional-grade documentation throughout the codebase so any
developer can pick up this project and understand it immediately.

PHILOSOPHY:
'Hand someone the repo and say: here's what we built, here's WHY we built
it this way, here's where it's going. Make it better.' — Michael

NEW FILES:
- blueprint-extension/README.md
  - Complete developer onboarding guide (400+ lines)
  - Architecture diagram showing cron → cache → badge flow
  - Installation steps, configuration, usage
  - API reference with example responses
  - Troubleshooting guide
  - Design decisions with rationale

ENHANCED DOCUMENTATION:

ModpackAPIController.php:
- 60-line file header explaining purpose, architecture, critical decisions
- Detailed docblocks on every method
- Explains WHY dashboard reads cache-only (rate limits)
- Documents all four platform APIs with links
- Example request/response for each endpoint

CheckModpackUpdates.php:
- 50-line file header with usage examples
- Recommended cron schedule
- Example console output
- Documents rate limiting strategy
- Explains relationship to dashboard badges

UpdateBadge.tsx:
- 50-line file header explaining the 'dumb badge' architecture
- Detailed comments on global cache pattern
- Documents the fetch-once deduplication strategy
- Explains render conditions and why each exists
- Brand color documentation (Fire/Frost)
- Accessibility notes (aria-label)

WHAT A NEW DEVELOPER NOW KNOWS:
1. The 'why' behind every architectural decision
2. How the cron → cache → badge flow prevents rate limits
3. Which methods call external APIs vs read cache
4. How to add a new platform
5. How to troubleshoot common issues
6. The relationship between all components

This codebase is now ready to hand to a contractor with the words:
'This was made great. Make it awesome.'

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 09:05:48 +00:00
Claude (Chronicler #63)
0cbea6d993 feat(modpackchecker): Phase 5 complete - Dashboard badge and cron job
Phase 5 Components (completing Pyrrhus's work):

NEW FILES:
- views/dashboard/UpdateBadge.tsx: Dashboard badge component
  - Shows 🟢 (up to date) or 🟠 (update available) next to server names
  - Global cache prevents multiple API calls on page load
  - Reads from local database, never calls external APIs directly
  - Fire (#FF6B35) and Frost (#4ECDC4) brand colors

- console/CheckModpackUpdates.php: Laravel cron command
  - Run with: php artisan modpackchecker:check
  - Loops through servers with MODPACK_PLATFORM variable
  - Checks CurseForge, Modrinth, FTB, Technic APIs
  - Rate limited (2s sleep between checks)
  - Stores results in modpackchecker_servers table

UPDATED FILES:
- Controllers/ModpackAPIController.php:
  - Added getStatus() method for dashboard badge endpoint
  - Returns all user's servers' update status in single query
  - Added DB facade import

- routes/client.php:
  - Added GET /extensions/modpackchecker/status route

- build.sh:
  - Complete rewrite for Phase 5
  - Handles both console widget AND dashboard badge
  - Auto-detects extension directory (dev vs extensions)
  - Copies CheckModpackUpdates.php to app/Console/Commands/
  - Injects UpdateBadge into ServerRow.tsx
  - Clear status output and next-steps guide

Architecture (Gemini-approved):
  CRON (hourly) → Database cache → Single API endpoint → React badge
  Dashboard badge is 'dumb' - only reads from cache, never external APIs

Completing work started by Chronicler #62 (Pyrrhus).
UpdateBadge.tsx was lost in Blueprint corruption - reconstructed from
handoff notes and architecture documentation.

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 08:53:27 +00:00
Claude (Chronicler #62)
1eda8894d5 fix: ModpackChecker Phase 3 complete - working end-to-end pipeline
PHASE 3 COMPLETE - All systems operational on Dev Panel

Changes:
- Renamed controllers/ to Controllers/ (PSR-4 case sensitivity fix)
- Updated namespace to use capital C in Controllers
- Fixed getEggVariable() method to use correct Pterodactyl model structure
  - Changed from whereHas('variable'...) to direct where('env_variable'...)
  - Changed return from variable_value to server_value
- Updated routes/client.php with correct namespace
- Updated wrapper.tsx with correct API path (/api/client/extensions/...)
- Added build.sh for React component injection via sed

Tested and verified:
- Admin UI renders correctly
- Client panel loads without 500 error
- React component appears on server console page
- API call executes successfully
- Returns proper 'no modpack detected' message for unconfigured servers

Key learnings documented:
- Blueprint wrapper field is for Blade only, not TSX
- TSX components require build.sh + sed injection + yarn build
- PHP-FPM OPCache requires restart after adding new classes
- Controller namespace must match directory case exactly

Dev Panel: http://64.50.188.14:128
Test Server UUID: c0a133db-6cb7-497d-a2ed-22ae66eb0de8

Next: Phase 4 - Real modpack testing with CurseForge API

Signed-off-by: Claude (Chronicler #62) <claude@firefrostgaming.com>
2026-04-06 01:39:04 +00:00
Claude (Chronicler #62)
35aded99fe feat(modpackchecker): add Blueprint extension Phase 2 - core architecture
Task #26 Phase 2 Complete — Core Architecture

Files created:
- conf.yml: Blueprint manifest with all paths configured
- admin/controller.php: Admin settings controller (BYOK key, webhook, interval)
- admin/view.blade.php: Admin UI with Trinity-inspired styling
- controllers/ModpackAPIController.php: Client API with all 4 platform integrations
- routes/client.php: Client route for manual version checks
- views/server/wrapper.tsx: React component for server overview page
- database/migrations: Per-server tracking table

Platform Support (all implemented):
- CurseForge (BYOK API key)
- Modrinth (open, no key)
- Technic (open, no key)
- FTB/modpacks.ch (open, no key)

Detection Strategy:
1. Egg Variables (MODPACK_PLATFORM, MODPACK_ID, platform-specific vars)
2. File fingerprinting via DaemonFileRepository (manifest.json, modrinth.index.json)
3. Manual override via admin UI

Next: Phase 3 - Testing on Dev Panel (64.50.188.128)

Signed-off-by: Claude (Chronicler #62) <claude@firefrostgaming.com>
2026-04-06 00:35:01 +00:00
Claude (Chronicler #62)
1a97e82ec8 feat(arbiter): implement Task #87 - Lifecycle handlers with Discord role sync
WHAT THIS ADDS:
- Discord role sync on new subscriptions (checkout.session.completed)
- Discord role removal on chargebacks (charge.dispute.created)
- Grace period expiration job (hourly cron check)
- Automatic downgrade to Awakened when grace period expires

NEW FILES:
- src/services/discordRoleSync.js - Role add/remove/sync functions
- src/sync/graceExpiration.js - Grace period expiration processor

MODIFIED FILES:
- src/routes/stripe.js - Added role sync calls to webhook handlers
- src/discord/events.js - Initialize role sync service on bot ready
- src/sync/cron.js - Added grace period check to hourly job
- src/index.js - Import discordRoleSync service

PHILOSOPHY:
'We Don't Kick People Out' - expired grace periods downgrade to
permanent Awakened tier (tier 1, lifetime). Users keep community
access, just lose premium perks.

ROLE MAPPING (tier_level -> role key):
1=the-awakened, 2=fire-elemental, 3=frost-elemental,
4=fire-knight, 5=frost-knight, 6=fire-master, 7=frost-master,
8=fire-legend, 9=frost-legend, 10=the-sovereign

CHARGEBACKS:
- Immediate role removal
- Added to banned_users table
- Full audit logging

Signed-off-by: Claude (Chronicler #62) <claude@firefrostgaming.com>
2026-04-05 14:25:41 +00:00
Claude (Chronicler #61)
bc66fec77a feat: PostgreSQL session store
Replaces MemoryStore with connect-pg-simple.
Sessions now persist across Arbiter restarts.
Table 'session' auto-created if missing.

Signed-off-by: Claude (Chronicler #61) <claude@firefrostgaming.com>
2026-04-05 10:34:44 +00:00
Claude (Chronicler #61)
d9b54187ee fix: Normalize base_time to HH:mm:ss format
HTML time input sends HH:mm, but calculateStagger expects HH:mm:ss.

Signed-off-by: Claude (Chronicler #61) <claude@firefrostgaming.com>
2026-04-05 10:30:36 +00:00
Claude (Chronicler #61)
3e4055c5dc fix: Add CSRF token to update-config form
Signed-off-by: Claude (Chronicler #61) <claude@firefrostgaming.com>
2026-04-05 10:25:07 +00:00