interactive textbook summaries
paperchat
Drop a textbook PDF, get a navigable interactive chapter site — page-by-page concept fragments with web-component figures, KaTeX-rendered math, and walk-through explanations you can click through.
Live demo
One chapter, generated end-to-end by GLM‑5.1 via OpenRouter, for < $0.55.
What's inside each chapter
- Interactive figuresClick, drag, slide. Each concept gets a manipulable diagram instead of a static one.
- 3D visualizationsUnit cells, orbitals, lattices — rotate them yourself with Three.js.
- Click-to-defineHover any technical term to read its definition without losing your place.
- Source-anchoredEvery section cites the source pages so you can verify against the textbook.
- Math-nativeKaTeX rendering with clickable symbol legends in equations.
- Self-test decksAnki-style flashcards at the end of every section.
How it works
paperchat runs a planner-then-subagents agent loop. The planner reads the chapter, vets the embedded figures,
writes a section plan, and dispatches one writer subagent per concept page. Each writer produces a self-contained
HTML fragment with interactive figures from a small web-component library (pc-3d, pc-equation,
pc-stepped, pc-anki, …). Output is plain HTML — no framework, no build step.
The local dev server is node dev-server.mjs; the agent loop runs in a detached child process so file
edits don't kill in-flight chapter generation.
Run it yourself
git clone https://github.com/eitanporat/paperchat cd paperchat npm install npm run dev # opens http://localhost:5173
Drop a PDF, pick a model (OpenRouter or Anthropic), click Summarize. The chapter HTML lands in
cc-workdir/chapter-<id>/ and can be served as-is — that's what's hosted here.