How nacholedesma33/roleito-22w22 works
Roleito is a local-first AI-assisted tabletop RPG platform. The DM and players use the React app to manage campaigns and play in a virtual tabletop; backend APIs persist campaign state and expose domain features. For AI-assisted work, API handlers invoke agents that build canon-aware context and produce proposals, recaps, lore, or world-state views. The DM remains the authority over canon. The README documents the major product areas; several feature internals are represented by their exact enclosing directories because their implementation was not sampled.
Main entry points: agents Specialist agents · orchestrator.py Agent coordinator · models.py Campaign records · scene_routes.py Scene APIs
Components 22
React client
- Application shell
apps/dm/src/App.tsx - Virtual tabletop
apps/dm/src/components - Player view
apps/dm/src/pages/PlayerView.tsx - Campaign tools
apps/dm/src/pages
Backend API
- Campaign APIs
backend/routes.py - Scene APIs
backend/scene_routes.py - Agent APIs
backend/agent_routes.py - Orchestrator API
backend/orchestrator_routes.py - SQLite access
backend/database.py
Campaign domain
- Campaign records
backend/models.py - Map detection
backend/wall_detection - World state
core/world/engine.py - Canon review
core/canon/manager.py - Persistent memory
core/memory/builder.py - Narrative parsing
core/narrative
AI assistance
- Agent coordinator
core/agents/orchestrator.py - Safe context
core/agents/context_manager.py - Specialist agents
core/agents
AI providers
- Provider selection
core/agents/provider.py - AI adapters
infrastructure/ai
Other components
- DM
- Players
Connections 23
- DM → Application shell: uses
- Players → Player view: play through
- Application shell → Campaign tools: renders
apps/dm/src/App.tsx - Application shell → Campaign APIs: uses APIs
- Campaign tools → Campaign APIs: manages campaigns
- Virtual tabletop → Scene APIs: manages scenes
- Player view → Scene APIs: views scenes
- Scene APIs → Map detection: invokes detection
backend/scene_routes.py - Campaign APIs → Campaign records: reads and writes
backend/routes.py - Scene APIs → Campaign records: reads and writes
backend/scene_routes.py - SQLite access → Campaign records: maps models
backend/database.py - Agent APIs → Specialist agents: invokes agents
backend/agent_routes.py - Orchestrator API → Agent coordinator: executes tasks
backend/orchestrator_routes.py - Agent coordinator → Specialist agents: coordinates
core/agents/orchestrator.py - Agent coordinator → Safe context: builds context
core/agents/orchestrator.py - Agent coordinator → World state: requests state
core/agents/orchestrator.py - Agent coordinator → Campaign records: loads campaign data
core/agents/orchestrator.py - World state → Campaign records: reads events
core/world/engine.py - Specialist agents → Canon review: proposes canon
- Specialist agents → Persistent memory: uses persistent memory
- Specialist agents → Narrative parsing: uses narrative tools
core/agents/proposals.py - Specialist agents → Provider selection: gets provider
backend/agent_routes.py - Provider selection → AI adapters: builds provider
core/agents/provider.py