Inspiration

Most AI productivity tools send every single note and document to the cloud, raising privacy concerns, incurring ongoing API costs, and requiring constant internet connectivity[cite: 15]. On the other hand, pure on-device AI is private and free, but fails completely on machines that lack high-end GPUs or sufficient VRAM[cite: 15]. I built HybridDesk AI for the #BuildHybridAI 2026 hackathon to bridge this gap—giving users local-first privacy whenever their hardware supports it, and reliable cloud intelligence when it doesn't[cite: 15].

What it does

HybridDesk AI is a privacy-first document and study-note summarizer powered by Firebase AI Logic[cite: 15]:

  • On-Device Inference (Local): On supported devices (Chrome v139+ with sufficient hardware), text is summarized 100% locally on the machine using Chrome's built-in Gemini Nano model—with zero cloud costs, zero latency, and complete privacy[cite: 15].
  • Seamless Cloud Fallback: If local execution is unavailable (due to hardware limits, low VRAM, or browser settings), the app automatically detects this and routes the prompt to Gemini Flash in the cloud without crashing or interrupting the workflow[cite: 15].
  • Live Transparency Badges: The UI explicitly displays a green On-Device (Private) badge or a blue Cloud Fallback badge based on where inference actually ran[cite: 15].
  • Simulate On-Device Toggle: An interactive developer toggle that lets anyone preview and test the local-inference UI state even on unsupported hardware[cite: 15].
  • Product-Ready Study Utilities: Includes sample presets, one-click summary copying, and instant .txt file export for study notes[cite: 15].

How I built it

  • Frontend & Framework: Built with Next.js (App Router), TypeScript, and Tailwind CSS for a fast, responsive interface[cite: 15].
  • Hybrid AI Engine: Integrated the Firebase AI Logic SDK (firebase/ai v12.5+) configured with InferenceMode.PREFER_ON_DEVICE[cite: 15]:
import { getAI, getGenerativeModel, GoogleAIBackend, InferenceMode } from "firebase/ai";

const ai = getAI(app, { backend: new GoogleAIBackend() });

// Tries on-device Gemini Nano first, and automatically falls back to Gemini Flash in the cloud
const model = getGenerativeModel(ai, { 
  mode: InferenceMode.PREFER_ON_DEVICE 
});
  • User Activation & Source Tracking: Triggered initializeDeviceModel() upon user click to satisfy Chrome's user-activation requirement, and inspected result.response.inferenceSource to dynamically render the active inference badge.

  • Security & Deployment: Protected API endpoints with Firebase App Check and deployed the production app on Vercel.

Challenges I ran into

  • Hardware Constraints (Device Capable: false): My current development laptop does not meet Chrome's strict hardware class requirements for running Gemini Nano locally. Rather than treating this as a blocker, I used it to rigorously test real-world fallback reliability and engineered a "Simulate On-Device" toggle so judges and users on standard laptops can still experience both UI states.

  • Browser User-Activation Rules: Ensuring local model initialization complied cleanly with Chrome's user-gesture requirements without throwing unhandled promise rejections.

Accomplishments that I'm proud of

  • Delivering a genuinely resilient, crash-free hybrid AI architecture where hardware limitations are handled gracefully behind the scenes.

  • Building a clean, transparent UX that educates the user on whether their data stayed on their device or used cloud fallback.

  • Shipping a complete, end-to-end product with quick presets, clipboard copy, .txt export, and Firebase App Check security.

What I learned

  • How Firebase AI Logic simplifies complex hybrid routing (PREFER_ON_DEVICE) into a clean, maintainable SDK workflow.

  • How to inspect inferenceSource metadata to build trust-focused AI interfaces.

  • Designing graceful degradation and interactive simulation states when developing hardware-dependent browser AI features.

What's next for HybridDesk AI

  • Multi-Format Document Uploads: Direct client-side parsing for .pdf, .docx, and .md files before summarization.
  • Custom Summary Styles: Letting users switch between bullet points, executive summaries, and flashcard Q&A generation.
  • Offline Queue & Local History: Storing summarized study notes locally using IndexedDB for full offline access.

Built With

Share this project:

Updates

Submission history