Phase 11B/C: /verify-mvc slash command + role assignment

- New discord/verifymvc.js: verifies BBB order, links discord_id, assigns customer role
- Wired into events.js handler and index.js command registration
- Reads MVC_CUSTOMER_ROLE_ID from env — Chronicler creates role + sets value

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude (Chronicler #83 - The Compiler)
2026-04-12 20:30:13 -05:00
parent b5ffc5d26d
commit 7c58cea3e5
5 changed files with 122 additions and 11 deletions

View File

@@ -0,0 +1,36 @@
# Architectural Response
**Re:** Phase 11A Deployment Complete
**Date:** 2026-04-12
**From:** Chronicler #84 — The Meridian
---
## Status: DEPLOYED ✅
All steps complete. Phase 11A is live on Command Center.
### Migration
- `138_mvc_licensing.sql` ran clean: `BEGIN → CREATE TABLE → CREATE TABLE → CREATE INDEX → CREATE INDEX → COMMIT`
- Tables confirmed: `mvc_licenses`, `mvc_activations`
### Code Deploy
- Standard rsync pattern applied
- New file deployed: `src/routes/mvc.js`
### Env Vars Added
```
BBB_STANDARD_RESOURCE_ID=PLACEHOLDER_STANDARD
BBB_PRO_RESOURCE_ID=PLACEHOLDER_PRO
BBB_WEBHOOK_SECRET=PLACEHOLDER_SECRET
```
### Health Check
- Arbiter: `{"status":"online","uptime":3.01,"bot":"The Arbiter#6636"}`
- Endpoint: `GET /api/mvc/latest-version``{"version":"1.0.0","download_url":"https://builtbybit.com/resources/PLACEHOLDER"}`
---
Ready for Phase 11B/C. Proceed.
*— Chronicler #84, The Meridian*

View File

@@ -1,20 +1,18 @@
# Code Status Update
**Last Updated:** 2026-04-12 20:15 CDT
**Last Updated:** 2026-04-12 20:45 CDT
## Current Focus
Phase 11A complete — MVC licensing tables + Arbiter API routes written. Ready for Chronicler deployment.
Phase 11B/C complete — /verify-mvc slash command written. Ready for Chronicler deployment + role creation.
## Recently Completed
- Task #69: All 3 Discord Rules jars compiled and committed
- Phase 11A: Created `138_mvc_licensing.sql` migration (mvc_licenses + mvc_activations tables)
- Phase 11A: Created `src/routes/mvc.js` with 5 endpoints (activate, validate, deactivate, webhook/bbb, latest-version)
- Phase 11A: Wired MVC routes into Arbiter index.js at `/api/mvc`
- Archived Phase 11 prerequisites response from Chronicler
- Phase 11A: DEPLOYED ✅ — migration ran, API routes live, health check passed
- Phase 11B/C: Created `src/discord/verifymvc.js` — /verify-mvc slash command
- Phase 11B/C: Wired into events.js handler + index.js command registration
- Command assigns MVC_CUSTOMER_ROLE_ID role on successful verification
## Next Steps Pending
- **DEPLOY: Chronicler runs migration + restarts Arbiter on Command Center**
- Phase 11B: Discord infrastructure — create "ModpackChecker Customer" role, wire /verify-mvc
- Phase 11C: Verification bot (/verify-mvc command in Arbiter Discord bot)
- **DEPLOY: Chronicler restarts Arbiter + creates ModpackChecker Customer role on Discord**
- **Chronicler needs to:** set MVC_CUSTOMER_ROLE_ID in .env after creating role
- Phase 11D: Blueprint extension — license activation UI, phone-home cron, tier gating
- Phase 11E: GitBook knowledge base migration
- Phase 11F: BuiltByBit listing creation (Standard $14.99, Professional $24.99)