from pydantic_settings import BaseSettings class Settings(BaseSettings): """OSS settings — stateless deployment. Auth, DB, OAuth, billing, mail relay etc. moved to the velxio-prod private overlay during the Phase 1-4 OSS/pro split. The overlay physically replaces this file at Docker build time with a richer Settings class that ADDS those fields on top of FRONTEND_URL (see pro/backend/app/core/config.py). Adding a setting here means the stateless OSS image will read it. If the new setting only makes sense with an auth/DB stack (e.g. SMTP creds, third-party API keys for analytics), add it to the overlay's config.py instead so the OSS image stays minimal. """ # CORS — used by main.py to whitelist the SPA origin during local dev # and to build redirect URLs from auth routes in the overlay. FRONTEND_URL: str = "http://localhost:5173" # extra="ignore": tolerate legacy keys (DATA_DIR, SECRET_KEY, DATABASE_URL, …) # left over from pre-split .env files or from the velxio-prod overlay so the # OSS image starts cleanly instead of crashing with extra_forbidden. model_config = { "env_file": ".env", "env_file_encoding": "utf-8", "extra": "ignore", } settings = Settings()