# 3lig7a/vip-e-sport architecture

> Architecture diagram of the GitHub repository 3lig7a/vip-e-sport, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/3lig7a/vip-e-sport
- Repository: https://github.com/3lig7a/vip-e-sport

## Overview

VIP E-SPORT is a Discord server-management bot with a web dashboard. Members and administrators invoke Discord commands or use the dashboard to configure server features; the bot applies those features in Discord and persists server state in MongoDB. The graph emphasizes README-documented capabilities and sampled bot internals. Dashboard-to-API links are documented by the API excerpt, but its client wiring and several bot subsystems were not sampled, so uncertain connections are omitted.

Main entry points: [`src/commands/index.ts`](https://github.com/3lig7a/vip-e-sport/blob/main/src/commands/index.ts) (Bot commands), [`src/database/index.ts`](https://github.com/3lig7a/vip-e-sport/blob/main/src/database/index.ts) (Database access), [`src/api/index.ts`](https://github.com/3lig7a/vip-e-sport/blob/main/src/api/index.ts) (Dashboard API), [`src/levels/engine.ts`](https://github.com/3lig7a/vip-e-sport/blob/main/src/levels/engine.ts) (Leveling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Interaction surfaces"]
  node_bot_commands["Bot commands<br/>[index.ts]"]
  node_dashboard["Server dashboard<br/>[page.tsx]"]
  node_dashboard_api["Dashboard API<br/>[index.ts]"]
end

subgraph group_features["Server capabilities"]
  node_streamer_alerts["Streamer alerts<br/>[AlertService.ts]"]
  node_logging["Server logging<br/>[dispatcher.ts]"]
  node_security["Security controls<br/>[antiNuke.ts]"]
  node_moderation["Moderation<br/>[warn.ts]"]
  node_tickets["Tickets<br/>[manager.ts]"]
  node_role_panels["Role panels<br/>[panels.ts]"]
  node_community["Community tools<br/>[autoRoles.ts]"]
  node_embeds_say["Embeds and say<br/>[say.ts]"]
  node_levels["Leveling<br/>[engine.ts]"]
  node_giveaways["Giveaways<br/>[service.ts]"]
  node_music["Music<br/>[service.ts]"]
  node_tournaments["Tournaments<br/>[service.ts]"]
end

subgraph group_core["Bot internals"]
  node_database_access["Database access<br/>[index.ts]"]
  node_schemas["MongoDB schemas<br/>[schema.ts]"]
  node_ui_kit["Discord UI kit<br/>[kit.ts]"]
end

subgraph group_state["Persistent state"]
  node_mongo[("MongoDB")]
end

node_discord_users(("Discord users"))
node_discord(("Discord platform"))

node_discord_users -->|"invoke commands"| node_bot_commands
node_bot_commands -->|"responds in"| node_discord
node_bot_commands -->|"configure alerts"| node_streamer_alerts
node_bot_commands -->|"configure logs"| node_logging
node_bot_commands -->|"configure security"| node_security
node_bot_commands -->|"run moderation"| node_moderation
node_bot_commands -->|"manage tickets"| node_tickets
node_bot_commands -->|"configure roles"| node_role_panels
node_bot_commands -->|"configure community"| node_community
node_bot_commands -->|"compose messages"| node_embeds_say
node_bot_commands -->|"configure leveling"| node_levels
node_bot_commands -->|"manage giveaways"| node_giveaways
node_bot_commands -.->|"control music"| node_music
node_bot_commands -.->|"manage tournaments"| node_tournaments
node_discord_users -->|"configure server"| node_dashboard
node_dashboard -.->|"requests settings"| node_dashboard_api
node_dashboard_api -->|"reads security"| node_security
node_dashboard_api -->|"reads levels"| node_levels
node_dashboard_api -->|"reads tournaments"| node_tournaments
node_streamer_alerts -->|"delivers alerts"| node_discord
node_logging -->|"loads log settings"| node_database_access
node_levels -->|"records XP"| node_database_access
node_tickets -->|"stores ticket state"| node_database_access
node_giveaways -->|"stores giveaway state"| node_database_access
node_music -->|"uses persisted settings"| node_database_access
node_tournaments -->|"stores tournament state"| node_database_access
node_database_access -->|"uses schemas"| node_schemas
node_database_access -->|"reads and writes"| node_mongo
node_bot_commands -->|"builds Discord UI"| node_ui_kit

click node_bot_commands "https://github.com/3lig7a/vip-e-sport/blob/main/src/commands/index.ts"
click node_dashboard "https://github.com/3lig7a/vip-e-sport/blob/main/panel/app/s/%5BguildId%5D/page.tsx"
click node_dashboard_api "https://github.com/3lig7a/vip-e-sport/blob/main/src/api/index.ts"
click node_streamer_alerts "https://github.com/3lig7a/vip-e-sport/blob/main/src/services/AlertService.ts"
click node_logging "https://github.com/3lig7a/vip-e-sport/blob/main/src/logging/dispatcher.ts"
click node_security "https://github.com/3lig7a/vip-e-sport/blob/main/src/security/antiNuke.ts"
click node_moderation "https://github.com/3lig7a/vip-e-sport/blob/main/src/moderation/warn.ts"
click node_tickets "https://github.com/3lig7a/vip-e-sport/blob/main/src/tickets/manager.ts"
click node_role_panels "https://github.com/3lig7a/vip-e-sport/blob/main/src/roles/panels.ts"
click node_community "https://github.com/3lig7a/vip-e-sport/blob/main/src/community/autoRoles.ts"
click node_embeds_say "https://github.com/3lig7a/vip-e-sport/blob/main/src/commands/util/say.ts"
click node_levels "https://github.com/3lig7a/vip-e-sport/blob/main/src/levels/engine.ts"
click node_giveaways "https://github.com/3lig7a/vip-e-sport/blob/main/src/giveaways/service.ts"
click node_music "https://github.com/3lig7a/vip-e-sport/blob/main/src/music/service.ts"
click node_tournaments "https://github.com/3lig7a/vip-e-sport/blob/main/src/tournaments/service.ts"
click node_database_access "https://github.com/3lig7a/vip-e-sport/blob/main/src/database/index.ts"
click node_schemas "https://github.com/3lig7a/vip-e-sport/blob/main/src/database/schema.ts"
click node_ui_kit "https://github.com/3lig7a/vip-e-sport/blob/main/src/ui/kit.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bot_commands,node_dashboard,node_dashboard_api,node_discord_users toneBlue
class node_streamer_alerts,node_logging,node_security,node_moderation,node_tickets,node_role_panels,node_community,node_embeds_say,node_levels,node_giveaways,node_music,node_tournaments toneAmber
class node_database_access,node_schemas,node_ui_kit toneMint
class node_mongo toneRose
class node_discord toneIndigo
```

## Components

### Interaction surfaces

- [Bot commands](https://github.com/3lig7a/vip-e-sport/blob/main/src/commands/index.ts): `src/commands/index.ts`
- [Server dashboard](https://github.com/3lig7a/vip-e-sport/blob/main/panel/app/s/%5BguildId%5D/page.tsx): `panel/app/s/[guildId]/page.tsx`
- [Dashboard API](https://github.com/3lig7a/vip-e-sport/blob/main/src/api/index.ts): `src/api/index.ts`

### Server capabilities

- [Streamer alerts](https://github.com/3lig7a/vip-e-sport/blob/main/src/services/AlertService.ts): `src/services/AlertService.ts`
- [Server logging](https://github.com/3lig7a/vip-e-sport/blob/main/src/logging/dispatcher.ts): `src/logging/dispatcher.ts`
- [Security controls](https://github.com/3lig7a/vip-e-sport/blob/main/src/security/antiNuke.ts): `src/security/antiNuke.ts`
- [Moderation](https://github.com/3lig7a/vip-e-sport/blob/main/src/moderation/warn.ts): `src/moderation/warn.ts`
- [Tickets](https://github.com/3lig7a/vip-e-sport/blob/main/src/tickets/manager.ts): `src/tickets/manager.ts`
- [Role panels](https://github.com/3lig7a/vip-e-sport/blob/main/src/roles/panels.ts): `src/roles/panels.ts`
- [Community tools](https://github.com/3lig7a/vip-e-sport/blob/main/src/community/autoRoles.ts): `src/community/autoRoles.ts`
- [Embeds and say](https://github.com/3lig7a/vip-e-sport/blob/main/src/commands/util/say.ts): `src/commands/util/say.ts`
- [Leveling](https://github.com/3lig7a/vip-e-sport/blob/main/src/levels/engine.ts): `src/levels/engine.ts`
- [Giveaways](https://github.com/3lig7a/vip-e-sport/blob/main/src/giveaways/service.ts): `src/giveaways/service.ts`
- [Music](https://github.com/3lig7a/vip-e-sport/blob/main/src/music/service.ts): `src/music/service.ts`
- [Tournaments](https://github.com/3lig7a/vip-e-sport/blob/main/src/tournaments/service.ts): `src/tournaments/service.ts`

### Bot internals

- [Database access](https://github.com/3lig7a/vip-e-sport/blob/main/src/database/index.ts): `src/database/index.ts`
- [MongoDB schemas](https://github.com/3lig7a/vip-e-sport/blob/main/src/database/schema.ts): `src/database/schema.ts`
- [Discord UI kit](https://github.com/3lig7a/vip-e-sport/blob/main/src/ui/kit.ts): `src/ui/kit.ts`

### Persistent state

- **MongoDB**

### Other components

- **Discord users**
- **Discord platform**

## Connections

- Discord users → Bot commands: invoke commands
- Bot commands → Discord platform: responds in
- Bot commands → Streamer alerts: configure alerts
- Bot commands → Server logging: configure logs
- Bot commands → Security controls: configure security
- Bot commands → Moderation: run moderation
- Bot commands → Tickets: manage tickets
- Bot commands → Role panels: configure roles
- Bot commands → Community tools: configure community
- Bot commands → Embeds and say: compose messages (evidence: `src/commands/util/say.ts`)
- Bot commands → Leveling: configure leveling
- Bot commands → Giveaways: manage giveaways (evidence: `src/giveaways/service.ts`)
- Bot commands → Music: control music
- Bot commands → Tournaments: manage tournaments
- Discord users → Server dashboard: configure server
- Server dashboard → Dashboard API: requests settings
- Dashboard API → Security controls: reads security (evidence: `src/api/index.ts`)
- Dashboard API → Leveling: reads levels (evidence: `src/api/index.ts`)
- Dashboard API → Tournaments: reads tournaments (evidence: `src/api/index.ts`)
- Streamer alerts → Discord platform: delivers alerts
- Server logging → Database access: loads log settings (evidence: `src/logging/dispatcher.ts`)
- Leveling → Database access: records XP (evidence: `src/levels/engine.ts`)
- Tickets → Database access: stores ticket state (evidence: `src/tickets/manager.ts`)
- Giveaways → Database access: stores giveaway state (evidence: `src/giveaways/service.ts`)
- Music → Database access: uses persisted settings (evidence: `src/music/service.ts`)
- Tournaments → Database access: stores tournament state (evidence: `src/tournaments/service.ts`)
- Database access → MongoDB schemas: uses schemas (evidence: `src/database/index.ts`)
- Database access → MongoDB: reads and writes (evidence: `src/database/index.ts`)
- Bot commands → Discord UI kit: builds Discord UI
