Skip to content

Master-Bot Maintenance & Fix Roadmap #828

Description

@PhantomNimbi

Master-Bot Maintenance & Modernization Roadmap

Overview

This master roadmap tracks all foundational maintenance, dependency realignments, test harness implementations, web dashboard rewrites, audio engine upgrades, and architecture modernizations for Master-Bot.

flowchart TD
    subgraph Foundation["1. Maintenance & Features (Stages 01–24) ✅"]
        M1["YouTube Audio Recovery & Remote Cipher"]
        M2["Moderation Suite & Support Ticket System"]
        M3["Media APIs (Klipy, IGDB, NewsAPI, Genius)"]
        M4["Launcher Scripts & Log Streaming Engine"]
    end

    subgraph Rewrite["2. Test Suite & Dashboard (Stages 25–26) ✅"]
        T1["Vitest Test Harness (16/16 Tests Passing)"]
        D1["Next.js 15 App Router & React 19 Rewrite"]
        D2["9 Feature Studios & Glassmorphism UI"]
    end

    subgraph Modernization["3. Architecture Realignment & SQLite (Stage 27) ✅"]
        S1["SQLite DB Migration (file:./db.sqlite)"]
        S2["In-Memory Audio Queue (Zero Redis Dependency)"]
        S3["Gateway DisallowedIntents Fallback System"]
        S4["3-Port Isolation (3000, 3001, 3002)"]
        S5["Universal Portability (100% Relative Paths)"]
    end

    Foundation --> Rewrite --> Modernization --> PR["🚀 Upstream Pull Request: #829 (Ready for Merge)"]
Loading

Note

Tracking Status:


Completed Milestone Stages (01–27)

