Spaces:
Paused
Paused
| from pydantic_settings import BaseSettings | |
| from typing import ClassVar | |
| class Settings(BaseSettings): | |
| API_V1_STR: str = "/api/v1" | |
| PROJECT_NAME: str = "Admin Dashboard" | |
| VERSION: str = "1.0.0" | |
| # Service Authentication | |
| SERVICE_TOKEN: str | |
| POS_API_URL: str | |
| POS_API_KEY: str | |
| POS_API_VERSION: str | |
| # PostgreSQL Database settings | |
| DATABASE_URL: str | |
| # JWT Settings | |
| SECRET_KEY: str = "your-secret-key-here" | |
| ALGORITHM: str = "HS256" | |
| ACCESS_TOKEN_EXPIRE_MINUTES: int = 30 | |
| # Redis settings | |
| REDIS_HOST: str | |
| REDIS_PORT: int | |
| REDIS_PASSWORD: str | |
| REDIS_USERNAME: str = "default" | |
| def REDIS_URL(self) -> str: | |
| if self.REDIS_PASSWORD: | |
| return f"redis://{self.REDIS_USERNAME}:{self.REDIS_PASSWORD}@{self.REDIS_HOST}:{self.REDIS_PORT}" | |
| return f"redis://{self.REDIS_HOST}:{self.REDIS_PORT}" | |
| # Email settings | |
| MAIL_USERNAME: str = "yungdml31@gmail.com" | |
| MAIL_PASSWORD: str = "" | |
| MAIL_FROM: str = "admin@angelo.com" | |
| MAIL_PORT: int = 587 | |
| MAIL_SERVER: str = "smtp.gmail.com" | |
| # Frontend URL | |
| FRONTEND_URL: str = "http://localhost:3000" | |
| class Config: | |
| case_sensitive = True | |
| env_file = ".env" | |
| extra = "allow" | |
| settings = Settings() | |