pdf-quiz-generator/docs
Daniel 8a07703ee2 feat: study plans you can open, work through, and edit
Thirteen plans were seeded with an API to serve them and nothing that called it,
so the whole feature existed only in the database. Two pages and the editing
endpoints it was missing.

/study-plans lists the plans with progress stated in blocks — "3 of 6 blocks"
is something you can act on, where "50%" only tells you how you feel about it.
/study-plans/:id is one plan: each block shows Articles, then Sessions, in that
order, because that is the order the block is meant to be done in.

Reading is now part of a block (migration f4a5b6c7d8e9). "Mark as read" is the
learner's own claim and reversible — someone who ticks the wrong row should be
able to fix it without an educator, and progress nobody can correct stops being
trusted and then stops being used. It is a separate table from `article_views`
on purpose: opening an article is not the same claim as having finished with it.
A draft article attached to a block is listed for the educator who can open it
and left out for everyone else, rather than offered as a dead link.

Editing is inline on the learner's own page rather than a separate builder, so
the thing being changed and the thing a learner sees are the same object.
Moderators create (as a draft — an empty plan is not something to put in front
of anyone), rename, publish, delete; add, rename, reorder and remove blocks;
move questions between blocks of one plan; attach reading found by searching
rather than by id.

Two places where the obvious implementation leaves the data wrong, both tested:
deleting a block out of the middle shuffles the survivors down, or the next
insert collides with a position nothing occupies; and reordering parks every row
outside the range before writing the real positions, because (plan_id, position)
is unique and the first move would otherwise collide with a position still held.
A partial order is refused rather than half-applied.

166 backend, 188 frontend green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeFQJXJTfHKTfbfsdxv57Z
2026-09-10 12:10:39 +02:00
..
quiz-revamp feat: authorize tutor context and protect uploaded media 2026-09-07 15:04:00 +02:00
api-reference.md Improve quiz TTS and Android release build 2026-05-12 01:01:01 +02:00
architecture.md Tag filtering, multi-category, bug fixes, image validation, docs 2026-04-04 22:48:26 +02:00
deployment.md fix: gateway-agnostic URL handling for TTS and embeddings, docs cleanup 2026-04-19 02:17:35 +02:00
frontend.md fix: gateway-agnostic URL handling for TTS and embeddings, docs cleanup 2026-04-19 02:17:35 +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 docs: record deployed milestone 4 and release state 2026-09-07 17:48:08 +02:00
README.md Tag filtering, multi-category, bug fixes, image validation, docs 2026-04-04 22:48:26 +02:00
services.md Improve quiz TTS and Android release build 2026-05-12 01:01:01 +02:00
TODO.md feat: study plans you can open, work through, and edit 2026-09-10 12:10:39 +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