- Python 48.7%
- TypeScript 48.1%
- CSS 3%
- Dockerfile 0.1%
Full-stack VTT for running TTRPG campaigns from any system ingested from a rulebook PDF. - backend/: FastAPI (REST + WebSockets) with local + OIDC auth, a system-agnostic character computation engine (safe ast-whitelist formula evaluator + sheet builder), campaign/scene/encounter state, Claude chat with DM and player tool sets, and ComfyUI image generation. Worker polls a jobs table for PDF ruleset ingestion and image generation. Ships an SRD-subset seed ruleset. - frontend/: React 18 + Vite + TypeScript SPA -- dashboard, admin, ruleset browser, campaign DM/player views, character builder, level-up flow, character sheet, and a layered Canvas2D tabletop with raycast vision/lighting and turn-based movement. - docker-compose.yml: postgres + backend + worker + frontend (nginx). No app env vars; all runtime config lives in the settings table and is edited in the Admin UI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| backend | ||
| frontend | ||
| .gitignore | ||
| CLAUDE.md | ||
| docker-compose.yml | ||
| README.md | ||
UltimateTableTop
A self-hosted virtual tabletop for any TTRPG system. DMs build campaigns with an AI co-writer; players build characters with gated, fully-readable choices and play on a shared grid map with real lighting, vision, and turn-based movement.
Quick start
docker compose up -d --build
Open http://localhost:8080 — the first visit asks you to set the password
for the built-in Admin account. Then go to Admin to add your Anthropic
API key (for the Claude co-writer and PDF rulebook ingestion) and your
ComfyUI URL (for AI image generation). Both are stored in Postgres and
editable any time; nothing lives in environment variables.
A starter D&D 5e (SRD subset) ruleset is bundled: Fighter / Rogue / Wizard / Cleric through level 5, four species, backgrounds, gear, spells with full text, and a few monsters — enough to play immediately. Expand it (or build Pathfinder or anything else) by uploading rulebook PDFs on the Rulesets page: Claude extracts classes, spells, feats, items, and monsters with complete rules text, never summaries, and merges them into the ruleset.
What's inside
- DM: campaigns with quests, NPCs, monsters, places (private or shared), invite codes, a Claude chat that saves what it creates directly into the campaign, grid scenes with walls/doors/lights, encounters with initiative, an adventure log, and private messages to players.
- Players: join by code, build characters step-by-step (standard array / point buy / server-side rolls / manual), every spell and feature readable in full before choosing, a computed D&D-Beyond-style sheet, AI portraits via ComfyUI, and the shared tabletop — fog of war from your token's vision, darkvision, light sources, doors you can open, and enforced movement speed on your turn.
- Multi-system: rules are data. A ruleset's JSON config defines
abilities, skills, formulas, and tables; entities carry structured
effectsthe sheet engine applies. Upload a PDF to grow any ruleset.
Services
| container | job |
|---|---|
frontend |
React SPA behind nginx (port 8080), proxies /api + /ws |
backend |
FastAPI — REST, WebSockets, auth (local + OIDC), sheet engine |
worker |
PDF → ruleset ingestion and ComfyUI image jobs |
db |
Postgres 16 |
Rebuild one part without the rest: docker compose up -d --build backend.
See CLAUDE.md for architecture details.