from pathlib import Path from typing import ClassVar, List from pydantic_settings import BaseSettings class Settings(BaseSettings): API_V1_STR: str = "/api/v1" PROJECT_NAME: str = "E-Commerce API" # Security SECRET_KEY: str = "supersecretkey" # In production, use a secure random string ALGORITHM: str = "HS256" ACCESS_TOKEN_EXPIRE_MINUTES: int = 30 # CORS CORS_ORIGINS: List[str] = ["http://localhost:3000", "http://localhost:8000"] # Database DB_DIR: ClassVar[Path] = Path("/app/storage/db") DB_DIR.mkdir(parents=True, exist_ok=True) SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite" class Config: case_sensitive = True settings = Settings()