# gholsona171/qboxplatform architecture

> Architecture diagram of the GitHub repository gholsona171/qboxplatform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gholsona171/qboxplatform
- Repository: https://github.com/gholsona171/qboxplatform
- Video tour (about a minute): https://gitdiagram.com/gholsona171/qboxplatform/video

## Overview

Guildhall is a multi-server Discord community management platform, operated through a web portal and Discord bot. The principal portal workflow is sign-in with Discord, select a guild, then manage a feature through API routes and its domain service; Discord commands and interactions provide another entry point to community features. The README documents the broader feature set, while the sampled excerpts show route-to-service calls, session behavior, and game-query clients. Several feature and persistence connections are represented at subsystem level because their wiring was not sampled.

Main entry points: [`apps/api/src/composition/ApiApplication.ts`](https://github.com/gholsona171/qboxplatform/blob/main/apps/api/src/composition/ApiApplication.ts) (Fastify API), [`packages/discord/src/DiscordModule.ts`](https://github.com/gholsona171/qboxplatform/blob/main/packages/discord/src/DiscordModule.ts) (Discord bot), [`modules/knowledge-base/src/KnowledgeService.ts`](https://github.com/gholsona171/qboxplatform/blob/main/modules/knowledge-base/src/KnowledgeService.ts) (Knowledge base), [`apps/web/public/js/app.js`](https://github.com/gholsona171/qboxplatform/blob/main/apps/web/public/js/app.js) (Web portal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_portal["Web portal<br/>[app.js]"]
  node_bot["Discord bot<br/>[DiscordModule.ts]"]
end

subgraph group_platform["Platform services"]
  node_api["Fastify API<br/>[ApiApplication.ts]"]
  node_browser_auth["Browser auth routes"]
  node_sessions["Browser sessions"]
  node_database[("PostgreSQL persistence<br/>[DatabaseService.ts]")]
end

subgraph group_support["Support features"]
  node_ticket_routes["Ticket routes<br/>[TicketRoutes.ts]"]
  node_tickets["Ticket service<br/>[TicketService.ts]"]
  node_applications["Applications"]
  node_knowledge["Knowledge base"]
end

subgraph group_community["Community features"]
  node_safety["Safety features"]
  node_team["Staff features<br/>[StaffService.ts]"]
  node_community_features["Community features<br/>[LevelService.ts]"]
end

subgraph group_operations["Server operations"]
  node_server_features["Server integrations<br/>[BuilderService.ts]"]
  node_game_queries["Game queries"]
end

node_manager(("Community manager"))
node_discord(("Discord platform"))
node_ai(("OpenAI"))
node_game_servers(("Game servers"))

node_manager -->|"uses"| node_portal
node_manager -->|"commands"| node_bot
node_portal -->|"calls"| node_api
node_api -->|"registers"| node_browser_auth
node_browser_auth -->|"verifies sessions"| node_sessions
node_sessions -->|"persists sessions"| node_database
node_api -->|"registers"| node_ticket_routes
node_ticket_routes -->|"calls"| node_tickets
node_api -->|"serves via routes"| node_applications
node_api -->|"serves via routes"| node_knowledge
node_api -->|"serves via routes"| node_safety
node_api -->|"serves via routes"| node_team
node_api -->|"serves via routes"| node_community_features
node_api -->|"serves via routes"| node_server_features
node_bot -->|"connects"| node_discord
node_bot -->|"dispatches features"| node_tickets
node_bot -->|"dispatches features"| node_applications
node_bot -->|"dispatches features"| node_knowledge
node_bot -->|"dispatches features"| node_safety
node_bot -->|"dispatches features"| node_community_features
node_bot -->|"dispatches features"| node_server_features
node_knowledge -.->|"answers optionally"| node_ai
node_game_queries -->|"queries status"| node_game_servers

click node_portal "https://github.com/gholsona171/qboxplatform/blob/main/apps/web/public/js/app.js"
click node_bot "https://github.com/gholsona171/qboxplatform/blob/main/packages/discord/src/DiscordModule.ts"
click node_api "https://github.com/gholsona171/qboxplatform/blob/main/apps/api/src/composition/ApiApplication.ts"
click node_browser_auth "https://github.com/gholsona171/qboxplatform/blob/main/apps/api/src/auth/BrowserAuthenticationRoutes.ts"
click node_sessions "https://github.com/gholsona171/qboxplatform/blob/main/packages/authentication/src/services/BrowserSessionService.ts"
click node_database "https://github.com/gholsona171/qboxplatform/blob/main/packages/database/src/DatabaseService.ts"
click node_ticket_routes "https://github.com/gholsona171/qboxplatform/blob/main/apps/api/src/tickets/TicketRoutes.ts"
click node_tickets "https://github.com/gholsona171/qboxplatform/blob/main/modules/tickets/src/TicketService.ts"
click node_applications "https://github.com/gholsona171/qboxplatform/blob/main/modules/applications/src/ApplicationService.ts"
click node_knowledge "https://github.com/gholsona171/qboxplatform/blob/main/modules/knowledge-base/src/KnowledgeService.ts"
click node_safety "https://github.com/gholsona171/qboxplatform/blob/main/modules/moderation/src/ModerationService.ts"
click node_team "https://github.com/gholsona171/qboxplatform/blob/main/modules/staff/src/StaffService.ts"
click node_community_features "https://github.com/gholsona171/qboxplatform/blob/main/modules/levels/src/LevelService.ts"
click node_server_features "https://github.com/gholsona171/qboxplatform/blob/main/modules/server-builder/src/BuilderService.ts"
click node_game_queries "https://github.com/gholsona171/qboxplatform/blob/main/modules/game-servers/src/ProtocolQueryClient.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_portal,node_bot toneBlue
class node_api,node_browser_auth,node_sessions,node_database toneAmber
class node_ticket_routes,node_tickets,node_applications,node_knowledge,node_game_servers toneMint
class node_safety,node_team,node_community_features toneRose
class node_server_features,node_game_queries,node_manager,node_discord,node_ai toneIndigo
```

## Components

### User entry points

- [Web portal](https://github.com/gholsona171/qboxplatform/blob/main/apps/web/public/js/app.js): `apps/web/public/js/app.js`
- [Discord bot](https://github.com/gholsona171/qboxplatform/blob/main/packages/discord/src/DiscordModule.ts): `packages/discord/src/DiscordModule.ts`

### Platform services

- [Fastify API](https://github.com/gholsona171/qboxplatform/blob/main/apps/api/src/composition/ApiApplication.ts): `apps/api/src/composition/ApiApplication.ts`
- [Browser auth routes](https://github.com/gholsona171/qboxplatform/blob/main/apps/api/src/auth/BrowserAuthenticationRoutes.ts): `apps/api/src/auth/BrowserAuthenticationRoutes.ts`
- [Browser sessions](https://github.com/gholsona171/qboxplatform/blob/main/packages/authentication/src/services/BrowserSessionService.ts): `packages/authentication/src/services/BrowserSessionService.ts`
- [PostgreSQL persistence](https://github.com/gholsona171/qboxplatform/blob/main/packages/database/src/DatabaseService.ts): `packages/database/src/DatabaseService.ts`

### Support features

- [Ticket routes](https://github.com/gholsona171/qboxplatform/blob/main/apps/api/src/tickets/TicketRoutes.ts): `apps/api/src/tickets/TicketRoutes.ts`
- [Ticket service](https://github.com/gholsona171/qboxplatform/blob/main/modules/tickets/src/TicketService.ts): `modules/tickets/src/TicketService.ts`
- [Applications](https://github.com/gholsona171/qboxplatform/blob/main/modules/applications/src/ApplicationService.ts): `modules/applications/src/ApplicationService.ts`
- [Knowledge base](https://github.com/gholsona171/qboxplatform/blob/main/modules/knowledge-base/src/KnowledgeService.ts): `modules/knowledge-base/src/KnowledgeService.ts`

### Community features

- [Safety features](https://github.com/gholsona171/qboxplatform/blob/main/modules/moderation/src/ModerationService.ts): `modules/moderation/src/ModerationService.ts`
- [Staff features](https://github.com/gholsona171/qboxplatform/blob/main/modules/staff/src/StaffService.ts): `modules/staff/src/StaffService.ts`
- [Community features](https://github.com/gholsona171/qboxplatform/blob/main/modules/levels/src/LevelService.ts): `modules/levels/src/LevelService.ts`

### Server operations

- [Server integrations](https://github.com/gholsona171/qboxplatform/blob/main/modules/server-builder/src/BuilderService.ts): `modules/server-builder/src/BuilderService.ts`
- [Game queries](https://github.com/gholsona171/qboxplatform/blob/main/modules/game-servers/src/ProtocolQueryClient.ts): `modules/game-servers/src/ProtocolQueryClient.ts`

### Other components

- **Community manager**
- **Discord platform**
- **OpenAI**
- **Game servers**

## Connections

- Community manager → Web portal: uses
- Community manager → Discord bot: commands
- Web portal → Fastify API: calls
- Fastify API → Browser auth routes: registers
- Browser auth routes → Browser sessions: verifies sessions
- Browser sessions → PostgreSQL persistence: persists sessions
- Fastify API → Ticket routes: registers
- Ticket routes → Ticket service: calls
- Fastify API → Applications: serves via routes
- Fastify API → Knowledge base: serves via routes
- Fastify API → Safety features: serves via routes
- Fastify API → Staff features: serves via routes
- Fastify API → Community features: serves via routes
- Fastify API → Server integrations: serves via routes
- Discord bot → Discord platform: connects
- Discord bot → Ticket service: dispatches features
- Discord bot → Applications: dispatches features
- Discord bot → Knowledge base: dispatches features
- Discord bot → Safety features: dispatches features
- Discord bot → Community features: dispatches features
- Discord bot → Server integrations: dispatches features
- Knowledge base → OpenAI: answers optionally
- Game queries → Game servers: queries status
