Files
rehearshalhub/api/src/rehearsalhub/config.py
Mistral Vibe d9035acdff feat: app shell with sidebar + bug fixes
UI:
- Add persistent sidebar (210px) with band switcher dropdown, Library/Player/Settings nav, user avatar row, and sign-out button
- Align design system CSS vars to CLAUDE.md spec (#0f0f12 bg, #e8a22a amber accent, rgba borders/text)
- Remove light mode toggle (no light mode in v1)
- Homepage auto-redirects to first band; shows create-band form only when no bands exist
- Strip full-page wrappers from all pages (shell owns layout)
- Remove debug console.log statements from SongPage

Bug fixes:
- nginx: trailing slash on `location ^~ /api/v1/bands/` caused 301 redirect on POST, dropping the request body — removed trailing slash
- API: _member_from_request (used by nc-scan stream) only accepted Bearer token, not httpOnly cookie — add rh_token cookie fallback
- API: internal_secret config field now has a dev default so the service starts without INTERNAL_SECRET env var set

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 09:43:47 +02:00

32 lines
828 B
Python

from functools import lru_cache
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
# Security
secret_key: str
internal_secret: str = "dev-change-me-in-production" # Shared secret for internal service-to-service calls
jwt_algorithm: str = "HS256"
access_token_expire_minutes: int = 60 # 1 hour
# Database
database_url: str # postgresql+asyncpg://...
# Redis
redis_url: str = "redis://localhost:6379/0"
job_queue_key: str = "rh:jobs"
# App
domain: str = "localhost"
debug: bool = False
# Worker
analysis_version: str = "1.0.0"
@lru_cache
def get_settings() -> Settings:
return Settings() # type: ignore[call-arg]