How denkripton/dnd-character_sheet works
This repository combines a character-generation backend with a Telegram bot and a small Telegram mini-app client. The principal workflow is character creation or editing: the bot guides a user through a draft and generation choices, then backend character services validate and persist the result. The tree also shows authentication, AI-provider/model discovery, character subdomains, health checks, and messaging capabilities. The README is empty and most modules were not sampled, so the graph preserves these subsystems but omits unverified runtime links; cited edges reflect only shown references or calls.
Main entry points: draft/service.py Draft lifecycle · backstory/service.py Backstory generation · router.py Character interaction · main.py Bot runtime
Components 24
Telegram bot
- Bot runtime
bot/app/main.py - Start and auth
bot/app/modules/start/router.py - Character interaction
bot/app/modules/character/router.py - Backstory interaction
bot/app/modules/backstory/router.py - Creation service
bot/app/modules/character/service.py - Bot auth service
bot/app/modules/auth/service.py - Backend HTTP client
bot/app/infrastructure/http/client.py - Mini-app client
mini-app/src/main.tsx
Character domain
- Draft lifecycle
backend/src/modules/character/draft/service.py - Character management
backend/src/modules/character/base/service.py - Character details
backend/src/modules/character - Backstory generation
backend/src/modules/character/backstory/service.py
Backend services
- External authentication
backend/src/modules/auth/external_service.py - User identities
backend/src/modules/auth/repository - AI model catalog
backend/src/modules/ai - Character repositories
backend/src/modules/character/repositories - Health checks
backend/src/modules/health
Infrastructure
- Application settings
backend/src/config.py - Unit of work
backend/src/databases/unit_of_work.py - Redis cache
backend/src/infrastructure/redis/cache.py - Rate limiting interface
backend/src/utils/interfaces/rate_limiter.py - RabbitMQ client
bot/app/infrastructure/rabbitmq/client.py - Backend messaging
backend/src/messaging/dispatcher.py
Other components
- Telegram user
Connections 28
- Telegram user → Start and auth: starts interaction
- Bot runtime → Start and auth: starts polling
bot/app/main.py - Bot runtime → RabbitMQ client: starts client
bot/app/main.py - Bot runtime → Creation service: provides service
bot/app/main.py - Bot runtime → Character interaction: registers handlers
- Start and auth → Character interaction: routes to
bot/app/modules/start/router.py - Start and auth → Mini-app client: routes to
bot/app/modules/start/router.py - Character interaction → Creation service: calls
bot/app/modules/character/router.py - Character interaction → Backstory interaction: uses controls
bot/app/modules/character/router.py - Backstory interaction → Character interaction: uses controls
bot/app/modules/backstory/router.py - Bot auth service → Backend HTTP client: uses client
bot/app/modules/auth/service.py - Creation service → RabbitMQ client: uses messaging
bot/app/modules/character/service.py - External authentication → User identities: reads and writes
backend/src/modules/auth/external_service.py - External authentication → Unit of work: commits changes
backend/src/modules/auth/external_service.py - Draft lifecycle → Character repositories: reads and writes
backend/src/modules/character/draft/service.py - Draft lifecycle → Unit of work: commits changes
backend/src/modules/character/draft/service.py - Draft lifecycle → Redis cache: uses cache
backend/src/modules/character/draft/service.py - Draft lifecycle → Rate limiting interface: checks limits
backend/src/modules/character/draft/service.py - Draft lifecycle → Application settings: reads limits
backend/src/modules/character/draft/service.py - Character management → Character repositories: reads and writes
backend/src/modules/character/base/service.py - Character management → Unit of work: commits changes
backend/src/modules/character/base/service.py - Character management → Redis cache: uses cache
backend/src/modules/character/base/service.py - Backstory generation → Character repositories: uses repositories
backend/src/modules/character/backstory/service.py - Backstory generation → Unit of work: uses transactions
backend/src/modules/character/backstory/service.py - Backstory generation → Redis cache: uses cache
backend/src/modules/character/backstory/service.py - Backstory generation → Rate limiting interface: checks limits
backend/src/modules/character/backstory/service.py - Backstory generation → AI model catalog: uses AI module
backend/src/modules/character/backstory/service.py - RabbitMQ client → Backend messaging: uses backend bus
bot/app/infrastructure/rabbitmq/client.py