LMS / Course System: - Course → Module → Lesson hierarchy (any user can create) - Lesson types: text, video (Vimeo/YouTube/local), document, quiz, live_session - Video provider auto-detection from URL - BBB API integration (create/join meetings) with env config - Course enrollment with per-lesson progress tracking - AI content generation/refinement for text lessons - Draft/published/archived status workflow - Subscription gate placeholder (requires_subscription flag) - Thumbnail upload support - Module/lesson reorder with up/down controls User Quiz Creation: - Any user can create quizzes from question bank (was moderator-only) - User quizzes: is_published=0, is_shared=0 (private by default) - Fixed section_id fallback: None instead of hardcoded 1 Manual Question Creation: - POST /questions/create endpoint for manual MCQ entry - CreateQuestionModal on QuestionBankPage with options, radio for correct answer - Auto-generates embedding on creation Frontend: - CoursesPage: Browse/My Courses/Created tabs with search and pagination - CourseDetailPage: Student view with module accordion, lesson viewer, progress - CourseEditorPage: Full course builder with AI generate, question bank browser - Courses link in Navbar - Create Question button on Question Bank (available to all users) Backend: - 5 new tables: courses, course_modules, course_lessons, course_enrollments, course_lesson_progress - Course model + schemas + router (22 endpoints) - BBB_SERVER_URL + BBB_SECRET config - Updated CLAUDE.md with LMS documentation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
48 lines
1.5 KiB
Python
48 lines
1.5 KiB
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 = ""
|
|
LITELLM_API_BASE: str = ""
|
|
LITELLM_EMBEDDING_MODEL: str = ""
|
|
OPENAI_API_KEY: str = ""
|
|
ELEVENLABS_API_KEY: str = ""
|
|
GOOGLE_TTS_API_KEY: str = ""
|
|
AWS_ACCESS_KEY_ID: str = ""
|
|
AWS_SECRET_ACCESS_KEY: str = ""
|
|
AWS_REGION: str = "us-east-1"
|
|
AWS_BEDROCK_REGION: str = "us-east-1"
|
|
EMBEDDING_DIMENSIONS: int = 1024
|
|
APP_URL: str = "https://quiz.danvics.com"
|
|
|
|
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
|
|
|
|
TURNSTILE_SECRET_KEY: str = "" # Cloudflare Turnstile — leave blank to disable captcha
|
|
ADMIN_EMAIL: str = "" # Where contact form submissions are emailed
|
|
|
|
BBB_SERVER_URL: str = "" # BigBlueButton server URL (e.g. https://bbb.example.com/bigbluebutton)
|
|
BBB_SECRET: str = "" # BigBlueButton shared secret
|
|
|
|
|
|
settings = Settings()
|