- FastAPI backend with JWT auth, roles (admin/moderator/user) - PDF upload (up to 500MB) with streaming, PyMuPDF text extraction - ChromaDB vectorization per page with metadata - LiteLLM AI question extraction from PDF (not generation) - Image extraction from PDF pages, graceful fallback - Quiz modes: timed (countdown timer) + learning (answers shown inline) - Page-by-page question navigation with dot navigator - TTS endpoint using LiteLLM (Google Vertex / OpenAI voices) - Admin dashboard: AI model management per task, user role management - Moderator role: upload PDFs, create sections, generate quizzes - Spaced repetition reminders via SMTP email (SM-2 intervals) - APScheduler daily reminder jobs - Celery + Redis for background PDF processing - React frontend with all pages - Docker Compose deployment (nginx + backend + celery + redis) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
31 lines
836 B
Python
31 lines
836 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
DATABASE_URL: str = "sqlite:///./quiz.db"
|
|
SECRET_KEY: str = "change-me-to-a-random-secret-key-in-production"
|
|
ALGORITHM: str = "HS256"
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 1440
|
|
|
|
REDIS_URL: str = "redis://localhost:6379/0"
|
|
|
|
LITELLM_MODEL: str = "gpt-4o-mini"
|
|
LITELLM_API_KEY: str = ""
|
|
|
|
CHROMA_PERSIST_DIR: str = "./chroma_data"
|
|
|
|
MAIL_USERNAME: str = ""
|
|
MAIL_PASSWORD: str = ""
|
|
MAIL_FROM: str = ""
|
|
MAIL_PORT: int = 587
|
|
MAIL_SERVER: str = "smtp.gmail.com"
|
|
MAIL_STARTTLS: bool = True
|
|
MAIL_SSL_TLS: bool = False
|
|
|
|
UPLOAD_DIR: str = "./uploads"
|
|
MAX_UPLOAD_SIZE: int = 524288000 # 500MB
|
|
|
|
|
|
settings = Settings()
|