feat: scaffold FastAPI backend with ports-and-adapters layout
This commit is contained in:
parent
eee8195662
commit
c6a737db96
16 changed files with 685 additions and 0 deletions
23
backend/app/config.py
Normal file
23
backend/app/config.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
"""Typed application settings: the only reader of environment variables."""
|
||||
|
||||
from enum import StrEnum
|
||||
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class AppMode(StrEnum):
|
||||
"""Runtime mode: live Spotify + Anthropic, or fixture-replay demo."""
|
||||
|
||||
LIVE = "live"
|
||||
DEMO = "demo"
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Application settings, loaded from the environment or a .env file."""
|
||||
|
||||
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
||||
|
||||
app_mode: AppMode = AppMode.DEMO
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Loading…
Add table
Add a link
Reference in a new issue