Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.41 KB

ARCHITECTURE.md

File metadata and controls

25 lines (19 loc) · 1.41 KB

Architecture

Volt-Base has two products: the create-volt-base generator and the generated Discord bot. The generator validates a single option model, assembles a language/feature variant in a temporary sibling directory, validates it, and atomically publishes the directory. The copied template is the source of the bot's maintained runtime behavior and tests.

The bot has four runtime boundaries:

  1. Strict environment parsing completes before Discord login.
  2. File loaders import and validate candidate modules into new registries; live registries/listeners change only after a complete successful load.
  3. Interaction/event execution passes through shared error, logging, cooldown, and metric paths.
  4. Process lifecycle owns login timeout, readiness, signal/fatal shutdown, and the operations HTTP server.

Slash-command registration is a deployment operation (bun run deploy), not a normal startup side effect. AUTO_DEPLOY=true exists only for a named development guild.

The starter is single-process. Its local cooldown adapter is bounded but is not consistent across replicas or shards. Before horizontal scaling, implement the documented atomic CooldownStore contract in Redis/KV, coordinate command deployments, aggregate metrics, and use Discord's sharding guidance. Do not use unbounded user/guild identifiers as metric labels.

See the ADR index for decisions and reconsideration triggers.