f37dc9fa76
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>
26 lines
446 B
Python
26 lines
446 B
Python
import uuid
|
|
from datetime import datetime
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class CharacterRead(BaseModel):
|
|
id: uuid.UUID
|
|
owner_id: uuid.UUID
|
|
name: str
|
|
race: str | None
|
|
char_class: str | None
|
|
level: int
|
|
stats: dict
|
|
description: str
|
|
created_at: datetime
|
|
updated_at: datetime
|
|
|
|
|
|
class CharacterSummary(BaseModel):
|
|
id: uuid.UUID
|
|
name: str
|
|
race: str | None
|
|
char_class: str | None
|
|
level: int
|