from functools import lru_cache from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): model_config = SettingsConfigDict(env_file=".env", extra="ignore") # Supabase SUPABASE_URL: str = "" SUPABASE_ANON_KEY: str = "" SUPABASE_SERVICE_ROLE_KEY: str = "" SUPABASE_JWT_SECRET: str = "" DATABASE_URL: str = "" # Stripe STRIPE_SECRET_KEY: str = "" STRIPE_WEBHOOK_SECRET: str = "" STRIPE_CURRENCY: str = "eur" # App APP_ENV: str = "development" CORS_ORIGINS: list[str] = ["http://localhost:3000", "http://localhost:5173"] BUSINESS_TIMEZONE: str = "Europe/Berlin" BUSINESS_NAME: str = "Bado Hair" # Email SMTP_HOST: str = "" SMTP_PORT: int = 587 SMTP_USER: str = "" SMTP_PASSWORD: str = "" EMAIL_FROM: str = "" @property def is_production(self) -> bool: return self.APP_ENV == "production" @lru_cache def get_settings() -> Settings: return Settings()