-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Master-Bot is an enterprise-grade, unified Discord music, moderation, and utility bot with an embedded Next.js 15 Web Dashboard. Built with TypeScript, Sapphire Framework, discord.js v14, Prisma ORM (supporting external PostgreSQL with zero-ops SQLite fallback), in-memory/external Redis caching, and an embedded Lavalink v4 audio server powered by @helix-origin/lavalink-server.
flowchart TD
subgraph Clients [Clients & Web Endpoints]
DiscordGateway[Discord API Gateway]
BrowserClients[Web Dashboard Users]
VoiceGateway[Discord Voice WebSockets]
end
subgraph CoreService [Master-Bot Unified Service :3000]
WebServer[Internal HTTP / SSR Web Server]
BotClient[Sapphire Discord Client]
DashboardApp[Next.js 15 App Router & tRPC v11]
EmbeddedLavalink[Embedded Lavalink Server @helix-origin/lavalink-server]
SessionMgr[In-Memory SessionManager]
end
subgraph DataStorage [Storage & Cache Tier with Fallback]
subgraph DatabaseTier [Database]
PG[(PostgreSQL External)]
SQLite[(SQLite: /data/db.sqlite Fallback)]
end
subgraph CacheTier [Cache / Session State]
ExtRedis[(Redis External)]
MockRedis[ioredis-mock In-Process Fallback]
end
end
DiscordGateway <--> BotClient
BrowserClients <--> WebServer
WebServer <--> DashboardApp
DashboardApp <--> BotClient
BotClient <--> SessionMgr
SessionMgr <--> DataStorage
BotClient <--> EmbeddedLavalink
VoiceGateway <--> EmbeddedLavalink
-
π΅ Embedded High-Fidelity Audio: Features an embedded Lavalink v4 server from
@helix-origin/lavalink-server, with YouTube OAuth support, Spotify metadata resolution (lavasrc-plugin), SoundCloud, and DSP audio filters (/bassboost,/nightcore,/vaporwave,/karaoke). Supports instant external node connection viaLAVA_EXTERNAL=true. -
ποΈ Dual Database Architecture: Native support for external PostgreSQL (
DB_URI=postgresql://...) with automatic, zero-configuration local fallback to SQLite (file:/data/db.sqlite). -
β‘ Dual Cache Architecture: Seamlessly connects to external Redis instances (
REDIS_URL) while automatically falling back to in-memoryioredis-mockif Redis is unconfigured or unreachable. -
π§ͺ Universal Testing Suite: Preconfigured Vitest monorepo testing suite powered by
@helix-origin/vitest-suitewith dedicated Discord.js and Redis test doubles. - π Next.js 15 Web Dashboard: Modern command center with 9 feature studios (Guild Management, Music Studio, Broadcaster, Audit Logs, Ticket Hub, Reminders, Command Controls, Welcome Greetings, and Telemetry).
-
π€ Autonomous Agent Ecosystem: Complete
.agents/directory comprising specialized agents, production skills (including GitHub CLI and issue orchestration with Mermaid diagrams), standardized rules, and templates. - π Low-Cost VPS & Docker Self-Hosting: Production-ready guides for budget-friendly VPS providers (Hetzner, OVHcloud, DigitalOcean, Linode, Vultr, Contabo) with persistent SQLite storage, unthrottled networking, and optional Heroku cloud support.
The repository is maintained and enhanced with a standardized multi-agent operating system defined in .agents/ and indexed in AGENTS.md:
- π GitHub CLI Expert (
gh-cli-expert): Full command automation for issues, PRs, runs, and releases. - π Issue Orchestrator (
issue-orchestrator): Creates human-readable issues with emojis, Mermaid diagrams, and separate child sub-issues. - π Wiki Management (
wiki-management): Enforces relative wiki links, sidebar hierarchy, and navigation footers. - ποΈ Database Fallback Manager (
database-fallback): Manages PostgreSQL/SQLite and Redis/ioredis-mocklifecycle.
- Want to run the bot? β Getting Started
- Deep dive into components? β Architecture
- Complete slash command catalog? β Commands Reference
- Reminders & stream alerts setup? β Reminders & Stream Alerts
- Configuring audio and plugins? β Music & Audio
- Web dashboard guide? β Web Dashboard
- Contributing & extending the bot? β Developer's Guide
- Production rollout? β Deployment
- Common questions? β FAQ & Troubleshooting
- Discord verification & legal policies? β Privacy Policy & Terms of Service
π Home β’ ποΈ Architecture β’ βοΈ Configuration β’ π΅ Music β’ π» Dashboard β’ βοΈ Deployment β’ β FAQ
Master-Bot Documentation β’ Licensed under MIT β’ Maintained by galnir and the Master-Bot community
Master-Bot β Unified Discord music, moderation & utility bot with embedded Next.js 15 Web Dashboard, dual PostgreSQL/SQLite fallbacks, and embedded Lavalink v4 Audio.
- π Home β Project overview & quick start
- β‘οΈ Getting Started β Prerequisites, installation & startup
-
βοΈ Configuration β Complete
.envreference & fallbacks
- ποΈ Architecture β Unified single-process runtime & storage
- ποΈ Database & Fallbacks β Dual PostgreSQL & SQLite
-
β‘οΈ Cache & State β External Redis &
ioredis-mock -
π Commands Reference β Complete catalog of slash commands &
/setoptions
- π΅ Music & Audio β Embedded Lavalink v4, filters & playlists
- π‘οΈ Moderation β Ban, timeout, slowmode & audit logging
-
π« Support Tickets β Thread tickets &
.txttranscripts - π Welcome & Temp Channels β Greetings & dynamic voice hubs
- β° Reminders & Stream Alerts β Scheduled reminders, YouTube & Twitch alerts
- π» Web Dashboard β Next.js 15 App Router, tRPC v11 & 9 Studios
- π Deployment Guide β Docker, Low-Cost VPS & Self-Hosting
- π οΈ Developer Guide β Creating commands, listeners & features
-
π§ͺ Testing Suite β
@helix-origin/vitest-suitetesting toolkit - π‘οΈ Privacy Policy β Data collection, retention & deletion rights
- π Terms of Service β Service terms, permitted use & liability
- π Security Policy β Vulnerability reporting, advisories & hardening
- β FAQ & Troubleshooting β Common questions & solutions
- π€ Contributing β Contributor guide & commit standards
- π¦ Standalone Audio: HELIX-Origin/Lavalink-Server
- π§ͺ Vitest Suite: HELIX-Origin/vitest-suite
- π€ GitHub Repository: galnir/Master-Bot