Inspiration

A textbook page is rarely enough by itself. In one classroom, some learners need a worked example and vocabulary support, while others are ready to apply the same idea on their own. Making those versions by hand takes time that teachers often do not have.

We built TeachKit around a small, practical goal: start with one source and prepare printable practice that gives students different kinds of support without changing the learning objective.

What it does

TeachKit is built to turn a photo, PDF, original sample page, or typed topic into a printable lesson pack. The pack includes Guided Practice, Independent Practice, and Challenge, along with a five-question exit quiz, discussion prompts, and a parent note.

The live workflow is designed as two GPT-5.6 Responses API calls. The first reads the source into a strict analysis schema: topic, grade, subject, source language, and essential concepts. The second creates the structured lesson pack. Completed worksheets can appear as they are validated, rather than only after the entire response finishes.

The linked hosted preview currently demonstrates the interface, an authored fallback pack, and the A4 print flow. Live GPT-5.6 generation is disabled in that preview, and the fallback is labeled so it is not confused with output from the selected source.

How we built it

TeachKit uses Next.js, React, TypeScript, Zod, pdf-lib, and the OpenAI Responses API. A single server route owns validation, the two-stage request budget, streaming, and fallback handling. The browser never receives the API key.

Photos, PDFs, and topics use the same pipeline. The route accepts one bounded source, checks supported file signatures, and sends PDFs through the first analysis request without adding a third model call. Strict Zod schemas validate the analysis and the lesson pack before the interface uses them.

We also built the lesson pack for paper, not only for a browser screen. Browser print styles lay out the completed pack as five A4 pages. The repository includes six original sample pages so the project can be reviewed without uploading copyrighted classroom material.

Codex was part of the build process from the start. We used it to inspect the product flow, challenge the request budget, implement and test the streaming path, review the print layout, compare Figma directions, and run code and security reviews.

Challenges we ran into

The hardest design constraint was keeping the live workflow to exactly two model requests. Retrying a failed model call would quietly break that promise, so TeachKit uses no model retries. If generation fails, it switches to a clearly labeled authored pack instead of suggesting that a model produced it.

Print layout was another real constraint. A worksheet that looks fine on a screen can break when it is printed. We reviewed the five-page A4 flow for clipping, overlap, and readable spacing, then kept the visual interface separate from the print layout.

The remaining release work is operational. Before the live route is enabled for judges, it still needs a valid Platform API key, a successful live validation, distributed rate limiting, and OpenAI spend controls.

Accomplishments that we're proud of

  • One source can drive three practice levels that share a learning objective but differ in support and thinking demand.
  • The app accepts photos, PDFs, original samples, and typed topics without changing the two-call live design.
  • The fallback stays visibly separate from live output, including in the print flow.
  • Six original sample pages cover science, math, history, and English.
  • The project has focused automated tests for request limits, schema validation, incremental worksheet extraction, file checks, and fallback behavior.

What we learned

The feature is not useful just because it can generate text. The lesson pack has to be readable, differentiated in a meaningful way, and ready to print. That is why we treated the worksheet structure, fallback provenance, and page layout as product requirements rather than polishing work at the end.

We also learned that a narrow technical promise needs a clear failure path. The two-call limit shaped the entire architecture, from disabled SDK retries to the visible authored fallback.

What's next for TeachKit

Our next step is to complete the live GPT-5.6 validation and judge-facing deployment controls, then test the pack with teachers using the original samples. We will keep the product English-only until another language completes the full generation and print review.

Built With

Share this project:

Updates