Introduction

Meww.me Documentation

Meww.me is a production-grade Discord music bot built with TypeScript, Discord.js v14, and Lavalink v4. It ships with a full web dashboard, a REST API, real-time WebSocket synchronization, a tiered premium system, and over 80 slash commands across six categories.

This documentation covers the complete system: backend architecture, frontend dashboard, API surface, configuration, deployment, and operational guidance.

Technology Stack

LayerTechnology
RuntimeNode.js 18+ (LTS recommended)
LanguageTypeScript 5.x
Discord Librarydiscord.js v14
Audio EngineLavalink v4 via Mewslink (custom client)
REST APIFastify (port 2555)
Webhook ServerExpress (port 2444)
RealtimeSocket.IO (attached to Fastify)
FrontendReact 18 + Vite + TailwindCSS + Radix UI
Databasemewwme.quick.db (JSON, MongoDB, MySQL, PostgreSQL)
LoggingWinston with daily file rotation
Process ManagerPM2 / Docker / Pterodactyl

Supported Databases

DriverLibraryConfig Key
JSONmewwme.quick.db/JSONDriverjson
MongoDBmewwme.quick.db/MongoDriver + mongoosemongodb
MySQLmewwme.quick.db/MySQLDriver + mysql2mysql
PostgreSQLmewwme.quick.db/PostgresDriver + pgpostgres

The driver is selected in config.yml under features.DATABASE.driver. If an invalid value is provided, the bot falls back to JSON.

How the System Connects

                     ┌──────────────┐
                     │  config.yml  │
                     └──────┬───────┘

                     ┌──────▼───────┐
                     │   index.ts   │  Entry point
                     └──────┬───────┘

                     ┌──────▼───────┐
                     │  manager.ts  │  Extends discord.js Client
                     └──────┬───────┘

          ┌─────────────────┼─────────────────┐
          │                 │                 │
   ┌──────▼──────┐  ┌──────▼──────┐  ┌──────▼──────┐
   │  handlers/  │  │  database/  │  │    web/     │
   │ loadCommand │  │   driver/   │  │  RestAPI.ts │
   │ loadEvents  │  │   schema/   │  │ WebServer   │
   │ loadPlayer  │  │   setup/    │  │ Dashboard   │
   └──────┬──────┘  └──────┬──────┘  └──────┬──────┘
          │                │                 │
   ┌──────▼──────┐  ┌──────▼──────┐  ┌──────▼──────┐
   │  commands/  │  │ MongoDB     │  │  frontend/  │
   │  events/    │  │ MySQL       │  │  (React)    │
   │  buttons/   │  │ PostgreSQL  │  │  Socket.IO  │
   │  mewslink/  │  │ JSON        │  └─────────────┘
   └─────────────┘  └─────────────┘
  1. index.ts reads config.yml via ConfigDataService and creates a Manager instance.
  2. Manager (extends Client) initializes the Mewslink audio engine, collections, and calls start().
  3. start() boots: handlers, database, REST API, WebServer, notification services, and premium services.
  4. DatabaseService selects the configured driver, connects, and registers all database tables.
  5. RestAPI (Fastify) serves /v1/* internal API and /api/* dashboard proxy. The DashboardPlugin handles OAuth2, sessions, CORS, and Socket.IO.
  6. WebServer (Express) handles external webhooks from Top.gg, Ko-fi, and Last.fm.
  7. frontend/ is a standalone React + Vite application that communicates with the Fastify REST API.

Documentation Structure

SectionWhat You Will Find
FeaturesComplete feature list with technical details
Getting StartedInstallation, first run, and first song
Project StructureBackend and frontend folder maps
Backend OverviewManager class, services, handlers, Mewslink
Frontend OverviewReact app, routing, hooks, Socket.IO
Bot CommandsAll slash commands organized by category
REST APIInternal and dashboard API endpoints
Realtime LayerWebSocket and Socket.IO event system
ConfigurationFull config.yml reference
Premium SystemPatreon, Ko-fi, codes, premium role
IntegrationsSpotify, Last.fm, Top Chart API setup
Reverse Proxy & DNSNginx, SSL, and domain configuration
Deployment GuideDev, production, Docker, PM2, sharding
Pterodactyl GuidePanel eggs and startup configuration
TroubleshootingCommon errors and fixes
File ReferencePurpose of each major file
NotesSecurity, environment variables, operational tips

Support & Bug Reports

Found a bug, have a question, or need help with setup? You can reach out through the official Discord server:

For feature requests or code-level issues, please DM a staff member or open a ticket on the Discord server.

If you enjoy the project and want to help with hosting and maintenance costs, you can donate at tako.id/eleremen (opens in a new tab).