| Β | Feature |
|---|---|
| π | Discord OAuth2 login β pick a server you manage β open its dashboard |
| π | Live dashboard β member counts, bot ping, uptime, CPU/RAM & DB status streamed over WebSockets |
| π‘οΈ | Moderation β ban, kick, timeout, warn, unban, purge, slowmode, lock/unlock β every action stored as a numbered case |
| π | Welcome system β channel picker, embed builder, variable support and a pixel-accurate live preview |
| π | Analytics β command usage and moderation trends in interactive charts |
| βοΈ | Settings β prefix, language and embed colour, persisted per guild |
| π€ | 14 slash commands β moderation + utility (serverinfo, userinfo, avatar, ping, help) |
| π | Auto-generated API docs (OpenAPI / Swagger UI) |
| π³ | Docker-first β docker compose up brings up Mongo + API + dashboard |
Backend β Node.js 22, TypeScript, discord.js v14, Express, MongoDB + Mongoose, Passport (Discord OAuth2), JWT (httpOnly cookies), Socket.IO, Zod, Helmet, Winston, Swagger.
Frontend β React 18, Vite, TypeScript, TailwindCSS, Framer Motion, Recharts, React Router, TanStack Query, Lucide icons.
Tooling β npm workspaces, ESLint, Prettier, Husky + lint-staged, GitHub Actions CI, Docker.
nexusbot/
βββ apps/
β βββ server/ # API + realtime gateway + Discord bot (TypeScript)
β β βββ src/
β β βββ bot/ # client, command & event loaders, commands, events
β β βββ config/ # env validation (zod) + constants
β β βββ db/ # Mongoose connection + models
β β βββ repositories/ # data-access layer
β β βββ services/ # business logic (auth, guild, moderation, welcome, stats)
β β βββ http/ # express app, middleware, controllers, routes, socket, swagger
β βββ web/ # React dashboard (Vite)
β βββ src/
β βββ components/ # ui/ layout/ charts/ common/
β βββ context/ # auth provider
β βββ hooks/ # data hooks (TanStack Query + realtime)
β βββ pages/ # landing, login, server picker, dashboard/*
β βββ lib/ # api client, socket, utils
βββ docs/ # SETUP Β· ARCHITECTURE Β· DEPLOYMENT
βββ docker-compose.yml
βββ package.json # npm workspaces root
Prerequisites: Node.js β₯ 20, a MongoDB instance (local or Atlas), and a Discord application. The full walkthrough β including the Discord Developer Portal β is in
docs/SETUP.md.
# 1. Install dependencies (npm workspaces)
npm install
# 2. Configure environment
cp apps/server/.env.example apps/server/.env # fill in Discord + Mongo details
cp apps/web/.env.example apps/web/.env
# 3. Register the bot's slash commands
npm run deploy:commands
# 4. Run the API + bot and the dashboard together
npm run dev
cp .env.example .env # fill in Discord credentials
docker compose up --build
Brings up MongoDB, the API/bot and the dashboard (served by nginx). See
docs/DEPLOYMENT.md.
| Command | Description |
|---|---|
npm run dev |
Run API/bot and dashboard concurrently |
npm run build |
Type-check and build both apps |
npm run deploy:commands |
Register slash commands with Discord |
npm run lint / npm run format |
Lint / format the whole monorepo |
npm run typecheck |
Type-check both apps |
The codebase is structured so each feature is a vertical slice (model β repository β service β controller β route, plus a page and a bot command/event). Planned modules that follow the same pattern:
MIT Β© 2026 Veer β see LICENSE.