# sumyka/chillcamp architecture

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

- Interactive diagram: https://gitdiagram.com/sumyka/chillcamp
- Repository: https://github.com/sumyka/chillcamp

## Overview

ChillCamp is a Discord bot for user-configurable notifications and temporary voice channels. Users start with a channel button, submit a modal to create a voice channel, and the bot can notify opted-in users; voice-state events also handle AFK and delayed channel deletion. Slash commands manage notification preferences, stored in SQLite. The graph preserves the command-deployment capability, but its invocation is not shown. Relationships are limited to calls and event wiring visible in excerpts or the source index; several feature internals were not sampled.

Main entry points: [`src/index.ts`](https://github.com/sumyka/chillcamp/blob/master/src/index.ts) (Bot entrypoint), [`src/handlers/interactionCreate.ts`](https://github.com/sumyka/chillcamp/blob/master/src/handlers/interactionCreate.ts) (Interaction router), [`src/features/db/informDB.ts`](https://github.com/sumyka/chillcamp/blob/master/src/features/db/informDB.ts) (Notification store), [`src/handlers/buttonInteractions.ts`](https://github.com/sumyka/chillcamp/blob/master/src/handlers/buttonInteractions.ts) (Button handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot runtime"]
  node_app["Bot entrypoint<br/>[index.ts]"]
  node_logger["Logging<br/>[logger.ts]"]
  node_activity["Bot activity<br/>[setActivity.ts]"]
  node_deploy["Command deployment<br/>[deployCommand.ts]"]
end

subgraph group_interactions["User interactions"]
  node_interaction_router["Interaction router"]
  node_button_handler["Button handler"]
  node_modal_handler["Modal handler"]
  node_command_handler["Command handler"]
end

subgraph group_voice["Voice channels"]
  node_vc_form["Voice creation form<br/>[createVCEmbed.ts]"]
  node_vc_modal["Voice creation modal<br/>[createVCModal.ts]"]
  node_create_vc["Create voice channel<br/>[createVC.ts]"]
  node_inform_message["Notify opted-in users"]
  node_afk["AFK handling<br/>[AFK.ts]"]
  node_delete_vc["Delayed channel deletion<br/>[deleteVC.ts]"]
  node_delete_message["Delete old message<br/>[deleteMessage.ts]"]
end

subgraph group_preferences["Notification preferences"]
  node_inform_command["Set notifications<br/>[setInform.ts]"]
  node_inform_db[("Notification store<br/>[informDB.ts]")]
end

node_discord_user(("Discord user"))
node_discord["Discord platform"]

node_app -->|"sets up"| node_logger
node_app -->|"sets activity"| node_activity
node_app -->|"posts form"| node_vc_form
node_app -->|"dispatches interactions"| node_interaction_router
node_app -->|"handles voice events"| node_afk
node_app -->|"handles voice events"| node_delete_vc
node_app -->|"deletes departed user"| node_inform_db
node_discord_user -.->|"interacts"| node_discord
node_discord -.->|"delivers interactions"| node_interaction_router
node_interaction_router -->|"routes buttons"| node_button_handler
node_interaction_router -->|"routes modals"| node_modal_handler
node_interaction_router -->|"routes commands"| node_command_handler
node_button_handler -->|"opens modal"| node_vc_modal
node_modal_handler -->|"submits creation"| node_create_vc
node_command_handler -->|"dispatches setting"| node_inform_command
node_inform_command -->|"saves preference"| node_inform_db
node_create_vc -->|"requests notification"| node_inform_message
node_inform_message -->|"reads recipients"| node_inform_db
node_vc_form -->|"clears prior form"| node_delete_message
node_deploy -.->|"registers commands"| node_discord

click node_app "https://github.com/sumyka/chillcamp/blob/master/src/index.ts"
click node_logger "https://github.com/sumyka/chillcamp/blob/master/src/utils/logger.ts"
click node_activity "https://github.com/sumyka/chillcamp/blob/master/src/Initialize/setActivity.ts"
click node_deploy "https://github.com/sumyka/chillcamp/blob/master/src/Initialize/deployCommand.ts"
click node_interaction_router "https://github.com/sumyka/chillcamp/blob/master/src/handlers/interactionCreate.ts"
click node_button_handler "https://github.com/sumyka/chillcamp/blob/master/src/handlers/buttonInteractions.ts"
click node_modal_handler "https://github.com/sumyka/chillcamp/blob/master/src/handlers/modalInteractions.ts"
click node_command_handler "https://github.com/sumyka/chillcamp/blob/master/src/handlers/commandInteractions.ts"
click node_inform_command "https://github.com/sumyka/chillcamp/blob/master/src/commands/common/setInform.ts"
click node_inform_db "https://github.com/sumyka/chillcamp/blob/master/src/features/db/informDB.ts"
click node_vc_form "https://github.com/sumyka/chillcamp/blob/master/src/features/vc/createVCEmbed.ts"
click node_vc_modal "https://github.com/sumyka/chillcamp/blob/master/src/features/vc/createVCModal.ts"
click node_create_vc "https://github.com/sumyka/chillcamp/blob/master/src/features/vc/createVC.ts"
click node_inform_message "https://github.com/sumyka/chillcamp/blob/master/src/features/vc/sendInformMessage.ts"
click node_afk "https://github.com/sumyka/chillcamp/blob/master/src/features/vc/AFK.ts"
click node_delete_vc "https://github.com/sumyka/chillcamp/blob/master/src/features/vc/deleteVC.ts"
click node_delete_message "https://github.com/sumyka/chillcamp/blob/master/src/utils/deleteMessage.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_app,node_logger,node_activity,node_deploy,node_discord_user toneBlue
class node_interaction_router,node_button_handler,node_modal_handler,node_command_handler toneAmber
class node_vc_form,node_vc_modal,node_create_vc,node_inform_message,node_afk,node_delete_vc,node_delete_message toneMint
class node_inform_command,node_inform_db toneRose
class node_discord toneIndigo
```

## Components

### Bot runtime

- [Bot entrypoint](https://github.com/sumyka/chillcamp/blob/master/src/index.ts): `src/index.ts`
- [Logging](https://github.com/sumyka/chillcamp/blob/master/src/utils/logger.ts): `src/utils/logger.ts`
- [Bot activity](https://github.com/sumyka/chillcamp/blob/master/src/Initialize/setActivity.ts): `src/Initialize/setActivity.ts`
- [Command deployment](https://github.com/sumyka/chillcamp/blob/master/src/Initialize/deployCommand.ts): `src/Initialize/deployCommand.ts`

### User interactions

- [Interaction router](https://github.com/sumyka/chillcamp/blob/master/src/handlers/interactionCreate.ts): `src/handlers/interactionCreate.ts`
- [Button handler](https://github.com/sumyka/chillcamp/blob/master/src/handlers/buttonInteractions.ts): `src/handlers/buttonInteractions.ts`
- [Modal handler](https://github.com/sumyka/chillcamp/blob/master/src/handlers/modalInteractions.ts): `src/handlers/modalInteractions.ts`
- [Command handler](https://github.com/sumyka/chillcamp/blob/master/src/handlers/commandInteractions.ts): `src/handlers/commandInteractions.ts`

### Voice channels

- [Voice creation form](https://github.com/sumyka/chillcamp/blob/master/src/features/vc/createVCEmbed.ts): `src/features/vc/createVCEmbed.ts`
- [Voice creation modal](https://github.com/sumyka/chillcamp/blob/master/src/features/vc/createVCModal.ts): `src/features/vc/createVCModal.ts`
- [Create voice channel](https://github.com/sumyka/chillcamp/blob/master/src/features/vc/createVC.ts): `src/features/vc/createVC.ts`
- [Notify opted-in users](https://github.com/sumyka/chillcamp/blob/master/src/features/vc/sendInformMessage.ts): `src/features/vc/sendInformMessage.ts`
- [AFK handling](https://github.com/sumyka/chillcamp/blob/master/src/features/vc/AFK.ts): `src/features/vc/AFK.ts`
- [Delayed channel deletion](https://github.com/sumyka/chillcamp/blob/master/src/features/vc/deleteVC.ts): `src/features/vc/deleteVC.ts`
- [Delete old message](https://github.com/sumyka/chillcamp/blob/master/src/utils/deleteMessage.ts): `src/utils/deleteMessage.ts`

### Notification preferences

- [Set notifications](https://github.com/sumyka/chillcamp/blob/master/src/commands/common/setInform.ts): `src/commands/common/setInform.ts`
- [Notification store](https://github.com/sumyka/chillcamp/blob/master/src/features/db/informDB.ts): `src/features/db/informDB.ts`

### Other components

- **Discord user**
- **Discord platform**

## Connections

- Bot entrypoint → Logging: sets up (evidence: `src/index.ts`)
- Bot entrypoint → Bot activity: sets activity (evidence: `src/index.ts`)
- Bot entrypoint → Voice creation form: posts form (evidence: `src/index.ts`)
- Bot entrypoint → Interaction router: dispatches interactions (evidence: `src/index.ts`)
- Bot entrypoint → AFK handling: handles voice events (evidence: `src/index.ts`)
- Bot entrypoint → Delayed channel deletion: handles voice events (evidence: `src/index.ts`)
- Bot entrypoint → Notification store: deletes departed user (evidence: `src/index.ts`)
- Discord user → Discord platform: interacts
- Discord platform → Interaction router: delivers interactions
- Interaction router → Button handler: routes buttons (evidence: `src/handlers/interactionCreate.ts`)
- Interaction router → Modal handler: routes modals (evidence: `src/handlers/interactionCreate.ts`)
- Interaction router → Command handler: routes commands (evidence: `src/handlers/interactionCreate.ts`)
- Button handler → Voice creation modal: opens modal (evidence: `src/handlers/buttonInteractions.ts`)
- Modal handler → Create voice channel: submits creation (evidence: `src/handlers/modalInteractions.ts`)
- Command handler → Set notifications: dispatches setting (evidence: `src/handlers/commandInteractions.ts`)
- Set notifications → Notification store: saves preference (evidence: `src/commands/common/setInform.ts`)
- Create voice channel → Notify opted-in users: requests notification (evidence: `src/features/vc/createVC.ts`)
- Notify opted-in users → Notification store: reads recipients (evidence: `src/features/vc/sendInformMessage.ts`)
- Voice creation form → Delete old message: clears prior form (evidence: `src/features/vc/createVCEmbed.ts`)
- Command deployment → Discord platform: registers commands
