Inspiration

Imagine rehearsing for tomorrow’s history exam on the train home. Your opening line is ready. “The new bridge brought more traders to town.” Then you look again at the town clerk’s ledger. It lists eighteen stalls one year and twenty-seven four years later. Where does it say why those traders came?

It doesn’t. That is exactly the question you want a teacher to ask before you walk into the exam. Your train has already lost signal. In Termleaf you can open the ledger, choose Rehearse for a verbal exam, and defend your claim to a tutor running on your phone when its local model is ready. Change your answer and the examiner has something new to ask. The useful part of the lesson happens halfway home.

Your textbook answers back. Offline.

The Termleaf reading desk and its five study activities.

We started with a familiar piece of advice for a patchy journey: download your reading before you leave. That solves one problem. You can predict which chapter you will need. It is much harder to predict which line will trip you up, which diagram you will misread, or which objection will make you change your mind.

A student on a rural connection and a student who switches off Wi-Fi to concentrate can find themselves in the same position. The material is on the desk and the conversation they need is out of reach. We wanted the freedom to ask a second question, even an unexpected one, to travel with the book. That led to a specific design decision. Save the page and its evidence while connected, then use the model available where the student is actually studying.

What it does

Termleaf turns the material a student brings into five ways to study. Import a PDF with its diagrams intact, make a rough notebook from photos and pasted notes, or choose a book from the Library. When selecting books for an activity, add an image or a few lines of context from the assignment.

  • Engage with your book. Open The last tram to the museum. Two routes connect Harbor and Museum. One takes nineteen minutes. The other has two short rides and a change at Union. Select the timetable and ask which route wins. Then introduce a five-minute delay. The map stays on screen so you can check the answer before you follow it.
  • Debate a topic. Try “Our town should install solar panels on public buildings first.” While online, collect linked Wikipedia excerpts. Later, reopen the brief and argue for a different priority. The sources remain available when the opposing argument makes you want to look something up.
  • Rehearse for a verbal exam. Give the examiner Merewick’s ledger and the focus “Ask me what the clerk actually counted.” Speak or type a claim, hear a follow-up and revise it. You can replay your recording and correct the transcript before the tutor responds.
  • Prepare for an exam. Pick pages across books, add the marking criteria, then choose flashcards, multiple choice, short answers or a mixed set. Use the two market entries to practise recalling evidence. Use the tram announcement for a written question where a change in one assumption changes the answer.
  • Chill zone. Draw something with a distinctive detail and give it a first line. Our recorded student draws a paper boat with a mast and sails. Try a different scene: a fox finds a brass key in a station locker. When online AI is enabled, the first story turn can save the drawing’s description. Bring the detail back after disconnecting and see where the story goes.

The new original transit worksheet, open in the desktop Termleaf reader.

Download the transit puzzle · Download the historical ledger

What to watch in the demo

The film follows a science student on the train home. The first thirty seconds contain the handover you can check on camera. The student selects a graph on an iPhone while connected, saves Gemini’s description, switches off the radios and asks a fresh question. The answer cites two temperatures visible in the original figure. Later, the student proposes weighing the cups before and after. That is a different skill from reading a bar chart: they have identified a measurement the original graph never made.

The transit map and market ledger in the judging materials are separate activities you can try yourself. The museum puzzle even gives you a quick way to check a calculation. Six minutes on the first tram, two to change and nine on the second adds up to seventeen. Five extra minutes at Union makes it twenty-two. The direct nineteen-minute tram is suddenly the better choice.

The recorded iPhone moves from a cloud caption to a new question in Airplane Mode.

Where the Chrome extension fits

Research rarely arrives as a tidy PDF. Open a course page in Chrome and pin the Termleaf leaf beside the address bar. The side panel lets you crop a figure from one tab, collect a passage from another and keep the origin of each clipping. You can try this with our Merewick worksheet. Save the market clerk’s entry, then select the paragraph describing what it leaves out. You have both the claim and the grounds for challenging it.

In the same side panel, a judge can ask “How many more stalls paid the toll in 1846? Does that prove the bridge caused the increase?” Gemini counted nine more, then pointed out that counting stalls tells us nothing about why the traders came. Highlight a different passage or crop the ledger and the next question starts from that evidence. Ask Gemini online sends the saved clip and the question when pressed. Ask on this device keeps the exchange local and works offline on a model-ready Chrome installation.

