PedsHub¶
PedsHub is a pediatric question bank, a library of articles and flashcards written against it, and the analysis of what a learner actually knows.
Educators upload exam PDFs and textbook chapters; AI proposes questions, cards and article drafts from them; a person decides what is worth keeping; learners sit the result as timed or study sessions with a tutor beside them.
-
I am studying
Sit sessions, review what you got wrong, build decks and study plans, and read the library.
-
I write the content
Turn a PDF into questions, write and refine articles, manage decks and categories, and answer learner feedback.
-
I run the site
Settings, people and access, AI models, lab values, jobs, deploying and backups.
Everything else¶
| Studying | Sessions and the two modes, the session builder, flashcards, study plans, AI Mode and the tutor, and what the analysis screens measure |
| Reading | The article library — three depths per article, per-section notes, figures, cross-references and hybrid search |
| Writing | Editorial: the queues, AI drafting, revisions and restoring, figures and the 30-day bin, decks from an article |
| Question bank | Importing a document, the extraction modes, the shared category tree, tags, exams and blueprints |
| Access | Three roles and four kinds of grant — what each reaches, and the rule that every change a grant permits can be put back |
| Administration | Running the site: Settings, site policy, AI models, people, lab values, jobs, the image bank |
| Operations | Services, deploying, configuration, background work, backups, the test suite, the command line |
| API | Every operation, rendered from the live OpenAPI document, plus the rules that hold across all of them |
| Internals | Deep-dive notes: architecture, the service layer, retrieval thresholds, reranking |
The shape of it in one page¶
| Layer | What runs |
|---|---|
| Frontend | React 18 + React Router 6, Vite build, plain CSS, Milkdown for markdown editing, served by Nginx |
| Backend | FastAPI + SQLAlchemy, 4 uvicorn workers |
| Database | PostgreSQL 16 with pgvector — 1024-dimension embeddings alongside the rows |
| Document text | pdf_page_chunks in Postgres, beside the document row, cascading on delete — this was ChromaDB until nothing turned out to query the vectors |
| Queue | Celery over Redis — one worker service (concurrency 2) and exactly one beat |
| Objects | MinIO, reached on the compose network as quiz-minio |
| AI | A LiteLLM proxy in front of Claude, GPT, Gemini and Bedrock; a cross-encoder reranker; a clinical index in Milvus, read-only |
| Identity | Authentik at sso.pedshub.com — there is no password door |
| Logs | Promtail → Loki → Grafana |
Two things worth knowing before anything else¶
The bank has no owners. Questions, articles, categories, documents, media
and shared quizzes carry user_id = NULL. Authorship confers no rights
anywhere — permission comes from a role or a grant and from nothing else, and
one path that does stamp a name is
read by nobody. What keeps an owner is what is genuinely
one person's: attempts, notes, favourites, collections, folders, study-plan
progress, and the unshared quizzes that are somebody's own sittings.
Sign-in is the identity provider's job. There is no registration form, no
invite code and no email sign-in code. POST /auth/login answers 410 Gone.
Roles come from Authentik groups and are reapplied at every sign-in. See
Signing in.