How It Works

DMGoblin is an AI-powered solo RPG engine. Here's what's under the hood and where it's going.

An AI DM that holds context

Most AI chatbots forget everything the moment you close the tab. DMGoblin doesn't. Every time you send a message, the system injects your full world context into the AI's prompt — character stats, active quests, known NPCs, recent story, and world rules.

The result is a DM that knows your character's strength score when you try to break down a door, remembers the blacksmith who hates you, and tracks which quests you've abandoned.

# Context sent to Claude on every message
[WORLD RULES]
Tone: Dark Fantasy. Violence: Moderate. Solo.

[CHARACTER]
Aldric · Fighter · HP 28/34 · STR 16 · DEX 12...

[ACTIVE QUESTS]
- Find the stolen relic (active)
- Identify the assassins (unresolved)

[KNOWN NPCS]
- Theron: blacksmith, distrusts party

[LAST 10 MESSAGES]
...

Built right from the start

🎲
Dice-first mechanics
The AI never resolves uncertain outcomes on its own. It calls for a roll, your result decides what happens.
🧠
Structured memory
NPCs, quests, locations, and plot hooks live in a PostgreSQL database — not a chat transcript.
⚖️
Trademark safe
We say "d20-style rolls" and "fantasy tabletop inspired" — never D&D or Dungeons & Dragons.
🔒
Sessions stay yours
Campaigns, characters, and logs belong to your account. Export or delete anytime (Phase 5).

Tech Stack

Backend
Node.js + Express
Fast, familiar, Railway-native
Database
PostgreSQL + Prisma
Structured world data, Railway supports it natively
Frontend
EJS → React (later)
Start simple, upgrade when Phase 5 demands it
AI
Anthropic Claude API
Best long-context roleplay and memory of any model
Auth
express-session + bcrypt
Simple, no third-party dependency
Hosting
Railway
Already set up, zero-config PostgreSQL add-on

Five phases to a full product

Phase 1 01
Playable Prototype

Register, login, create a campaign and character, chat with the AI DM. Every message saves to the log.

Phase 2 02
Persistent World

NPCs, quests, locations, and plot hooks extracted from conversation and stored in structured tables.

Phase 3 03
Rules & Dice

Dice roller, skill checks, HP tracking, initiative, and combat mechanics woven into the narrative.

Phase 4 04
DM Control Panel

Pre-campaign settings for tone, difficulty, violence, and party size. The AI adapts its entire style.

Phase 5 — Product Version

Landing page with free trial · Account dashboard with saved campaigns · Export to PDF or plain text · Shareable read-only campaign recap links · Stripe subscription.

Follow the build

DMGoblin is being built in public. Watch it grow from prototype to product.