Add Phase 1 MVP: D&D text-adventure server

FastAPI + Postgres backend with fastapi-users auth, games/characters
CRUD, and a WebSocket chat endpoint where an x.ai Grok DM narrates
play, rolls dice, and maintains character sheets via tool calls.
React + Tailwind frontend covers registration/login, game list and
creation, participation-code join flow, character viewer, and a
real-time chat session view. Docker Compose skeleton (Postgres +
backend) included; Caddy/frontend container wiring is deferred to
the deploy milestone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Thorsten
2026-08-31 18:43:08 +02:00
commit f37dc9fa76
75 changed files with 106988 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
import { Link } from "react-router-dom";
import { Game } from "../api/games";
export default function GameCard({ game }: { game: Game }) {
const created = new Date(game.created_at).toLocaleString("de-DE");
return (
<Link
to={`/games/${game.id}`}
className="block rounded-lg border border-slate-800 bg-slate-900 p-4 hover:border-amber-500"
>
<div className="flex items-start justify-between gap-4">
<h2 className="text-lg font-semibold text-slate-100">{game.name}</h2>
{game.participation_code && (
<span className="shrink-0 rounded bg-amber-500/20 px-2 py-1 font-mono text-xs text-amber-300">
Code: {game.participation_code}
</span>
)}
</div>
<p className="mt-1 text-sm text-slate-400">{game.description}</p>
<div className="mt-3 flex flex-wrap gap-x-4 gap-y-1 text-xs text-slate-500">
<span>Erstellt: {created}</span>
<span>Von: {game.creator_name}</span>
<span>
{game.player_count} Spieler
{game.player_names.length > 0 && `: ${game.player_names.join(", ")}`}
</span>
</div>
</Link>
);
}