from pydantic_settings import BaseSettings, SettingsConfigDict from functools import lru_cache class Settings(BaseSettings): # Google OAuth google_client_id: str = "" google_client_secret: str = "" # JWT jwt_secret: str = "supersecretchangeme" jwt_algorithm: str = "HS256" jwt_expire_hours: int = 168 # 7 days # MongoDB mongodb_uri: str = "mongodb://localhost:27017" mongodb_db: str = "hireai" # Gemini gemini_api_key: str = "" # URLs frontend_url: str = "http://localhost:5173" backend_url: str = "http://localhost:8000" # Email mail_username: str = "" mail_password: str = "" mail_from: str = "" mail_server: str = "smtp.gmail.com" mail_port: int = 587 mail_tls: bool = True mail_ssl: bool = False model_config = SettingsConfigDict(env_file=".env", extra="ignore") @lru_cache def get_settings() -> Settings: return Settings()