A custom character creator for DND 5.5 with homebrew options.
  • TypeScript 94.8%
  • Python 3.2%
  • HTML 1.7%
  • CSS 0.1%
Find a file
2026-10-03 11:07:50 +00:00
.forgejo/workflows Fix bugs, add security hardening, CI/CD, and theme system 2026-08-17 20:28:08 +02:00
.husky Fix issues #71-#91: security, UX, migration, and developer tooling 2026-08-18 03:01:47 +00:00
backend feat: enrich the monster catalog with harvesting tables 2026-10-03 09:34:45 +00:00
docs feat: enrich the monster catalog with harvesting tables 2026-10-03 09:34:45 +00:00
frontend feat: harvest defeated creatures into inventory (Phase 2) 2026-10-03 10:54:59 +00:00
mcp-server fix: resolve magic item attunement and surface the catalog in inventory search 2026-10-02 14:56:29 +00:00
shared feat: harvest defeated creatures into inventory (Phase 2) 2026-10-03 10:54:59 +00:00
wiki MCP: reach the MCP server by container name (dnd-mcp-server) 2026-08-28 20:33:12 +00:00
.dockerignore Fix .dockerignore: keep start-backend.sh in image (needed at runtime) 2026-07-27 17:17:55 +02:00
.gitignore Split backend route monolith into per-domain routers and gitignore docker-compose.yml 2026-08-06 18:19:41 +00:00
010_create_final_indexes Fix Issue #44: Creator permissions for adding characters to party 2026-08-07 16:56:26 +00:00
deploy.sh Harden Docker deployment: add .dockerignore, non-root backend, security headers, resource limits, disable sourcemaps 2026-07-27 16:38:47 +02:00
docker-compose-example.yml MCP: reach the MCP server by container name (dnd-mcp-server) 2026-08-28 20:33:12 +00:00
docker-compose-test.yml MCP: reach the MCP server by container name (dnd-mcp-server) 2026-08-28 20:33:12 +00:00
docker-compose.languagetool.yml LanguageTool writing assistance: self-hosted checker proxy, admin + per-user config, editor auto-check with draggable review panel and personal dictionary 2026-09-28 13:13:24 +00:00
docker-compose.override.example Add support for both embedded and external PostgreSQL databases 2026-08-06 08:28:16 +00:00
docker-compose.prod.yml Fix frontend TypeScript errors and docker-compose circular dependency 2026-08-06 17:35:34 +00:00
docker-nginx-example Issue #6: persist app data to PostgreSQL with storage engine 2026-08-07 13:39:34 +00:00
docker-supervisord-example Issue #6: persist app data to PostgreSQL with storage engine 2026-08-07 13:39:34 +00:00
Dockerfile Merge repo /wiki docs into the in-app Manual; randomize surnames for AI and auto-generated names 2026-09-25 14:50:16 +00:00
FINAL_SUMMARY.md Add final comprehensive summary 2026-08-05 06:05:51 +00:00
kill-services.sh feat: add dice rolling and action filtering to ActionsSection 2026-07-30 14:32:30 +00:00
LICENSE.md feat(lore): add World Anvil, web page, and Google Docs import sources 2026-08-04 11:54:32 +00:00
migrate_characters.sql Fix character data migration with proper data type mapping and foreign key checks 2026-08-10 15:16:10 +00:00
package-lock.json Fix issues #81-#88: performance monitoring, admin dashboard, service worker, bundle size 2026-08-23 08:02:15 +00:00
package.json Fix issues #71-#91: security, UX, migration, and developer tooling 2026-08-18 03:01:47 +00:00
POPULATE_FORGEJO_WIKI.md Add guide for populating Forgejo wiki 2026-08-05 06:05:13 +00:00
PROJECT_CLEANUP_PLAN.md Add comprehensive wiki documentation and project cleanup plan 2026-08-05 05:24:23 +00:00
QUICK_START.md Add quick start guide for wiki population 2026-08-05 06:06:23 +00:00
README.md Issue #4: Add comprehensive MCP data service tests and fix README 2026-08-05 13:58:58 +00:00
security.md Add user accounts, OAuth providers, character ownership/audit, party auth, and bug fixes 2026-07-28 14:47:44 +00:00
SECURITY.md Fix issues #71-#91: security, UX, migration, and developer tooling 2026-08-18 03:01:47 +00:00
start-backend.sh Issue #6: persist app data to PostgreSQL with storage engine 2026-08-07 13:39:34 +00:00
WIKI_POPULATION_SUMMARY.md Add comprehensive wiki documentation and project cleanup plan 2026-08-05 05:24:23 +00:00

