Inspiration

As a student, I wanted a simpler way to turn lecture notes into useful study practice. Rereading alone can feel repetitive, internet access is not always reliable, and students may prefer to keep their notes on their own device.

StudyRelay explores how hybrid AI can make learning more flexible while giving students control over where their notes are processed.

What it does

StudyRelay transforms pasted lecture notes or imported text files into:

  • Revision guides with key concepts and self-check questions
  • Practice quizzes
  • Flashcards

Students can request output in English or Hindi and download their generated session as a text file.

The app offers three inference modes:

  • On this device only: Uses the prepared on-device model in a supported browser.
  • Prefer this device · allow cloud fallback: Prefers on-device inference and permits cloud fallback when local inference is unavailable.
  • Gemini cloud: Explicitly uses Gemini in the cloud.

Each successful response displays its actual inference source, including “Ran on this device” for local generation. Hybrid and cloud modes explain that notes may be sent to Gemini in the cloud.

How I built it

I built StudyRelay as a web application using the Firebase AI Logic SDK for on-device and cloud inference.

The selected mode maps to Firebase AI Logic's ONLY_ON_DEVICE, PREFER_ON_DEVICE, or ONLY_IN_CLOUD inference setting. The interface includes model readiness checks, download progress, request cancellation, and clear error messages.

The app is deployed on Firebase Hosting. Firebase App Check protects cloud AI requests, with enforcement enabled for the Firebase AI Logic service.

The source code is public under the MIT license, with setup instructions in the repository.

I used AI coding assistance during development and reviewed the application through real browser tests.

Challenges I ran into

Preparing the local model was the biggest challenge. Although the device passed the hardware checks, Chrome initially reported insufficient disk space. After freeing space and restarting Chrome, the model download progressed and local inference succeeded.

Another challenge was making the inference behavior clear. I added explicit mode selection and response-source badges so users can distinguish local generation from cloud generation.

Model preparation can also take time, so the interface shows progress and allows users to cancel a request.

Accomplishments that I'm proud of

  • Generated a revision guide using the on-device model and verified the “Ran on this device” badge.
  • Tested Gemini cloud generation and hybrid cloud fallback.
  • Tested a Hindi practice quiz.
  • Deployed a working application with App Check enforcement.
  • Published the source code with an MIT license and setup documentation.

What I learned

I learned that hybrid AI involves more than choosing a model. Browser support, available storage, model preparation, fallback behavior, and clear user consent all affect the experience.

I also learned how Firebase AI Logic, Firebase Hosting, and App Check work together in a deployed web application.

What's next for StudyRelay

I want to improve the formatting of generated study material, expand testing across supported devices, and add more interactive study activities.

StudyRelay currently does not save study sessions. AI-generated material can contain mistakes, so students should check explanations against their course materials.

Built With

Share this project:

Updates

Submission history