All case studies

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
Links
Demo GitHub
DNDMind command center character workspace

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

DNDMind command center encounter workspace
DNDMind command center encounter workspace

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.

DNDMind architecture: Next.js client, ASP.NET Core API, Python FastAPI AI worker with Gemini, PostgreSQL with pgvector indices, guardrails and an evaluation suite, deployed on Cloud Run

Open the image for full size

Proof

  1. 01 Implements RAG and vector retrieval through PostgreSQL + pgvector instead of relying only on prompt history.
  2. 02 Separates frontend, backend, inference, and database responsibilities across a multi-service Docker Compose setup.
  3. 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.