Case study 02 / 19
DNDMind AI Copilot
Full-stack AI Dungeon Master copilot with RAG, memory retrieval, structured outputs, tool calling, and deterministic evaluation workflows.
- Stack
- Gemini 2.5 Flash · Next.js · ASP.NET Core · FastAPI · PostgreSQL · pgvector · Docker · RAG
The problem
Tabletop role-playing sessions create a lot of changing context: character state, campaign memory, rules references, prior decisions, and narrative continuity. A simple chatbot can respond creatively, but it does not reliably preserve memory, retrieve relevant context, or keep outputs structured enough for repeatable gameplay support.
What I built
Built a full-stack AI Dungeon Master copilot using Gemini 2.5 Flash for generation, plus application workflow, backend APIs, retrieval, memory, and structured AI responses. The system uses a Next.js interface, ASP.NET Core services, FastAPI inference support, PostgreSQL with pgvector, Docker Compose, embeddings, memory retrieval, tool/function calling, and deterministic evaluation workflows.
In use
Architecture
The Next.js client talks to an ASP.NET Core API that owns campaign data in PostgreSQL. A Python FastAPI worker handles generation, retrieval over separate rules and homebrew indices in pgvector, tool calls and guardrail checks, and a deterministic evaluation suite runs against the same pipeline.
Open the image for full size
Proof
- 01 Implements RAG and vector retrieval through PostgreSQL + pgvector instead of relying only on prompt history.
- 02 Separates frontend, backend, inference, and database responsibilities across a multi-service Docker Compose setup.
- 03 Uses Gemini 2.5 Flash with structured AI outputs and tool/function calling patterns to make responses easier to validate and integrate.
Result
The project demonstrates production-style AI application architecture beyond a prompt-only demo: persistent memory, retrieval, structured outputs, backend orchestration, and evaluation-ready workflows.