How orurh/catforge_bot works
CatForge is a social Telegram cat game. Players create and manage a cat, train it, join Yard events, and toggle into arena fights; results update progression and can appear in chat. Weekly summaries and personality-driven speech extend that core loop, while Stars support is explicitly non-gameplay. The README says Expedition and Bestiary are currently disabled. The excerpts show app service construction and the remote engine boundary; several transport-to-service and persistence connections are documented only at product level or remain unverified, so those links are omitted or marked dashed.
Main entry points: app.go Application wiring · router.go Bot transport · grpc_engine.go Engine client · cat_banter_service.go Cat speech
Components 20
Telegram experience
- Bot transport
internal/transport/telegram/router.go
Game application
- Application wiring
internal/app/app.go - Cat setup and profile
internal/app/starter_service.go - Training
internal/app/training_service.go - Yard events
internal/app/yard_event_service.go - Arena fights
internal/app/fight_service.go - Weekly summary
internal/app/weekly_summary_service.go - Cat speech
internal/app/cat_banter_service.go - Stars support
internal/app/payment_service.go
Persistent state
- Postgres repositories
internal/repo/postgres
Deterministic engine
- Engine client
internal/gameengine/grpc_engine.go - Engine RPC contract
api/gameengine/v1/game_engine.proto - C++ RPC service
engine_cpp/src/grpc_service.cpp - Game rules
engine_cpp/src/game_engine.cpp
AI and speech
- AI providers
internal/ai/gateway.go - Procedural content
internal/gamecontent/catalog.go
Other components
- Player
- Telegram
- Telegram API
- AI provider
Connections 22
- Player → Telegram: sends commands
- Telegram → Bot transport: delivers updates
- Bot transport → Application wiring: dispatches actions
- Application wiring → Cat setup and profile: constructs service
internal/app/app.go - Application wiring → Training: constructs service
internal/app/app.go - Application wiring → Yard events: constructs service
internal/app/app.go - Application wiring → Arena fights: constructs service
internal/app/app.go - Application wiring → Weekly summary: constructs service
internal/app/app.go - Application wiring → Cat speech: constructs service
internal/app/app.go - Application wiring → Stars support: exposes service
internal/app/app.go - Training → Engine client: resolves training
- Arena fights → Engine client: resolves fight
- Yard events → Engine client: resolves event
- Engine client → Engine RPC contract: uses RPC contract
internal/gameengine/grpc_engine.go - C++ RPC service → Game rules: runs rules
- Telegram → Bot transport: receives bot replies
- Bot transport → Telegram API: sends messages
- Cat speech → AI providers: generates speech
- AI providers → AI provider: requests generation
- Cat speech → Procedural content: uses fallback text
- Player → Bot transport: requests support
- Player → Bot transport: starts game actions