Phase 1: Foundational Maintenance & Media APIs (Stages 01–12)

  • Stage 01: Baseline & Dependency Audit — Verified workspace dependencies and resolved lockfile drift.
  • Stage 02: Docker Containerization — Configured containerized runtimes for local and remote deployments.
  • Stage 03: Media API Migration (Klipy) — Replaced deprecated Tenor endpoints with Klipy API for reaction GIFs and anime media.
  • Stage 04: News API Integration — Configured NewsAPI client for global news headline commands (/world-news).
  • Stage 05: Lyrics API Integration — Integrated Genius API for track lyrics lookup (/lyrics).
  • Stage 06: Game Search API Migration — Replaced RAWG with Twitch-backed IGDB API (/game-search).
  • Stage 07: Audio API Key Gating — Restored SoundCloud as fallback and gated providers behind configured keys.
  • Stage 08: Command & Interaction Audit — Fixed double-reply bugs, SFW/NSFW age gating, and interaction timeouts.
  • Stage 09: Documentation Sync — Created comprehensive guides in wiki/ (Configuration.md, Lavalink.md, API-Keys.md).
  • Stage 10: CI/CD Pipeline Update — Aligned .github/workflows/main.yml with Node 20 and pnpm.
  • Stage 11: GitHub Issue Forms — Converted .github/ISSUE_TEMPLATE/*.md to interactive GitHub Issue Forms.
  • Stage 12: Control Panel & Log Streaming — Built scripts/dev.mjs, scripts/start.mjs, isolated log streams (logs/), and web log console router.

Phase 2: Gateway Resilience, Audio Upgrades & Moderation (Stages 13–24)

  • Stage 13: Automatic Database Migration — Implemented schema verification and automatic client generation.
  • Stage 14: CommonJS Build Resolution — Enforced clean build pipelines for @master-bot/bot.
  • Stage 15: Log Management & Launcher Security — Configured launcher write streams to overwrite on launch and isolate process outputs.
  • Stage 16: Voice Gateway Packet Routing — Fixed Discord voice connection routing via client.on('raw') for lavalink-client.
  • Stage 17: Ambient Token Management & .env Safety — Added atomic .youtube-oauth.json persistence.
  • Stage 18: Audio Root Fixes & Audit — Configured full YouTube InnerTube multi-client roster (MUSIC, ANDROID_VR, IOS, TV, WEB, WEBEMBEDDED).
  • Stage 19: Remote Cipher, Auth & Monorepo Upgrades — Integrated remote cipher support and TV OAuth device code flow.
  • Stage 20: Music Trivia Game Feature — Restored interactive /music-trivia with audio streaming, live chat scoring, and podium reveals.
  • Stage 21: Unified Settings Command & Welcome Automation — Consolidated guild configuration into /set with welcome placeholders and preview testing.
  • Stage 22: Moderation Suite & Support Ticket System — Built 5 moderation slash commands (/ban, /kick, /slowmode, /timeout, /purge), thread-based support tickets, and transcript archiving.
  • Stage 23: Docs Sync, Issue Templates & Info Commands — Upgraded /about, added standalone /dashboard command, bringing documented commands to 74.
  • Stage 24: YouTube Playback & Dashboard Repair — Resolved AllClientsFailedException with first-class MUSIC InnerTube client and verified initial SSR/CSR boundaries.

Phase 3: Vitest Test Suite & Next.js 15 Web Dashboard Complete Rewrite (Stages 25–26)

  • Stage 25: Monorepo Vitest Test Harness:
    • Implemented 8 modular test suites with 16 unit and integration tests (100% pass rate).
    • Validated config pipelines, environment schema parsing, Prisma models, tRPC procedures, and authentication callbacks.
  • Stage 26: Next.js 15 Web Dashboard Complete Rewrite:
    • Built modern glassmorphism UI with frosted glass cards, dynamic radial glow accents, and responsive layout.
    • Developed 9 Feature Studios:
      1. 🎵 Audio & Music Studio (/dashboard/music): Lavalink player controls, live track queue, and DSP filters.
      2. 📢 WYSIWYG Broadcaster (/dashboard/broadcast): Visual embed composer with direct channel dispatcher.
      3. 📜 18-Event Audit Stream (/dashboard/logs): Granular server audit logging.
      4. 🎫 Support Ticket Hub (/dashboard/[server_id]/tickets): Panel deployment and transcript management.
      5. 📺 Twitch Tracking (/dashboard/integrations): Streamer alerts and live notification routing.
      6. ⚡ Cluster Diagnostics (/dashboard/system): Gateway latency, shard metrics, and system stats.
      7. ⏰ Reminders Studio (/dashboard/reminders): Scheduled reminder manager.
      8. 👋 Welcome Greetings (/dashboard/[server_id]/welcome-message): Live simulated chat preview.
      9. ⚙️ Command Controls (/dashboard/[server_id]/commands): Categorized slash command toggles.

Phase 4: Architecture Modernization & SQLite Database Realignment (Stage 27)

  • Stage 27: Zero External Database Dependencies & 3-Port Isolation:
    • SQLite Database Layer: Migrated database from PostgreSQL to local SQLite (file:./db.sqlite) via Prisma ORM.
    • In-Memory Audio Queue: Converted music queue from Redis/Lua to native JavaScript in-memory queue (Queue._tracks), completely removing ioredis and Redis server requirements.
    • Gateway Intent Fallback: Gateway client automatically catches DisallowedIntents error and retries login with standard non-privileged intents.
    • Pure Slash Commands: Enforced slash-command-only routing (loadMessageCommandListeners: false).
    • Dedicated 3-Port Isolation:
      • DASHBOARD_PORT=3000 — Next.js 15 Web Dashboard
      • BOT_PORT=3001 — Discord Bot Client Runtime & Gateway
      • BOT_API_PORT=3002 — Bot Internal HTTP API
    • Dynamic URL Construction: Automatically resolves NextAuth SSR and public URLs from DASHBOARD_PORT, eliminating NEXTAUTH_URL_INTERNAL.
    • Universal Portability: Enforced 100% relative paths and zero hardcoded system paths across the codebase.
    • Docker Streamlining: Updated docker-compose.yml to run purely Master-Bot and Lavalink without external database containers.
    • Documentation & .env Synchronization: Aligned .env.example, README.md, apps/dashboard/README.md, and all 34 wiki/ documentation pages.

📊 Verification Matrix

✓ pnpm test           — 16 / 16 tests passing across 8 test suites (100% pass rate)
✓ pnpm run type-check — 0 TypeScript errors across all 7 packages
✓ pnpm run lint       — 0 ESLint warnings or errors (manypkg check valid)
✓ pnpm run build      — Production build succeeded for all applications and packages

🔗 Related Issues & Pull Requests


This issue remains OPEN until Pull Request #829 is accepted and merged into main.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions