Phase 3.1: Enhanced Chore Logging and Reporting System

This commit is contained in:
2026-02-05 12:33:51 +11:00
commit e3cae7bfbb
178 changed files with 30105 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
"""Application configuration."""
from pydantic_settings import BaseSettings
from typing import List
class Settings(BaseSettings):
"""Application settings."""
APP_NAME: str = "Family Hub"
APP_VERSION: str = "0.1.0"
DEBUG: bool = True
# Database
DATABASE_URL: str = "sqlite:///./data/family_hub.db"
# Security
SECRET_KEY: str = "your-secret-key-change-this-in-production"
ALGORITHM: str = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
# CORS - Allow all origins for development (network access)
# In production, set this to specific domains in .env file
ALLOWED_ORIGINS: str = "*"
# Environment
ENVIRONMENT: str = "development"
class Config:
env_file = ".env"
case_sensitive = True
@property
def cors_origins(self) -> List[str]:
"""Parse ALLOWED_ORIGINS into a list."""
# Allow all origins if set to "*"
if self.ALLOWED_ORIGINS == "*":
return ["*"]
if isinstance(self.ALLOWED_ORIGINS, str):
return [origin.strip() for origin in self.ALLOWED_ORIGINS.split(',')]
return self.ALLOWED_ORIGINS
settings = Settings()