Inspiration
When we are preparing for exams and we have large chunks of materials to read, we easily get overwhelmed because of delayed understanding. My friends and I traced it to those complex technical words we encountered in the course, so we had to consult online resources to check for explanations, and that makes it easy for us to get so distracted by notifications we receive from various social media apps that soon we forget we were studying.
We looked for tools that could work offline with minimal cloud dependence, but we couldn't find one that fit our use case.
So we built Amoye to help us understand from the ground up. Amoye is a hybrid-AI study companion for Android (with a companion Chrome extension) that lives inside our reading flow, runs on-device whenever possible offline, protects our bandwidth and privacy when it reaches for the cloud, and learns from behavioural patterns based on which explanation format helps us understand best.
## What it does
Amoye turns any textbook or lecture PDF into an adaptive, active study experience:
Simplify any PDF: no matter how large, Amoye segments the document into clean, coherent study chunks, preserving sections, lists, multi-column layouts, and sentences across page breaks.
- Learn in a way that works for you (
See,Hear,Read,Do): Tap any passage and explore it in four distinct formats:- See: A structured diagram (flowchart, mind map, sequence, timeline, or comparison table) laid out and rendered deterministically into crisp, theme-aware SVG.
- Hear: A two way communication podcast (Guide and Student) totally offline and with playback controls
- Read: A one-line summary, plain-language explanation, expandable key terms, with relatable real-world examples, and common mistakes to watch out for.
- Do: Seven playable mini-games generated from the passage - Memory Match, Word Hunt, Unscramble, Speed Round, Sort It Out, Odd One Out, and Sequence Builder.
- ** Behavioural Adaptation*: Amoye also observes behavioural learning patterns over time to rank the formats that genuinely help the student the most, while keeping all four formats one tap away. A dedicated **How you learn* screen explains every recommendation in plain English.
- Learn in a way that works for you (
Access to Hybrid AI: Amoye responds first offline (
On-device) using Gemini Nano and reverts to theCloudfor more demanding tasks by only sending minimal information, protecting privacy. When a cloud-first task runs on a Gemini Nano-capable phone, Amoye extracts key concepts locally first and sends only the compact concept JSON to the cloud.
How we built it
- We used Rust to build a single shared core engine that handles PDF text cleaning, passage splitting, AI task routing, output validation, SVG diagram layout, game logic, and user adaptation.
- We combined Rust + UniFFI to connect that core to our Android app, and Rust + WebAssembly to connect the exact same core to our Chrome extension.
- We used Kotlin, Jetpack Compose, and Material 3 to build the native Android app, and React, TypeScript, and MUI to build the Chrome extension.
- We used PdfRenderer and PdfBox-Android on Android, and PDF.js on Chrome, to render pages and extract positioned text before passing it to the Rust splitter.
- We used Firebase AI Logic to run generative AI in hybrid mode combining Gemini Nano on the device (for fast, free, offline explanations, games, scripts, and concept summaries) with Gemini in the cloud (for heavier diagram generation or devices
without on-device AI).
- We combined on-device concept extraction with cloud generation so that when a supported phone needs the cloud for a diagram, it summarizes the passage locally first and sends only a tiny concept list instead of raw PDF text.
We used Firebase App Check to protect backend AI and database calls from unauthorized traffic, Firebase Anonymous Authentication to sign users in silently without a login wall, Cloud Firestore to back up user format preferences, and Firebase Remote Config to adjust model settings and limits without publishing a new app update.
- We used Room on Android and IndexedDB on Chrome to store PDFs and cache generated explanations locally on the user's device, paired with on-device Text-to-Speech so audio walkthroughs use zero mobile data.
- To learn a user's preferred format transparently without black-box complexity, we used an Exponential Moving Average rule in Rust to update the score $S_f$ of each format $f \in {\text{See}, \text{Hear}, \text{Read}, \text{Do}}$ after each study interaction $w_t$:
$$S_f^{(t)} = (1 - \alpha)\, S_f^{(t-1)} + \alpha \, w_t \quad (\alpha = 0.15)$$
Correct Quick Checks and strong game scores raise $S_f$, while wrong answers or leaving a format immediately lower it.
## Challenges we ran into
- Designing a clean multi-platform architecture: Early on, we had to decide where to draw the line between platform code and shared code so Android and Chrome wouldn't drift apart. Designing a narrow boundary where Android and Chrome only handle UI, local storage, PDF rendering, and model calls while Rust owns all business rules really took careful iteration to get it right.
- Segmenting PDFs accurately: PDFs store positioned words rather than true paragraphs or sections. At first, passages sometimes stopped mid-thought at page breaks, cut lists in half, or joined two different sections together. We had to rework our extraction and splitting pipeline to respect headings, lists, multi-column pages, and sentences that cross from one page to the next.
- Making small on-device models reliable: On-device models have smaller input limits and occasionally return imperfect JSON. We solved this by keeping prompts short, repairing minor JSON formatting issues in Rust, validating every output before rendering, and chunking longer pages when offline.
- Setting up CI/CD and keeping secrets safe: Automating a build that compiles Rust for WebAssembly and three Android CPU architectures alongside Gradle ran into Android SDK command-line tool mismatches and workflow configuration bugs on GitHub Actions. We
also had to structure our
judgingbuild and.gitignorecarefully so Firebase API keys and App Check debug tokens stayed out of Git history while still allowing judges to test the APK out of the box.
## Accomplishments that we're proud of
- One shared Rust core for true extensibility: One of our key non-functional goals was extensibility. By putting our core logic in a single Rust library shared by both Android and the Chrome extension, every improvement we make works on both platforms immediately, and adding future platforms like iOS or desktop won't require rewriting the brain of the app.
- Working behavioural adaptation: Instead of asking users to fill out a questionnaire at the start, Amoye actually observes what helps them pass Quick Checks and adapts the interface around their real behaviour.
- Practical hybrid AI that respects data and privacy: Combining Gemini Nano on-device with compressed cloud fallback means students can study offline, save mobile data, and keep their raw lecture PDFs on their own device.
## What we learned
- Clarity in architecture pays off fast: Taking the time to separate UI from core logic made testing much easier and saved us from fixing the same PDF or AI validation bugs twice across Android and Chrome.
- Behaviour speaks louder than self-reporting: Educational research shows people are often wrong when asked to guess how they learn best, whereas combining visuals, active recall, and personal choice measurably improves understanding. Building around real quiz outcomes made the product much stronger.
- Focused tasks make local AI shine: Breaking big requests into small, structured steps makes on-device Gemini Nano fast and dependable.
## What's next for Amoye
- Spaced review: Automatically bring back passages whose Quick Check questions a student missed after a few days so they can lock in weak topics before exams.
- Scanned handout support: Add on-device OCR so photographed whiteboard notes and scanned paper handouts work just like digital PDFs.
- Optional Google Sign-In: Let users link their anonymous profile to a Google account so their learned format preferences sync between their Android phone and Chrome extension.
- iOS support: Reuse our shared Rust core alongside Firebase AI Logic on iOS so students on iPhones and iPads can use Amoye too.