Textbook Teacher turns a photo of an existing textbook page into a short, grounded lesson.

The learner scans a page with a phone or uploads an image. On the paired computer, Hikari identifies up to three educationally important passages and points to their exact locations on the original page. For each passage, she teaches the core idea in clear spoken English, shows how to apply it, contrasts a common misconception with the correct rule, and connects related knowledge. A 30-second active-recall prompt follows each point, and a page-grounded three-choice quiz closes the lesson.

The deterministic judge demo uses an original English programming textbook page about Python if, elif, and else. It demonstrates top-to-bottom condition tracing, branch order, the else fallback, and an application question for temperature = 25.

The product is designed to go beyond summarization. Its loop is: find where to look, understand why it matters, and prove you can answer.

Live multimodal analysis runs through Codex CLI with GPT-5.6 Sol. Output is constrained by JSON Schema and revalidated with Zod. Codex runs read-only and ephemerally; temporary textbook images are deleted after processing. Optional OpenCV grounding improves coordinates for printed colored boxes. Browser speech avoids a separate audio API.

For dependable judging, the app also includes a polished, network-independent 30-second demo. No OpenAI API key is required: live analysis accepts only ChatGPT-authenticated Codex access.

How we used Codex and GPT-5.6

Codex helped turn the initial concept into the complete product: React UI, WebSocket room pairing, local HTTPS for phone cameras, structured multimodal analysis, validation, recovery paths, and visual QA. Real browser tests revealed route, coordinate, crop, and guide-line defects; Codex traced and corrected them against real textbook images.

We made the core product decisions together: focus on a closed learning loop rather than OCR, show exact source grounding, require observable goals and success criteria, teach common mistakes, and add active recall plus a final quiz.

GPT-5.6 Sol powers the live lesson. It analyzes the visible page under a strict schema and returns the shortest meaningful passage, normalized coordinates, explanations, likely assessment angles, related knowledge, misconceptions, recall prompts, and a grounded quiz.

The creator's hand-authored contribution was the exact visual ground truth for guide-line endpoints and source-text boxes; the rest of the implementation and media workflow was created with Codex and GPT-5.6 Sol.

Primary project session: 019f78cd-ebd9-7161-bbb8-c4700dc17589

How to test

Requirements: Node.js 20+, npm, and a ChatGPT account with Codex access for live analysis.

git clone https://github.com/yok283/TextbookTeacher.git
cd TextbookTeacher
npm install
npx codex login
npm run dev

Open https://localhost:5173 and accept the local certificate warning. Choose 30秒デモ for the deterministic, no-network judge experience. For live analysis, choose 授業開始, then upload a page or pair a phone on the same Wi-Fi.

Built With

Share this project:

Updates