pdf-quiz-generator/backend/app
Daniel 4c48a5cf94 Security hardening, async TeachChat, rate limit UX, unthrottle
Security:
- admin.py: move api_key from URL query params to POST body (litellm/models, tts/voices) — prevents key logging
- admin.py: sanitize exception messages in voice discovery — log internally, return generic errors
- teach.py: log LLM errors server-side, show friendly message to user
- nextcloud.py: normalize path with posixpath.normpath to prevent ../ traversal
- auth.py: check_rate_limit now accepts user param — admins/moderators/unthrottled always exempt

Performance:
- teach.py: make /chat endpoint async, use litellm.acompletion() — no longer blocks a uvicorn thread per request

Features:
- users: add is_unthrottled column (DB migration in setup_pgvector)
- admin.py: PUT /users/{id}/unthrottle endpoint
- AdminPage.jsx: Unlimited/Throttle toggle button per user, shows "unlimited" badge
- Rate limit messages improved with user-friendly context

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 01:09:42 +02:00
..
models Security hardening, async TeachChat, rate limit UX, unthrottle 2026-04-04 01:09:42 +02:00
routers Security hardening, async TeachChat, rate limit UX, unthrottle 2026-04-04 01:09:42 +02:00
schemas Security hardening, async TeachChat, rate limit UX, unthrottle 2026-04-04 01:09:42 +02:00
services Add switchable embedding model, Polly toggle, job cancellation, and UI fixes 2026-04-03 20:44:11 +02:00
tasks TeachChat: model selector, proxy routing fix, titan seed cleanup 2026-04-04 00:37:35 +02:00
utils Security hardening, async TeachChat, rate limit UX, unthrottle 2026-04-04 01:09:42 +02:00
__init__.py Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
config.py Major platform update: pgvector search, multi-provider TTS, settings page, CLI 2026-03-31 18:03:10 +02:00
database.py Major platform update: pgvector search, multi-provider TTS, settings page, CLI 2026-03-31 18:03:10 +02:00
main.py Security hardening, async TeachChat, rate limit UX, unthrottle 2026-04-04 01:09:42 +02:00