How yzy-ydm/aurora-roguelike-ai works
Aurora is a Godot client/server Roguelike backend: the game API handles accounts, player state, gameplay data, and saves, while a separate AI API generates dynamic content. The documented player flow is client → REST API → domain service → MySQL-backed game data; AI generation is a separate request path with provider integration and generation history. The tree and excerpts establish the main entry points and several route/service calls, but most gameplay and AI internals were not sampled, so their detailed wiring is intentionally summarized.
Main entry points: server/main.py FastAPI Entry · ai_routes.py Generation Routes · connection.py MySQL Store · ai/main.py AI API Entry
Components 23
Game API
- FastAPI Entry
server/main.py - Auth Routes
server/app/api/auth/router.py - Player Routes
server/app/api/player/router.py - Weapon Routes
server/app/api/weapon/router.py - Save Routes
server/app/api/save/router.py - Gameplay Routes
server/app/api
Game Domain
- Auth Service
server/app/services/auth_service.py - Player Service
server/app/services/player_service.py - Weapon Service
server/app/services/weapon_service.py - Save Service
server/app/services/save_service.py - Gameplay Services
server/app/services - MySQL Store
server/app/database/connection.py
AI Generation
- AI API Entry
server/ai/main.py - Generation Routes
server/ai/api/ai_routes.py - AI Service
server/ai/services/ai_service.py - Provider Factory
server/ai/services/provider_factory.py - Mock Provider
server/ai/services/llm_provider.py
AI Operations
- Generation Cache
server/ai/cache/cache_manager.py - AI History Store
server/ai/database/db_manager.py - AI Profile Store
server/ai/database/enhanced_db_manager.py
Other components
- Godot Client
- MiMo AI
- Player
Connections 24
- Godot Client → FastAPI Entry: REST requests
- FastAPI Entry → Auth Routes: registers
- FastAPI Entry → Player Routes: registers
- FastAPI Entry → Weapon Routes: registers
- FastAPI Entry → Save Routes: registers
- FastAPI Entry → Gameplay Routes: registers
- Auth Routes → Auth Service: calls
- Player Routes → Player Service: calls
- Weapon Routes → Weapon Service: calls
- Save Routes → Save Service: calls
- Gameplay Routes → Gameplay Services: delegates
- Auth Service → MySQL Store: queries and writes
- Player Service → MySQL Store: persists player
- Weapon Service → MySQL Store: reads and writes
- Save Service → MySQL Store: persists saves
- Godot Client → AI API Entry: AI requests
- AI API Entry → Generation Routes: dispatches
- Generation Routes → AI Service: requests generation
- AI Service → Provider Factory: selects provider
- Provider Factory → MiMo AI: calls model
- Provider Factory → Mock Provider: uses mock
- Generation Routes → Generation Cache: uses cache
- Generation Routes → AI History Store: records history
- AI API Entry → AI Profile Store: reads statistics