dvirlabs ad96ec33e6
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fix product filters and add admin password reset feature
- Fix: Product filters now properly send only non-empty values to backend
- Fix: Brand/gender/model filters now work correctly
- Add: FORCE_ADMIN_PASSWORD_RESET flag for resetting admin password on deployment
- Add: ADMIN_PASSWORD_RESET.md guide with instructions
- Update: Admin password reset logic with clear console messages
2026-05-11 08:04:19 +03:00

31 lines
972 B
Python

from pydantic_settings import BaseSettings
from pathlib import Path
class Settings(BaseSettings):
database_url: str
jwt_secret_key: str
jwt_algorithm: str = "HS256"
access_token_expire_minutes: int = 30
frontend_url: str = "http://localhost:5173"
backend_url: str = "http://localhost:8000"
# Admin user credentials (created on first startup)
admin_email: str = "admin@brandmaster.com"
admin_password: str = "Admin123!" # Change via ADMIN_PASSWORD env var
admin_full_name: str = "System Administrator"
force_admin_password_reset: bool = False # Set to True to reset admin password on every startup
# Email configuration for password reset
smtp_host: str = "smtp.gmail.com"
smtp_port: int = 587
smtp_username: str = ""
smtp_password: str = ""
smtp_from: str = "noreply@brand-master.com"
class Config:
env_file = str(Path(__file__).parent.parent / ".env")
settings = Settings()