from pydantic_settings import BaseSettings, SettingsConfigDict


class Settings(BaseSettings):
    model_config = SettingsConfigDict(env_file=".env", extra="ignore")

    # Django backend URL
    BACKEND_URL: str = "http://localhost:8000"

    # CORS — the Next.js frontend
    FRONTEND_ORIGIN: str = "http://localhost:3000"

    # Rate limiting (per IP, per minute)
    RATE_LIMIT_PER_MINUTE: int = 120

    # Secret to authenticate backend calls
    INTERNAL_API_SECRET: str = "change-me"


settings = Settings()