Gemini answers a question about the Merewick ledger beside the original worksheet.

Take notebook to the app exports a portable notebook. Import it into the desktop or mobile Library to carry those sources into an oral rehearsal. This is how a student can gather material on a campus computer and do the thinking on a phone during the journey home.

An actual Chrome side panel clips material and sends a notebook to the iPhone.

How we built it

A question can need different things at different times. “Which route is faster?” needs the timetable. “What if I miss the connection?” also needs the student’s new condition. We keep the book, selected region and conversation together, and use Firebase AI Logic to reach a model capable of handling that input.

On iPhone, the student can ask cloud Gemini to describe a selected diagram while connected. The description stays with that region. After disconnection, Apple Foundation Models can use that description locally through Firebase AI Logic. If the caption omitted a tiny label, the student can see what was saved and decide whether a later online look is needed.

On desktop Chrome, a ready image-capable Gemini Nano can inspect a new crop even if the student only chooses it after losing connectivity. With online AI enabled, the locally installed desktop desk can also contact cloud Gemini over HTTPS. The Python launcher serves the interface from the judge’s computer. Chrome can use the same cloud model from its side panel. Each online request passes a server check for judge access and a genuine Firebase App Check token before reaching Firebase AI Logic. An ordinary installation can use its own downloaded model. On a physical Galaxy S26+, we installed the judging APK, signed into the judge account and asked cloud Gemini the delayed-transfer question. It used the timings on the diagram to recommend the direct tram. With both radios off, the same phone could still quiz us about the market ledger from the saved text. Its system model was unavailable on that test installation. Firebase App Check protects the cloud path.

The two inference routes shown in the demo, from selected material to a grounded reply.

Challenges we ran into

Pictures change. A sketch can gain a sail in one turn and lose it to the eraser in the next. Reusing an old caption made the tutor remember something the student had deliberately removed. We tied the saved description to the actual drawing. Editing it allows the next permitted online turn to refresh the description. Clearing the canvas removes it.

People revise themselves mid-sentence. During oral rehearsal a rough transcript could send the examiner back to the opening question. We kept the audio available for playback, made the words editable and used the latest answer when asking the follow-up. Typing works in the same exchange.

Offline has to be observable. A cached page can open beautifully while its AI has stopped working. We filmed the iPhone’s network controls, kept the source visible and asked something new. The app labels on-device answers, saved captions and prepared activities. The readiness view lets the student check the installed model before leaving Wi-Fi.

Accomplishments that we're proud of

The moment we like best is a small correction. The student begins the filmed rehearsal with an explanation for a temperature difference. A follow-up gets them to suggest an experiment that could test it. That is what we wanted from a tutor: a reason to look again at the evidence and a chance to give a better answer.

The same design also supports a student drawing for fun. After a real drawing and its first story turn, the iPhone can carry the boat’s visual details into another scene offline. The student picks what happens next.

A drawing becomes an ongoing story, including a new turn after disconnecting.

What we learned

A student needs to know what the tutor has actually seen. An answer based on pixels, one based on an earlier caption and a question assembled from saved text can each be useful. Showing the source and the route lets the learner judge whether the answer fits the evidence. A history student can ask for a second record. A map reader can check whether transfer time was counted. Both are learning how to question an answer, including the tutor’s.

What's next for TermLeaf

We want to take Termleaf onto real commutes with students who regularly lose connectivity and learn which questions they still have to postpone. A teacher could share a reading, a contrary source and an oral prompt together. A student leaving campus could see which diagrams already have usable captions at a glance. Our evidence so far comes from working builds and device tests. The next measure is whether students come to class with a question or a revision they would otherwise have had to leave on the train.

Built With

  • apple-foundation-models
  • chrome
  • firebase-ai-logic
  • firebase-app-check
  • firebase-authentication
  • firebase-hosting
  • gemini
  • gemini-nano
  • indexeddb
  • kotlin
  • pdf.js
  • pdfkit
  • swift
  • typescript
Share this project:

Updates

Submission history