| from pydantic_settings import BaseSettings |
| from typing import List |
|
|
|
|
| class Settings(BaseSettings): |
| """Application settings loaded from environment variables.""" |
|
|
| |
| DATABASE_URL: str |
|
|
| |
| JWT_SECRET: str |
| JWT_ALGORITHM: str = "HS256" |
| JWT_EXPIRATION_HOURS: int = 168 |
|
|
| |
| BETTER_AUTH_SECRET: str |
|
|
| |
| CORS_ORIGINS: str = "http://localhost:3000" |
|
|
| |
| OPENAI_API_KEY: str |
| OPENAI_MODEL: str = "gpt-4o-mini" |
| OPENAI_BASE_URL: str = "" |
|
|
| |
| MCP_SERVER_PORT: int = 8001 |
| MCP_SERVER_HOST: str = "localhost" |
|
|
| |
| ENVIRONMENT: str = "development" |
| DEBUG: bool = True |
|
|
| @property |
| def cors_origins_list(self) -> List[str]: |
| """Parse CORS_ORIGINS string into list.""" |
| return [origin.strip() for origin in self.CORS_ORIGINS.split(",")] |
|
|
| class Config: |
| env_file = ".env" |
| case_sensitive = True |
|
|
|
|
| |
| settings = Settings() |
|
|