The learner, the task, the barrier

Learner: an international student who has just started studying in Germany and doesn't read German well yet. Our persona, Ayesha, moved from Lahore to Munich for her Master's.

Task: understand an official letter and do the right thing before the deadline. Many of these letters decide whether she can keep studying: the health insurance asks for proof the university needs for enrolment, the Ausländerbehörde (immigration office) sets the appointment for her residence permit, the broadcast fee office sends a payment reminder.

Barrier: the letters are in formal German. A translation app gives a word-for-word text, but not the answer to the real question: what do I have to do, and by when? Students ignore letters, or paste them, with their name, address, date of birth and bank details, into a chatbot. Both are bad options.

Before and after: one concrete example

Before. Ayesha gets a letter from her health insurance (our fictional sample 03). It says, in German, that she must send a certificate of enrolment "innerhalb von 14 Tagen nach Datum dieses Schreibens", within 14 days of the letter's date. No date is printed for the deadline. A translation tells her the words, not the date, and not that her university enrolment depends on it.

After, with LetterLens. She takes a photo or picks the sample, and in one screen she sees:

  • What it is: a health insurance letter, in one plain-English sentence.
  • The deadline: 04.12.2026, marked "Please verify" with the reason "This date isn't written in the letter — it was calculated." so she knows to double-check it.
  • Where it says so: clicking the deadline highlights the exact German sentence in her letter.
  • What to do: a short numbered list of next steps, and a checklist she can tick off.
  • Explain more: a plain explanation in Urdu (also Arabic, Turkish or English), right to left, plus a polite German reply draft she can copy.
  • Don't forget it: save the deadline, or add it to her calendar with a reminder 3 days before.

Learning value

LetterLens doesn't just hand over an answer; it helps the learner understand the letter and act on it:

  • Answers are anchored in the source. Every deadline and amount links to the German sentence it came from, so the learner sees the official wording next to the plain-language meaning, and can check it instead of trusting a black box.
  • It shows how sure it is. Each field is checked against the letter: Found in letter, or Please verify with a reason. That teaches the learner which parts need a second look.
  • It models the next step. The German reply draft shows how such a letter is usually answered, in the formal register she will need again.

We don't claim measured learning outcomes: we haven't run a study.

Inclusive experience

  • Plain language and the learner's own language: explanations in Urdu, Arabic, Turkish and English, with correct right-to-left layout (numbers like reference codes stay in the right order).
  • Works offline and on weak connections after the first visit: the letter is read with OCR and Gemini Nano on the device, with Wi-Fi off. (Honest note: the first visit downloads about 15 MB, mostly the offline text reader.)
  • Phones and older laptops: without an on-device model, the same features run in the cloud after the learner approves. On a phone, "Take a photo" opens the camera.
  • Keyboard and screen readers: skip link, visible focus, every field a real button, labelled dialogs, and status messages announced to screen readers. Text contrast is at least 4.5:1, and colour is never the only signal (every tag has an icon and words).
  • No account, free, private by default: anonymous sign-in. The learner's letter never leaves the device without their approval, and before anything goes to the cloud they see exactly what will be sent, with names, addresses, IBANs, reference numbers and dates of birth removed.
  • Clear when things go wrong: every error says what happened and what to do next, and the learner never has to upload the letter again.

Testing so far (honest): 217 automated tests, including privacy checks that scan the code, plus our own manual tests on the hosted app in Chrome on desktop and on a phone. We have not yet tested with real students; that's the first thing we'd do next.

How we built it

A web app (React + TypeScript) for Chrome, running entirely in the browser with Firebase:

  • Reading the photo: Tesseract.js OCR (German), on the device.
  • Understanding the letter: Gemini Nano in Chrome through Firebase AI Logic, on the device. Without Nano, Gemini in the cloud, only with personal details removed and after the learner approves.
  • Explain more: Gemini in the cloud, with a preview and approval every time; details are put back into the answer on the device.
  • Checking every answer: each date and amount must be found in the letter text, and the date or amount must appear inside the quoted sentence; otherwise it's marked Please verify.
  • Firebase: App Check, anonymous Authentication, Cloud Firestore (only deadline metadata, enforced by security rules), Remote Config, Hosting with an offline service worker.

Challenges

  • Small models get dates wrong in believable ways, for example picking the letter's date instead of the deadline, or miscounting "within 14 days". Checking that the date appears in its quote catches most of these, and calculated dates are always flagged.
  • Right-to-left text reversed reference numbers ("512 345 678" became "678 345 512" in Urdu), which could make a learner pay to the wrong reference. We now keep numbers left to right inside RTL text.
  • OCR misreads break privacy rules: our own sample IBAN was read as "DEOO …" and slipped past the IBAN rule, so the rule now accepts the characters OCR confuses.
  • Offline and security checks don't mix easily: if the page is opened offline, cloud features ask for a reload instead of hanging.

What we learned

  • A translation isn't access: learners need the action and the date, with a way to see where it came from.
  • Showing exactly what will be sent makes it possible to use cloud AI with personal documents at all.
  • Offline-first design is what makes the tool usable on a bad connection, not an extra.

Limitations

  • Chrome on desktop for the on-device path; other browsers and phones use the cloud path after approval.
  • Heavy OCR errors can stop a sentence from being matched; the field then shows Please verify instead of a highlight.
  • It covers common letter types (broadcast fee, residence permit, health insurance, tax office, rent); unusual letters may get less detail.
  • It is a helper, not legal advice: the learner should always check the original letter.

Event contribution, pre-existing work and credits

  • When it was built: LetterLens was built by our team between 25 November and 1 December 2026, with no pre-existing codebase. It was also submitted to the #BuildHybridAI hackathon.
  • Examples: all five letters are synthetic, written by us for a fictional recipient, and marked SAMPLE. No real personal data is used anywhere.
  • AI assistance: we used Claude Code (Anthropic) to help write, review and test code and documentation; every change was reviewed and committed by the team. Inside the app, Gemini Nano and Gemini (via Firebase AI Logic) do the letter understanding and explanations.
  • Libraries: React, TypeScript, Vite, Tailwind CSS, shadcn/ui and Radix UI, lucide-react icons, Tesseract.js, date-fns, fastest-levenshtein, vite-plugin-pwa / Workbox, Firebase JS SDK. Font: Geist.
  • License: Apache-2.0. Source: https://github.com/asjadkashif2004/letterlens-

Built With

  • claude-code
  • cloud-firestore
  • date-fns
  • firebase
  • firebase-ai-logic
  • firebase-app-check
  • firebase-authentication
  • firebase-hosting
  • firebase-remote-config
  • gemini
  • gemini-nano
  • javascript
  • pwa
  • radix-ui
  • react
  • shadcn-ui
  • tailwindcss
  • tesseract.js
  • typescript
  • vite
  • workbox
Share this project:

Updates

Submission history