"""Fractafrag API — Application configuration.""" from pydantic_settings import BaseSettings from functools import lru_cache class Settings(BaseSettings): """Application settings loaded from environment variables.""" # ── Database ────────────────────────────────────────────── database_url: str = "postgresql+asyncpg://fracta:changeme@postgres:5432/fractafrag" database_url_sync: str = "postgresql://fracta:changeme@postgres:5432/fractafrag" # ── Redis ───────────────────────────────────────────────── redis_url: str = "redis://redis:6379/0" # ── JWT ─────────────────────────────────────────────────── jwt_secret: str = "changeme" jwt_algorithm: str = "HS256" jwt_access_token_expire_minutes: int = 15 jwt_refresh_token_expire_days: int = 30 # ── Cloudflare Turnstile ────────────────────────────────── turnstile_secret: str = "" # ── Stripe ──────────────────────────────────────────────── stripe_secret_key: str = "" stripe_webhook_secret: str = "" # ── Renderer ────────────────────────────────────────────── renderer_url: str = "http://renderer:3100" # ── BYOK Encryption ────────────────────────────────────── byok_master_key: str = "changeme" # ── AI Providers ────────────────────────────────────────── anthropic_api_key: str = "" openai_api_key: str = "" class Config: env_file = ".env" case_sensitive = False @lru_cache def get_settings() -> Settings: return Settings()