Inspiration

The documents that matter most are often the hardest to read: a letter from the bank, a medicine leaflet, a rental agreement, a notice from the council. For people with dyslexia, people reading in a second language, or anyone who is tired or stressed, these letters are a wall. Families end up asking one person to "read this for me", and that person is not always there.

AI can rewrite these texts in plain language, but most tools send every word to a server. These are exactly the documents people want to keep private: they contain names, account numbers and health details. I wanted a tool that is private by default, free to run, and still works on any device. That is what hybrid inference makes possible.

What it does

PlainPage rewrites any text or web page in plain language, on your device when it can and in the cloud when it must.

  • Three reading levels (Easy, Plain, Clear) that keep every fact, number, date and warning.
  • "In short": the three points that matter, at the top.
  • Fact check: every amount, date, time and phone number from the original is checked against the plain version, on the device, with no AI. Anything missing is listed so the reader knows what to check.
  • Privacy shield: when text has to go to the cloud, names, phone numbers, emails and account or ID numbers are swapped for placeholders like [NAME_1] on the device first, and put back when the answer arrives. Readers can open "Show what the cloud saw".
  • To-do list on request: one tap turns a letter into tasks with their deadlines.
  • Words to know, explain any word, read aloud, and dyslexia-friendly display (OpenDyslexic, Lexend and Atkinson Hyperlegible fonts, spacing, tinted backgrounds, reading ruler).
  • 12 output languages, including Tamil, Hindi, Telugu and Bengali.
  • Private mode: the text never leaves the device. If the device cannot do the job, PlainPage says so instead of quietly using the cloud.
  • Three ways in: a hosted web app (installable, works offline with the on-device model), a Chrome side-panel extension for any web page, and a native Android app where you can share or select text in any app and choose "Make it plain".

How we built it

Every prompt goes through the Firebase AI Logic hybrid inference SDK, on two platforms:

  • Web: the Firebase JS SDK with Gemini Nano in Chrome (Prompt API) and gemini-3.5-flash-lite in the cloud. Built with TypeScript, React and Vite. The same code base builds both the web app and the Manifest V3 Chrome extension.
  • Android: Kotlin and Jetpack Compose with firebase-ai and firebase-ai-ondevice (Gemini Nano through AICore).

A small router, unit-tested on both platforms, picks one of the four inference modes for every job and explains the choice to the reader before anything is sent:

  • Private mode, or offline: ONLY_ON_DEVICE (refuse rather than leak)
  • Short text in a language the local model writes: PREFER_ON_DEVICE
  • No local model yet: PREFER_ON_DEVICE, and the SDK falls back to the cloud
  • Long page: PREFER_IN_CLOUD, with the device as the safety net
  • Language the local model cannot write (for example Tamil): ONLY_IN_CLOUD

On top of the SDK's fallback, the engine recovers mid-page in both directions: a section that fails on the device is retried in the cloud, and if the cloud runs out of quota the section is re-split to fit the local model. Pages are chunked to fit each model, results stream in section by section, and every section shows the inferenceSource the SDK reports. The receipt at the end only says "Nothing from this page left your device" when the cloud was never asked.

Other Firebase products: App Check protects the API, Remote Config tunes the router for both apps without a release (cloud model, length limit, chunk sizes, on-device languages), Anonymous Authentication and Cloud Firestore store the reading library and preferences, and Firebase Hosting serves the web app. Everything runs on free tiers.

The reading-level meter is computed locally with the Flesch-Kincaid grade formula (no AI).

Challenges we ran into

  • Two very different on-device models. Chrome's Gemini Nano takes about 9,000 tokens; on Android it is about 4,000 and only validated for English and Korean. I made the router's limits Remote Config values with separate Android keys, so one console change retunes both apps.
  • Keeping placeholders alive. The privacy shield only works if the model copies [NAME_1] exactly, even when translating into Tamil. Every prompt carries the same rule, and the device also hides half-received placeholders while text is still streaming.
  • Being honest about where text went. The SDK can switch sides by itself, so I track every cloud attempt rather than assuming, and the receipt reflects what actually happened.
  • Hardware. My development laptop cannot run Gemini Nano, so I built and tested the cloud path for real and covered the on-device path and every fallback with unit tests and fakes.
  • Accuracy. Simplifying legal and medical text is risky if a number goes missing, which is why I added the deterministic fact check instead of trusting the model.

Accomplishments that we're proud of

  • One hybrid design running on Web, a Chrome extension and Android, sharing one Firebase project and one Remote Config.
  • A test against the live cloud model where four requests for a sample bank letter contained none of its personal details, while the plain version showed all of them again and the fact check reported 14 of 14 details kept.
  • Readers always know where their text is going, before it goes.

What we learned

  • Hybrid AI is not just "on-device or cloud": the device can protect the reader even when the cloud does the work.
  • Small on-device models need short, concrete, positive instructions, and their limits should be configuration, not code.
  • Deterministic checks (fact check, privacy shield) build more trust than another AI pass.

What's next for PlainPage

  • Reading photos of paper letters (multimodal input on-device).
  • On-device name detection to make the privacy shield even stronger.
  • Library sync across web and Android with Google sign-in.
  • Testing with dyslexic readers and adult-literacy groups, and more Indian languages as on-device models support them.

Built With

Share this project:

Updates

Submission history