Skip to content

feat: modernize monorepo, vitest test suite, nextjs 15 dashboard rewrite, lavalink v4, and cloud docs - #829

Open
PhantomNimbi wants to merge 82 commits into
galnir:mainfrom
PhantomNimbi:main
Open

feat: modernize monorepo, vitest test suite, nextjs 15 dashboard rewrite, lavalink v4, and cloud docs#829
PhantomNimbi wants to merge 82 commits into
galnir:mainfrom
PhantomNimbi:main

Conversation

@PhantomNimbi

@PhantomNimbi PhantomNimbi commented Aug 30, 2026

Copy link
Copy Markdown

✅ Comprehensive Fork vs. Upstream Differences

image

📊 High-Level Comparison Matrix

Component / Feature Upstream (galnir/Master-Bot) Fork (PhantomNimbi/Master-Bot)
Runtime Architecture Multi-process: Bot (3000) & Dashboard (3001) run separately Single Node.js Process: Bot gateway & Dashboard share PORT (3000)
Database External PostgreSQL server (postgresql://...) Zero-Ops SQLite: Embedded packages/db/prisma/db.sqlite auto-created
Cache / State Store Standalone Redis server process (redis://...) In-Memory ioredis-mock: Zero external binaries or processes
Audio Engine Lavalink v3 (broken YouTube scraping, no plugins) Lavalink v4: Pre-configured YouTube & LavaSrc (Spotify) plugins
External Audio Node No turnkey external server 1-Click external deployment via HELIX-Origin/Lavalink-Server
Web Dashboard Next.js 13/14 Pages Router Next.js 15 (App Router): React 18, tRPC v11, NextAuth v5 beta
Cloud Deployment No 1-click cloud free tier support 1-Click Blueprints: Render (render.yaml), Railway, Heroku, Fly.io
Keep-Alive & Uptime None (sleeps on free tiers after 15 mins) Built-in Keep-Alive pinger (/health pings every 10 mins)
Command Suite Legacy slash commands 74 Slash Commands: Music, Moderation, Tickets, Reminders, Games, GIFs
Documentation Minimal README and docs 14-Page Comprehensive Wiki + Architecture diagrams

🚀 Detailed Breakdown of Changes

1. Consolidated Single-Process Architecture

  • Merged the Discord Bot Gateway (Sapphire) and the Next.js 15 Web Dashboard (/dashboard) into a single Node.js process listening on PORT (default 3000).
  • Implemented an internal web server in apps/bot/src/lib/server/webServer.ts:
    • Serves landing root (/) and handles dashboard SSR routing.
    • Exposes a dedicated /health endpoint for container healthchecks.
    • Automatically pings /health every 10 minutes (keepAlive.ts) to prevent free-tier cloud containers (e.g. Render) from spinning down.
  • Replaced separate multi-window launcher scripts with streamlined root pnpm dev and pnpm start commands.

2. Zero-Ops Database Migration (PostgreSQL ➔ SQLite)

  • Completely removed external PostgreSQL server dependencies, schemas, and configurations.
  • Migrated Prisma ORM to SQLite (file:./db.sqlite), initialized and migrated automatically on pnpm install.
  • Rebuilt schema for SQLite compatibility:
    • Scalar String JSON arrays with helper serialization for Guild.notifyList, Guild.disabledCommands, and Guild.logEvents.
    • Enforced guildId on Reminder records for proper multi-tenant guild scoping.

3. Zero-Process In-Memory Cache (Redis Server ➔ ioredis-mock)

  • Eliminated all external redis-server binary dependencies and background services.
  • Wired ioredis-mock directly into @master-bot/db, keeping state caching, rate limiting, and session sharing entirely in-memory within the main Node.js process.

4. Modern Audio Engine (Lavalink v4 & Modular Plugins)

  • Upgraded the audio subsystem from deprecated Lavalink v3 to Lavalink v4.
  • Configured YouTube Plugin (dev.lavalink.youtube:youtube-plugin):
    • Remote signature cipher deciphering (YOUTUBE_CIPHER_URL).
    • Multi-client rotation (TV, MUSIC, ANDROID_VR, IOS, WEB).
    • Interactive /youtube-auth device flow storing OAuth2 refresh tokens to prevent YouTube IP bans.
  • Configured LavaSrc Plugin (com.github.topi314.lavasrc:lavasrc-plugin):
    • Direct metadata resolution for Spotify tracks, albums, and playlists.
  • Music player UX:
    • Live ASCII progress bars and animated now-playing embeds with interactive button controls (apps/bot/src/lib/music).
  • Cloud protection & External Lavalink Hosting:
    • LAVA_EXTERNAL=true and LAVA_ENABLED=false defaulted on cloud deployment templates to prevent Out-Of-Memory (OOM) crashes on 512 MB free containers.
    • Integrated 1-click cloud deployment buttons for the standalone HELIX-Origin/Lavalink-Server (Render, Railway, Heroku, Fly.io).

5. Web Dashboard Modernization (Next.js 15 & tRPC v11)

  • Fully rewritten Next.js 15 App Router control center with React 18, Tailwind CSS, and NextAuth.js v5.
  • Upgraded tRPC backend to v11 (apps/dashboard/src/server).
  • Server management studios:
    • Guild Studio: Responsive card grid with real Discord guild icons.
    • Welcome Messages: Rich embed and text template builder with live preview.
    • Granular Audit Logging: Per-server channel assignments for 20 discrete event triggers.
    • Support Tickets: Interactive thread-based ticket panel generator with manager roles and .txt transcript channel archiving.
    • Reminders & Alerts: Centralized reminder manager and Twitch stream notification setup.
    • Command Toggles: Global and per-server enable/disable switches for all 74 commands.
    • Telemetry: Live system metrics, memory gauges, and audio node health.

6. 1-Click Cloud Deployment Blueprints

  • Render (render.yaml): Free-tier Docker/Node web service blueprint with automated keep-alive.
  • Railway (railway.json): Nixpacks build specification with volume mount path for SQLite persistence (/packages/db/prisma).
  • Heroku (app.json & Procfile): Single-dyno Eco container manifest with environment variable defaults.
  • Fly.io (fly.toml): MicroVM deployment targeting port 3000 with NVMe volume support.
  • Docker (Dockerfile & docker-compose.yml): Production multi-stage single-container build.

7. Cleaned Environment Variables

  • Audited and stripped all obsolete/dead environment variables monorepo-wide (POSTGRES_*, REDIS_*, redundant NEXTAUTH_URL duplications).
  • Corrected INTERNA_URL typo to INTERNAL_URL across all runtime schemas, .env.example, .env, and turbo.json.

8. Monorepo & TypeScript Tooling Hardening

  • Rebuilt apps/bot/tsconfig.json to be self-contained (module: CommonJS, moduleResolution: Node), resolving package resolution issues.
  • Cleaned invalid ignoreDeprecations compiler options from all tsconfigs.
  • Configured @master-bot/db to emit compiled JS and .d.ts declaration files via tsc so workspace packages consume compiled outputs.

9. Complete 14-Page Documentation Wiki

  • Authored a comprehensive 14-page Wiki:
    Home.md, Architecture.md, Getting-Started.md, Configuration.md, Deployment.md, Commands.md, Music.md, Dashboard.md, Moderation.md, Tickets.md, Reminders-and-Twitch.md, Welcome-and-Temp-Channels.md, FAQ.md, and _Sidebar.md.

…nce bot & dashboard

- Upgrade Next.js to 15.2.0 and migrate App Router to async request APIs (await params, useParams)

- Upgrade Auth.js/NextAuth to v5 beta with server action handlers and safe Discord avatar URL resolution

- Upgrade @next/eslint-plugin-next to 15.2.0 and align environment parsers to @t3-oss/env-* 0.13.11

- Replace pure-ESM env wrapper in @master-bot/bot with native Zod schema parsing for 100% CJS compatibility

- Wire dynamic feature flags (LAVA_ENABLED, GIFS_ENABLED, TWITCH_ENABLED, NEWS_ENABLED, IGDB_ENABLED) across bot preconditions

- Connect automated cross-platform PostgreSQL and Redis service checks (connect-or-auto-launch)

- Implement dynamic command help registry and standardized help tables across all 60 slash commands

- Enhance web dashboard with active-tab sidebar navigation, server overview statistics, and Redis log streaming

- Resolve next-themes hydration mismatch by adding suppressHydrationWarning to root layout
…sabled commands

- Group slash commands into structured categories (GIFs & Anime, Twitch, News, Games & Entertainment, General & Utilities)

- Filter out categories and individual commands disabled globally via environment feature flags (LAVA_ENABLED, GIFS_ENABLED, TWITCH_ENABLED, NEWS_ENABLED, IGDB_ENABLED)

- Display server-specific enable/disable toggles and active status badges for all active commands
…ys monorepo-wide

- Configure remoteCipher in application.yml with default endpoint (https://cipher.kikkia.dev/) and support custom YOUTUBE_CIPHER_URL / YOUTUBE_CIPHER_PASSWORD

- Pass deterministic Java system properties (-D) for YouTube OAuth, skipInitialization, cipher, and Spotify credentials in launcher scripts

- Wire YOUTUBE_CIPHER_URL and YOUTUBE_CIPHER_PASSWORD into @master-bot/bot, @master-bot/api, @master-bot/dashboard env schemas and .env.example

- Display active cipher endpoint in dev and production console status banners
…ckend, split session handlers, and rewrite docs

Migrate the entire stack away from PostgreSQL onto SQLite and restore the

dashboard API surface that was lost when packages/api was removed, while

retaining Lavalink + Redis for music/queue state.

\### Infrastructure \& dependencies

\- docker-compose.yml: drop the postgres service; keep Lavalink + Redis;

  add sqlite-data volume at /Master-Bot/packages/db/prisma; host logs now

  map to /Master-Bot/logs

\- docker.env: replace POSTGRES\_\* with DATABASE\_URL="file:./db.sqlite"

\- Dockerfile: remove stale POSTGRES\_HOST comment

\- scripts/{common,dev,start}.mjs: strip postgres service ensure/ports/status;

  show SQLite-backed status

\- pnpm-workspace.yaml: drop removed packages/api and packages/session

\- turbo.json: remove SHADOW\_DB\_URL (keep REDIS\_\* env)

\- apps/dashboard/next.config.mjs: transpilePackages -> @master-bot/auth, @master-bot/db

\- remove vitest.config.ts, tsconfig.test.json, and the tests/ tree

\### Database

\- packages/db/prisma/schema.prisma: Guild notifyList, disabledCommands,

  logEvents stored as JSON-encoded String columns; reminders are guild-scoped

  (guildId required)

\- packages/db/prisma/db.sqlite is the schema-relative SQLite database file

\### Bot: session layer

\- delete the dead @master-bot/session package and apps/bot/src/trpc.ts

\- split SessionManager.ts (1184 lines) into lib/session/:

  types.ts, SessionStore.ts (state + persistence + hydration), handlers/ with

  one factory per namespace (users, guildData, welcomeMessages, tickets,

  twitchConfig, hubChannels, playlists, songs, reminders, commands, members)

\- SessionManager is now a thin facade; public API unchanged

\- align all consumers (music playlists, reminders, twitch notify, tickets,

  temp channels, preconditions, listeners) with the split handlers and the

  JSON-encoded guild fields; add guildMemberRemove listener

\### Bot: gifs

\- lib/gifs/searchGif.ts: replace dead/mismatched fallback GIFs with 3 SFW,

  verified-working, query-matched GIFs per category (36 URLs, HTTP-verified)

\### Dashboard

\- add server-side tRPC backend at apps/dashboard/src/server: trpc.ts,

  context.ts (NextAuth session + prisma), root.ts, routers/ (guild, channel,

  welcome, tickets, command, music, broadcast, system), utils/axiosWithRefresh.ts

\- rewrite app/api/trpc/\[trpc]/route.ts and utils/api.ts (typed AppRouter);

  DISCORD\_CLIENT\_ID/SECRET placeholders added to env.mjs

\- guild list now shows every server the bot is in as card UI with Manage

  buttons; guild.getAll returns all bot guilds (no Discord OAuth ownership

  fetch); \[server\_id] layout no longer redirects non-owners

\- fix pre-existing schema mismatches: command disable/log-event consumers now

  JSON parse/serialize Scalar String columns; reminders require an owned guild

\- add axios dependency

\### Docs

\- rewrite root README, CONTRIBUTING, apps/bot + apps/dashboard READMEs

\- consolidate wiki/ into 14 updated pages (Architecture, Commands,

  Configuration, Dashboard, Deployment, FAQ, Getting-Started, Moderation,

  Music, Reminders-and-Twitch, Tickets, Welcome-and-Temp-Channels, \_Sidebar,

  Home); remove legacy cloud/Heroku/lavalink/API-key pages
@PhantomNimbi

PhantomNimbi commented Sep 7, 2026

Copy link
Copy Markdown
Author

✅ Comprehensive Fork vs. Upstream Differences

image

📊 High-Level Comparison Matrix

Component / Feature Upstream (galnir/Master-Bot) Fork (PhantomNimbi/Master-Bot)
Runtime Architecture Multi-process: Bot (3000) & Dashboard (3001) run separately Single Node.js Process: Bot gateway & Dashboard share PORT (3000)
Database External PostgreSQL server (postgresql://...) Zero-Ops SQLite: Embedded packages/db/prisma/db.sqlite auto-created
Cache / State Store Standalone Redis server process (redis://...) In-Memory ioredis-mock: Zero external binaries or processes
Audio Engine Lavalink v3 (broken YouTube scraping, no plugins) Lavalink v4: Pre-configured YouTube & LavaSrc (Spotify) plugins
External Audio Node No turnkey external server 1-Click external deployment via HELIX-Origin/Lavalink-Server
Web Dashboard Next.js 13/14 Pages Router Next.js 15 (App Router): React 18, tRPC v11, NextAuth v5 beta
Cloud Deployment No 1-click cloud free tier support 1-Click Blueprints: Render (render.yaml), Railway, Heroku, Fly.io
Keep-Alive & Uptime None (sleeps on free tiers after 15 mins) Built-in Keep-Alive pinger (/health pings every 10 mins)
Command Suite Legacy slash commands 74 Slash Commands: Music, Moderation, Tickets, Reminders, Games, GIFs
Documentation Minimal README and docs 14-Page Comprehensive Wiki + Architecture diagrams

🚀 Detailed Breakdown of Changes

1. Consolidated Single-Process Architecture

  • Merged the Discord Bot Gateway (Sapphire) and the Next.js 15 Web Dashboard (/dashboard) into a single Node.js process listening on PORT (default 3000).
  • Implemented an internal web server in apps/bot/src/lib/server/webServer.ts:
    • Serves landing root (/) and handles dashboard SSR routing.
    • Exposes a dedicated /health endpoint for container healthchecks.
    • Automatically pings /health every 10 minutes (keepAlive.ts) to prevent free-tier cloud containers (e.g. Render) from spinning down.
  • Replaced separate multi-window launcher scripts with streamlined root pnpm dev and pnpm start commands.

2. Zero-Ops Database Migration (PostgreSQL ➔ SQLite)

  • Completely removed external PostgreSQL server dependencies, schemas, and configurations.
  • Migrated Prisma ORM to SQLite (file:./db.sqlite), initialized and migrated automatically on pnpm install.
  • Rebuilt schema for SQLite compatibility:
    • Scalar String JSON arrays with helper serialization for Guild.notifyList, Guild.disabledCommands, and Guild.logEvents.
    • Enforced guildId on Reminder records for proper multi-tenant guild scoping.

3. Zero-Process In-Memory Cache (Redis Server ➔ ioredis-mock)

  • Eliminated all external redis-server binary dependencies and background services.
  • Wired ioredis-mock directly into @master-bot/db, keeping state caching, rate limiting, and session sharing entirely in-memory within the main Node.js process.

4. Modern Audio Engine (Lavalink v4 & Modular Plugins)

  • Upgraded the audio subsystem from deprecated Lavalink v3 to Lavalink v4.
  • Configured YouTube Plugin (dev.lavalink.youtube:youtube-plugin):
    • Remote signature cipher deciphering (YOUTUBE_CIPHER_URL).
    • Multi-client rotation (TV, MUSIC, ANDROID_VR, IOS, WEB).
    • Interactive /youtube-auth device flow storing OAuth2 refresh tokens to prevent YouTube IP bans.
  • Configured LavaSrc Plugin (com.github.topi314.lavasrc:lavasrc-plugin):
    • Direct metadata resolution for Spotify tracks, albums, and playlists.
  • Music player UX:
    • Live ASCII progress bars and animated now-playing embeds with interactive button controls (apps/bot/src/lib/music).
  • Cloud protection & External Lavalink Hosting:
    • LAVA_EXTERNAL=true and LAVA_ENABLED=false defaulted on cloud deployment templates to prevent Out-Of-Memory (OOM) crashes on 512 MB free containers.
    • Integrated 1-click cloud deployment buttons for the standalone HELIX-Origin/Lavalink-Server (Render, Railway, Heroku, Fly.io).

5. Web Dashboard Modernization (Next.js 15 & tRPC v11)

  • Fully rewritten Next.js 15 App Router control center with React 18, Tailwind CSS, and NextAuth.js v5.
  • Upgraded tRPC backend to v11 (apps/dashboard/src/server).
  • Server management studios:
    • Guild Studio: Responsive card grid with real Discord guild icons.
    • Welcome Messages: Rich embed and text template builder with live preview.
    • Granular Audit Logging: Per-server channel assignments for 20 discrete event triggers.
    • Support Tickets: Interactive thread-based ticket panel generator with manager roles and .txt transcript channel archiving.
    • Reminders & Alerts: Centralized reminder manager and Twitch stream notification setup.
    • Command Toggles: Global and per-server enable/disable switches for all 74 commands.
    • Telemetry: Live system metrics, memory gauges, and audio node health.

6. 1-Click Cloud Deployment Blueprints

  • Render (render.yaml): Free-tier Docker/Node web service blueprint with automated keep-alive.
  • Railway (railway.json): Nixpacks build specification with volume mount path for SQLite persistence (/packages/db/prisma).
  • Heroku (app.json & Procfile): Single-dyno Eco container manifest with environment variable defaults.
  • Fly.io (fly.toml): MicroVM deployment targeting port 3000 with NVMe volume support.
  • Docker (Dockerfile & docker-compose.yml): Production multi-stage single-container build.

7. Cleaned Environment Variables

  • Audited and stripped all obsolete/dead environment variables monorepo-wide (POSTGRES_*, REDIS_*, redundant NEXTAUTH_URL duplications).
  • Corrected INTERNA_URL typo to INTERNAL_URL across all runtime schemas, .env.example, .env, and turbo.json.

8. Monorepo & TypeScript Tooling Hardening

  • Rebuilt apps/bot/tsconfig.json to be self-contained (module: CommonJS, moduleResolution: Node), resolving package resolution issues.
  • Cleaned invalid ignoreDeprecations compiler options from all tsconfigs.
  • Configured @master-bot/db to emit compiled JS and .d.ts declaration files via tsc so workspace packages consume compiled outputs.

9. Complete 14-Page Documentation Wiki

  • Authored a comprehensive 14-page Wiki:
    Home.md, Architecture.md, Getting-Started.md, Configuration.md, Deployment.md, Commands.md, Music.md, Dashboard.md, Moderation.md, Tickets.md, Reminders-and-Twitch.md, Welcome-and-Temp-Channels.md, FAQ.md, and _Sidebar.md.

…line envs & add one-click cloud deployments

- 🚀 Consolidate Discord bot gateway and Next.js 15 web dashboard into a single Node.js runtime sharing PORT 3000
- ⚡ Switch to in-process ioredis-mock, eliminating external Redis dependencies and separate server processes
- 🗄️ Streamline SQLite persistence via Prisma with zero-ops schema initialization
- ☁️ Add one-click cloud deployment blueprints and manifests for Render, Railway, Heroku, and Fly.io
- 🎵 Integrate one-click deployment buttons for HELIX Origin's external Lavalink v4 audio server
- 🧹 Audit and clean up unused environment variables and correct INTERNAL_URL across workspace
- 🛠️ Fix ESM/TypeScript compilation settings across Turborepo packages and emit declarations for @master-bot/db
- 📖 Expand comprehensive multi-page wiki covering architecture, deployment, configuration, and music setup
@PhantomNimbi

Copy link
Copy Markdown
Author

📅 Update: Today's Changes & Enhancements

Here is a summary of the updates and fixes implemented today:


1. 🧹 Environment Variable Audit & Cleanup

  • Fixed Variable Typo: Corrected INTERNA_URL to INTERNAL_URL across all runtime schemas, .env.example, .env, turbo.json, and wiki documentation.
  • Pruned Dead Environment Variables: Stripped all legacy PostgreSQL and Redis variables (POSTGRES_*, REDIS_*, duplicate auth vars) to keep configuration strictly focused on the active stack.

2. 🛠️ TypeScript, Tooling & ESM Compilation

  • Resolved Module & Tsconfig Issues:
    • Removed invalid "ignoreDeprecations": "5.0" and "6.0" flags from tsconfig.json and apps/dashboard/tsconfig.json.
    • Resolved '@sapphire/ts-config' not found and module resolution conflicts by making apps/bot/tsconfig.json self-contained (CommonJS + Node resolution).
    • Fixed HMR type casting in apps/bot/src/lib/structures/ExtendedClient.ts.
  • Declaration & Compiled JS Emission for @master-bot/db:
    • Configured packages/db/tsconfig.json to emit compiled index.js and index.d.ts declaration files via tsc.
    • Updated packages/db/package.json to point "main": "./index.js" and "types": "./index.d.ts" so workspace packages cleanly consume compiled outputs instead of raw .ts files.

3. ☁️ Cloud Deployment Defaults

  • Defaulted LAVA_EXTERNAL=true on Cloud Blueprints:
    • Free cloud containers (Render, Railway, Heroku, Fly.io) enforce strict 512 MB memory limits.
    • Set LAVA_EXTERNAL=true and LAVA_ENABLED=false by default on all deployment templates so cloud bots connect to an external audio node rather than attempting to spawn a local Java process.

4. 🎵 Dedicated Standalone Lavalink v4 Server Repository (HELIX-Origin/Lavalink-Server)

  • Published Standalone Repo: Created and published HELIX-Origin/Lavalink-Server under the HELIX-Origin GitHub organization.
  • Dynamic Official Release Download: Dockerfile (eclipse-temurin:21-jre-alpine) pulls the latest official Lavalink v4 release JAR directly from GitHub releases at build time.
  • Environment Variable Mapping: All application.yml properties dynamically read from environment variables (PORT / LAVA_PORT, LAVA_PASS, YOUTUBE_*, SPOTIFY_*).
  • Correct Variable Scoping: Clarified that LAVA_EXTERNAL is strictly a bot-side flag and omitted it from the server configurations.
  • 1-Click Cloud Deployment: Added blueprints for Render (render.yaml), Railway (railway.json), Heroku (app.json, heroku.yml), and Fly.io (fly.toml).
  • Comprehensive 7-Page Wiki: Added Home.md, Deployment.md, Configuration.md, Plugins.md, Client-Integration.md, Troubleshooting.md, and _Sidebar.md.

5. 🔗 Master-Bot Integration & Clear Attribution

  • Added the One-Click External Lavalink Server Deployment badges table to Master-Bot's README.md, wiki/Deployment.md, and wiki/Music.md.
  • Explicitly attributed HELIX-Origin/Lavalink-Server as maintained by HELIX Origin.

6. 🧪 Verification & Status

  • Unit Tests (vitest run): 4 test suites, 15/15 unit tests passing (tests remain .gitignored).
  • Type Checking (turbo type-check): 3/3 packages clean with zero TypeScript errors.
  • Git State: Both Master-Bot (commit 23b21f5) and Lavalink-Server (commit b2f8d44) pushed to their main branches.

- Document the free public Lavalink server hosted by HELIX Origin in Music.md, Deployment.md, and Configuration.md
- Provide ready-to-use .env configuration snippet for instant audio setup
- Include direct links to the live Lavalink server dashboard (https://lavalink-server-4n9o.onrender.com/)
- Update FAQ.md, Getting-Started.md, and _Sidebar.md with public server references
…Fly)

- Switch Render blueprint (render.yaml) to runtime: docker targeting ./Dockerfile
- Switch Railway configuration (railway.json) to builder: DOCKERFILE
- Update Dockerfile with full native dependencies (libfontconfig1, openssl), build step, and auto-sync start command
- Move turbo to root dependencies and add .npmrc to ensure build tools are always available
- Update apps/bot build script to bundle Lua audio queue scripts into dist/
- Update deployment documentation with Dockerfile details
- Delete pnpm-lock.yaml, package-lock.json, and yarn.lock in Dockerfile before pnpm install
- Use pnpm install --no-frozen-lockfile during container builds
- Add lockfiles to .dockerignore so they are excluded from Docker context
- Configure frozen-lockfile=false in .npmrc to prevent CI/cloud environments from locking rebuilds
- Remove pnpm-lock.yaml from repository tracking
…ling

## Problem

Heroku builds were failing with `pnpm: not found` (exit 127). The
`heroku/nodejs` buildpack picks the package manager from the **lockfile**
present in the repo; since no `pnpm-lock.yaml` was committed it fell back
to npm, which ran the `postinstall` script
(`pnpm db:generate && pnpm db:push`) without pnpm on PATH.

## Changes

- 🔒 **Add `pnpm-lock.yaml`** — lets `heroku/nodejs` detect pnpm and use it
  for install/build natively (no extra buildpack needed).
- 🔢 **Pin `engines.node` to `24.x`** in `package.json` — removes the "wide
  range" warning and resolves to the Active LTS version deterministically.
- 🐳 **Dockerfile: reproducible installs** — drop the `rm -f pnpm-lock.yaml`
  workaround and install with `pnpm install --frozen-lockfile`.
- 🚫 **`.dockerignore`:**
  - stop baking `.env` & secrets into the image (previously copied in),
  - ignore nested `node_modules`, `.turbo`, sqlite dbs, and build output,
  - keep `pnpm-lock.yaml` in the build context so the frozen install works.
- 🧩 **`docker-compose.yml`:**
  - load envs from `.env` **and** `docker.env` (docker overrides win) so
    all runtime variables flow in without relying on a baked-in `.env`,
  - run `pnpm start` (bot, which hosts the dashboard) instead of
    `pnpm run -r start` (started a second Next.js server on port 3000).

## Required Heroku config vars (not committed here)

`PNPM_SKIP_PRUNING=true` (prisma CLI + dotenv are devDeps used at runtime),
plus `DATABASE_URL`, `DISCORD_TOKEN`, and all other app secrets as config
vars (see `.env.example`). Set once: `NODE_MODULES_CACHE=false` to evict old
npm-cached `node_modules`.
Replace the one-click deploy (app.json, deploy buttons) and the
discontinued Render/Railway/Fly configs with a single supported cloud
deployment: one Heroku eco dyno running bot + dashboard + Lavalink.

- Add heroku-prebuild (scripts/heroku-setup-lavalink.sh): downloads the
  latest Lavalink v4 jar from lavalink-devs/Lavalink at build time and
  copies application.yml.example -> application.yml
- Procfile: start embedded Lavalink on LAVA_PORT inside the dyno, then bot
- wiki/Deployment.md full rewrite: heroku CLI steps (nodejs + jvm
  buildpacks), eco dyno $5/mo flat rate and 1,000h shared pool pricing,
  env push via heroku-config config:push, PNPM_SKIP_PRUNING, ephemeral
  filesystem warning, new Backups section, Docker/VPS self-hosting
- README: drop one-click/discontinued platform rows, add pricing, refresh
  tree + system requirements (Java on Heroku via jvm buildpack)
- Remove app.json and render.yaml (one-click manifest + Render blueprint)
- Music/FAQ pages point to the embedded Heroku audio engine instead of
  the one-click external Lavalink server button
Replace the one-click deploy (app.json, deploy buttons) and the
discontinued Render/Railway/Fly configs with a single supported cloud
deployment: one Heroku eco dyno running bot + dashboard + Lavalink.

- Add heroku-prebuild (scripts/heroku-setup-lavalink.sh): downloads the
  latest Lavalink v4 jar from lavalink-devs/Lavalink at build time and
  copies application.yml.example -> application.yml
- Procfile: start embedded Lavalink on LAVA_PORT inside the dyno, then bot
- wiki/Deployment.md full rewrite: Heroku CLI steps (nodejs + jvm
  buildpacks), eco dyno $5/mo flat rate and 1,000h shared pool pricing,
  env push via heroku-config config:push, PNPM_SKIP_PRUNING, ephemeral
  filesystem warning, new Backups section, Docker/VPS self-hosting
- README: drop one-click/discontinued platform rows, add pricing, refresh
  tree + system requirements (Java on Heroku via jvm buildpack)
- Remove app.json and render.yaml (one-click manifest + Render blueprint)
- Music/FAQ pages point to the embedded Heroku audio engine instead of
  the one-click external Lavalink server button
application.yml.example is a customized config, not Lavalink stock:
it fixes broken YouTube playback (youtube-plugin multi-client rotation
+ remoteCipher + optional OAuth) and Spotify resolution (lavasrc ISRC
providers), with tuned streaming buffers.

- Add missing wiki/Lavalink.md (fixes dangling reference in
  application.yml.example header): what the config changes vs stock,
  plugin pins, env vars, PORT/LAVA_PORT interplay, plugin upgrades
- Prepare application.yml from our template in heroku-setup-lavalink.sh
  and warn against Lavalink default config in Deployment/Music/
  Getting-Started docs
pnpm --filter runs the bot with cwd=apps/bot, so the Next.js dashboard
was never found (/.next missing) and the internal web service failed to
start on Heroku. Add candidates relative to the package dir and the
compiled dist path so /app/apps/dashboard resolves correctly.
…self-hosted VPS & Docker

- 🗑️ Removed Procfile cloud deployment file
- 🌐 Added curated list of recommended low-cost compatible VPS services (Hetzner, OVH, DigitalOcean, Linode, Vultr) with hardware sizing tips
- 🔗 Removed retired onrender.com public Lavalink endpoints across documentation and wiki guides
- 📚 Updated README, Getting-Started, Music, Configuration, Deployment, and FAQ guides to standardize on self-hosted Docker and VPS infrastructure
- ⚡ Preserved internal keep-alive service for custom environments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant