Chronicles of the Realm
liveAI-powered D&D with a Groq dungeon master
Next.jsSupabaseGroqVercel AI SDKGeminiPlaywright
Problem
Getting a group together with a good dungeon master is the hardest part of tabletop roleplaying — and most AI DMs lose the plot after a few turns.
Solution
A guided character-creation flow (roll race/class, allocate stats, choose exactly 5 abilities from 20 offers), campaign lobbies for playing with friends, and a Groq-powered AI DM that narrates scenes and consequences with persistent state in Supabase.
Features
- ▸Supabase auth with character-gated protected routes
- ▸Hero creation: lore, race/class rolls, stat allocation, 5-of-20 ability kit
- ▸Create or join campaign lobbies with friends
- ▸Groq-powered AI Dungeon Master narration
- ▸AI-generated hero art
Architecture
Next.js 16 with a custom server; Supabase for auth and campaign persistence; Groq for low-latency DM narration via the Vercel AI SDK; Gemini/HuggingFace for character art. Playwright QA suites cover the full game loop.
What I built
- ▸End-to-end game loop from auth to campaign play
- ▸Ability-draft character system
- ▸AI DM integration with scene state
- ▸Playwright playthrough test suites
Challenges
- ▸Keeping AI narration consistent with campaign state across turns
- ▸Gating game routes behind an active character
Results
Deployed and playable on Render with the full create-a-hero → play-a-campaign loop.
Next steps
- ▸Richer combat resolution
- ▸Persistent world events between sessions