D&D 5.5 Character Generator

A comprehensive D&D 5.5 character generator with homebrew content support.

Built with React, TypeScript, Express, and Vite as an npm workspaces monorepo.

Architecture

dnd-character-generator/
├── backend/          # Express API server (port 3001)
├── frontend/         # Vite + React SPA (port 3000)
├── shared/           # Shared TypeScript types, constants, utils
├── docker-compose.yml
├── Dockerfile        # Single container: nginx (frontend) + supervisord (backend)
├── docker-nginx.conf
└── docker-supervisord.conf
  • Production: Single Docker container. Nginx serves the built frontend; supervisord manages Nginx + the Express backend.
  • Development: npm run dev starts both backend (ts-node-dev) and frontend (Vite dev server) concurrently. Vite proxies /api to localhost:3001.

Quick Start

npm install          # installs all workspaces (backend, frontend, shared)
npm run dev          # starts backend + frontend concurrently

Testing

# Backend (Jest)
cd backend && npm test

# Frontend (Vitest)
cd frontend && npm test

Deployment

docker compose up -d --build

Environment is configured via docker-supervisord.conf (production) or backend/.env (development).

Find your default login with Owner permissions with this command: sudo docker compose exec dndgen-test cat /var/log/backend.log | grep -A4 "DEFAULT OWNER ACCOUNT"

!! This will appear only once so save it !!

API

All routes are under /api. See backend/src/routes/ for the full route tree. Key groups:

  • /api/dnd/* — Proxy to D&D 5.5 API (now using MCP server by default)
  • /api/mcp/* — MCP server integration endpoints
  • /api/homebrew/* — Custom homebrew CRUD
  • /api/characters/* — Character management
  • /api/combined/* — Merged official + homebrew data
  • /api/parties/* / /api/party/inventory/* — Party management
  • /api/settings — App settings
  • /api/auth/* — Login, register, OAuth
  • /api/users/* / /api/roles/* — User and role administration

MCP Integration (Issue #4)

The D&D Character Generator now includes a Model Context Protocol (MCP) server integration that enables:

  • Parallel querying of multiple D&D data sources simultaneously
  • Source redundancy with automatic fallback to alternative APIs
  • Unified data access through a single architecture
  • Performance optimization through caching and parallel requests

Key Features:

  • ✅ Multiple Source Support: Queries dnd5eapi.co, open5e.com, and legacy APIs in parallel
  • ✅ Automatic Fallback: Transparently falls back to direct API calls if MCP fails
  • ✅ Source Priority: Prioritizes official WotC data over community sources
  • ✅ Caching: Dual-layer caching (MCP server + backend) for optimal performance
  • ✅ Source Attribution: All data includes _source field for transparency
  • ✅ 100% Backward Compatible: Existing /api/dnd/* endpoints work unchanged

MCP Endpoints:

  • GET /api/mcp/config — Get MCP configuration and server endpoint
  • GET /api/mcp/status — Check MCP service status
  • GET /api/mcp/sources — List all configured D&D data sources
  • GET /api/mcp/sources/health — Check health of D&D data sources
  • POST /api/mcp/cache/clear — Clear MCP server cache

Configuration:

MCP can be configured through environment variables:

# Enable/disable MCP
MCP_DATA_ENABLED=true

# Fallback to direct API if MCP fails
MCP_FALLBACK_TO_DIRECT=true

# MCP-specific caching
MCP_CACHE_ENABLED=true
MCP_CACHE_TTL=3600

In Docker, the MCP server is automatically included and configured in docker-compose.yml.