Back to feed
Dev.to
Dev.to
5/12/2026
How I built a self-hosted AI Gamemaster that actually enforces RPG rules (FastAPI & Vue)

How I built a self-hosted AI Gamemaster that actually enforces RPG rules (FastAPI & Vue)

Short summary

TaleWeaver is an open-source, self-hosted RPG engine solving LLM state-management failures through a 2-pass architecture: a logic engine handles rule enforcement and game state as JSON mutations, while a narrative model converts outcomes to immersive prose. Built with FastAPI, Vue, and SQLite, it integrates Gemini TTS and ElevenLabs for dramatic audio narration, and supports both cloud LLMs and local Ollama execution. GitHub includes full setup scripts for 1-click Docker deployment.

  • 2-pass architecture separates deterministic rule logic from creative narrative, solving LLM state-tracking failures
  • Self-hosted with FastAPI, Vue, SQLite; includes TTS integration and live map rendering
  • Open-source on GitHub with Docker setup for easy deployment

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Explore more