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:
@@ -0,0 +1,26 @@
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
||||
|
||||
database_url: str = "postgresql+asyncpg://dnd:changeme@postgres:5432/dnd"
|
||||
|
||||
xai_api_key: str = ""
|
||||
xai_base_url: str = "https://api.x.ai/v1"
|
||||
dm_model: str = "grok-4.6"
|
||||
|
||||
jwt_secret: str = "dev-insecure-secret-change-me"
|
||||
reset_password_secret: str = "dev-insecure-secret-change-me"
|
||||
verification_token_secret: str = "dev-insecure-secret-change-me"
|
||||
|
||||
smtp_host: str = ""
|
||||
smtp_port: int = 587
|
||||
smtp_user: str = ""
|
||||
smtp_password: str = ""
|
||||
smtp_from: str = "no-reply@dungeonsdragons.tstratmann.de"
|
||||
|
||||
frontend_origin: str = "http://localhost:5173"
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user