pdf-quiz-generator/docs
Daniel 532d613393 feat: question folders, per-section notes, and two feedback paths
Four things that share a spine, so they arrive together.

**Folders.** A hand-picked set of questions, and the fourth thing a grant can
name beside exam, discipline and category. Deliberately not `user_collections`
with a sharing flag: a library is a consequence of access — you save what you
can already see — while a folder is a source of it, and one table holding
thousands of private lists beside a handful that confer permission is one
mistake away from a leak. Built from the question manager, granted on /access.
Membership stays with the owner and moderators so a grantee cannot widen their
own reach, and deleting a folder takes its grants with it.

Two live constraints had to be rewritten to accept it: `ck_grant_has_a_dimension`
and `uq_grant_dimensions` both predate `folder_id`, so a folder-only grant
failed the check and two folder grants collided on the unique index.

**Per-question feedback.** The learner's half already existed. What was wrong
was who could read it: any grant at all let an educator list and delete reports
about the whole bank. Reports are now scoped by `question_scope_predicate`, the
same predicate that decides which questions that educator can see, and a reply
thread makes the report a conversation the learner can follow rather than a
form that swallows what they said.

**Per-section notes and article feedback.** Two tables on purpose:
`article_section_notes` is private to whoever wrote it, `article_feedback` goes
to whoever maintains the article. Both point at the section id inside
`articles.sections` rather than at `article_section_index`, whose rows are
dropped on unpublish — a cascade from there would delete a learner's writing
because an educator took an article down for an afternoon. A rename keeps a
note attached; a deleted section leaves it marked orphaned under the heading it
was written on, for its writer alone to remove.

The header's feedback badge covers both, because questions and reading are the
same job to whoever is doing it.

Migration i9f0a1b2c3d4. 556 backend and 572 frontend tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
2026-09-12 18:37:43 +02:00
..
quiz-revamp feat: authorize tutor context and protect uploaded media 2026-09-07 15:04:00 +02:00
adaptive-sessions.md feat: a session prepared for you, and a model that can see when the one on the job cannot 2026-09-12 15:46:04 +02:00
api-reference.md feat: Cap replaces hCaptcha, self-hosted beside the app 2026-09-12 06:14:14 +02:00
architecture.md feat: Cap replaces hCaptcha, self-hosted beside the app 2026-09-12 06:14:14 +02:00
deployment.md feat: Cap replaces hCaptcha, self-hosted beside the app 2026-09-12 06:14:14 +02:00
frontend.md feat: Cap replaces hCaptcha, self-hosted beside the app 2026-09-12 06:14:14 +02:00
migrations.md fix: gateway-agnostic URL handling for TTS and embeddings, docs cleanup 2026-04-19 02:17:35 +02:00
quiz-revamp-plan.md docs: sync backlog with what shipped today 2026-09-09 20:11:20 +02:00
quiz-revamp-progress.md feat: Cap replaces hCaptcha, self-hosted beside the app 2026-09-12 06:14:14 +02:00
README.md feat: a solid highlight, a five-minute warning, and the adaptive algorithm 2026-09-12 05:47:30 +02:00
reranking.md feat: rerank what a learner is shown, with Cohere through the proxy 2026-09-12 18:23:06 +02:00
retrieval-thresholds.md feat: rerank what a learner is shown, with Cohere through the proxy 2026-09-12 18:23:06 +02:00
services.md Improve quiz TTS and Android release build 2026-05-12 01:01:01 +02:00
study-recommendations.md fix: leaving and resuming take one press; session actions sit with the result 2026-09-11 23:03:09 +02:00
tied-conditions.md content: every article has a high-yield view, and three ties that were not ties 2026-09-12 18:16:59 +02:00
TODO.md feat: question folders, per-section notes, and two feedback paths 2026-09-12 18:37:43 +02:00

PedsHub Documentation

Deep technical documentation for the PedsHub pediatric learning platform.

Pages

Document Description
Architecture System overview, database schema, multi-worker setup, vector search, auth, rate limiting, concurrent quiz protection
API Reference Every endpoint: method, path, auth, request/response, notes
Services Backend service layer: AI extraction, embedding, vector search, PDF processing, email, reminders
Frontend React app structure, pages, components, state patterns, runtime config
Deployment Docker setup, environment variables, HTTPS, rebuilding, monitoring, troubleshooting, scaling
Adaptive sessions What the Adaptive toggle selects, where the code is, and what it deliberately ignores
Study recommendations How focus areas are ranked and what readiness means