from pydantic_settings import BaseSettings from functools import lru_cache class Settings(BaseSettings): # Database database_url: str = "postgresql://user:password@localhost:5432/teamchat" test_database_url: str = "postgresql://user:password@localhost:5432/teamchat_test" # JWT secret_key: str = "your-secret-key-change-this" algorithm: str = "HS256" access_token_expire_minutes: int = 30 # File Upload upload_dir: str = "./uploads" max_upload_size: int = 20 * 1024 * 1024 # 20 MB # CORS frontend_url: str = "http://localhost:5173" class Config: env_file = ".env" @lru_cache() def get_settings(): return Settings()