HybridScribe is a notes workspace built entirely on Firebase AI Logic's hybrid inference. Every AI feature runs through the Firebase AI Logic SDK (firebase/ai) — no other model API is called anywhere in the app.
The idea. Most note AI sends everything to the cloud. But a two-line meeting note doesn't need a frontier model: it needs speed, privacy, and zero cost. HybridScribe routes each task by an explicit policy, and shows its work — every result card displays where inference actually ran (read from response.inferenceSource), the mode that was requested, the measured latency, and a one-line rationale.
Features
- TL;DR — one/two-sentence summary of any note.
- Tags & mood — structured JSON output (tags, mood, language) using a response schema on both routes (responseSchema in the cloud, responseConstraint on-device).
- Deep brief — a structured Markdown brief: key points, decisions, risks & open questions.
- Action items — an interactive checklist extracted from the note.
- Translate brief — translate a brief or TL;DR into Japanese, Spanish, German, or French.
- Notes persist in localStorage; a Gemini Nano availability chip shows on-device status live.
How Firebase AI Logic is used
- One getAI(app, { backend: new GoogleAIBackend() }) instance powers everything.
- Routing policy (ROUTING_POLICY in src/ai.js): TL;DR and Tags & mood request InferenceMode.PREFER_ON_DEVICE for notes up to 600 characters — fast, private, free, offline-capable via Gemini Nano in Chrome — and PREFER_IN_CLOUD beyond that. Deep briefs, action items, and translations always request PREFER_IN_CLOUD with gemini-3.5-flash-lite, where longer context and synthesis quality matter.
- Firebase AI Logic handles the fallback between on-device and cloud; the UI labels the route that actually ran via response.inferenceSource, and says so when the badge reflects the requested mode instead.
- App Check uses Fraud Defense (reCAPTCHA Enterprise) via ReCaptchaEnterpriseProvider; the site key ships in src/firebase-config.js. A console-registered debug token can be supplied per browser via localStorage.APPCHECK_DEBUG_TOKEN for local/automated testing (no token value is shipped in code).
- The SDK is loaded lazily via dynamic import through a CDN import map, so the app has zero build step and deploys as plain static files.
Why hybrid matters here: short, sensitive notes stay on the device (privacy, latency, cost, offline), while long or complex work gets cloud quality — and the user can see and audit every routing decision. That's the hybrid pattern Firebase AI Logic was designed for, made visible.
Tech stack: Vanilla JavaScript + CSS (no framework, no build step), Firebase JS SDK 13 (firebase/app, firebase/ai, firebase/app-check), GitHub Pages / Firebase Hosting.
Try it: Live with the real Firebase project at https://starwingmaxx.github.io/hybridscribe/ (repo: https://github.com/starwingmaxx/hybridscribe). If the config in src/firebase-config.js is replaced with placeholders, the same code runs in a clearly-labeled Demo Mode (deterministic local mock with simulated routes), so anyone can explore the full UX without a Firebase project.
Built With
- ai
- css
- firebase
- gemini
- javascript
- logic
- nano