An AI-powered Dungeons & Dragons 5th Edition game where Claude acts as the Dungeon Master.
- Full character creation (race, class, ability scores) with randomize option
- D&D 5e mechanics (dice rolls, AC, spell slots, combat, loot)
- AI DM generates narrative, enemies, and story dynamically
- Character sheet sidebar with live HP, inventory, combat log
- Open-ended — play as long as you want
git init
git add .
git commit -m "D&D AI DM"
git remote add origin https://github.com/YOUR_USER/dnd-ai-dm.git
git push -u origin main- Go to https://dashboard.render.com
- Click New → Web Service
- Connect your GitHub repo
- Settings:
- Runtime: Node
- Build Command:
npm install - Start Command:
npm start - Instance Type: Free (or Starter for better performance)
In Render dashboard → Environment:
- Key:
ANTHROPIC_API_KEY - Value: Your Anthropic API key (get one at https://console.anthropic.com)
Click Deploy. Your game will be live at https://your-service.onrender.com
Uses Claude Haiku 4.5 — the most cost-effective model:
- ~$0.001 per game turn (input ~500 tokens + output ~400 tokens)
- A full 2-hour session (~60 turns) costs about $0.06
- Rate limited to 15 requests/minute per IP
export ANTHROPIC_API_KEY=your_key_here
npm install
npm start
# Open http://localhost:3000- Backend: Node.js + Express (API proxy, rate limiting)
- Frontend: Vanilla JS (no framework, single HTML file)
- AI: Claude Haiku 4.5 via Anthropic API
- Styling: CSS with Cinzel + EB Garamond fonts