Silos/backend/app/config.py
AnuragJangid18 809235e962 feat: implement comments and activity panel in workspace
- Added CommentsPanel component for managing comments on documents.
- Integrated comment creation, deletion, and resolution functionalities.
- Implemented activity tracking for document interactions.
- Enhanced SketchPage with editing and saving capabilities.
- Introduced template management API endpoints for creating, sharing, and deleting templates.
- Added runtime validation report for frontend and backend.
- Created GettingStartedPanel for user onboarding with template options.
- Implemented Playwright E2E tests for accessibility and export functionality.
2026-10-22 21:18:10 +05:30

35 lines
1.1 KiB
Python

from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
app_name: str = "Silos API"
debug: bool = True
# SQLite by default for local dev; switch to PostgreSQL in production
database_url: str = "sqlite:///./silos.db"
mongodb_url: str = "mongodb://localhost:27017"
mongodb_db: str = "silos"
secret_key: str = "change-this-to-a-long-random-secret-key-in-production"
access_token_expire_minutes: int = 60
refresh_token_expire_days: int = 7
cors_origins: str = "http://localhost:5173,http://127.0.0.1:5173"
frontend_url: str = "http://localhost:5173"
google_client_id: str = ""
google_client_secret: str = ""
google_redirect_uri: str = "http://localhost:8000/api/v1/auth/google/callback"
@property
def is_sqlite(self) -> bool:
return self.database_url.startswith("sqlite")
@property
def cors_origin_list(self) -> list[str]:
return [origin.strip() for origin in self.cors_origins.split(",") if origin.strip()]
settings = Settings()