-
-
Touchdown, the offline travel copilot. Wheels down. Signal off. Ready.
-
Before you fly: Gemini in the cloud parses your itinerary into one arrival kit and flags the last-train cutoff as high risk.
-
Network off: Gemini Nano writes four show cards in Japanese on the device. Each one is stamped on_device with its latency.
-
A real phone in Airplane Mode: the taxi card opens full screen and plays the Japanese phrase aloud. No AI model on the phone.
-
The last train is gone. Still offline, Gemini Nano builds a playbook from your own kit: booking code, hotel, and a card to show.
-
Scan a receipt with no network: 22,000 JPY read on the device and converted to $137.90 USD, queued to sync later.
-
Every answer says where it ran. The routing log tags each call in_cloud, on_device or local_fallback, with its latency.
-
Proof it is local: chrome://on-device-internals shows gemma4_component Ready, the Gemini Nano 4 model behind the on-device calls.
Inspiration
Flight PA-702 lands at Tokyo Narita at 10:15 PM. The last express train left at 21:44. That fact was sitting in a booking email, three documents away from the hotel's late-night door code, and nobody put the two together.
This is the first 30 minutes after landing. Roaming hasn't started, the eSIM needs Wi-Fi to activate, battery is low, and everything you need is in an inbox you can't open. It is also the exact moment every cloud AI assistant stops working.
An on-device model doesn't fix it alone: it can't parse five long booking PDFs, and today it doesn't run on the phone in your hand.
So I stopped trying to reach the cloud from the gate. Touchdown gives each model the job it can actually do, at the time it can do it: Gemini in the cloud prepares everything before you fly, Gemini Nano guides you offline when the plan breaks, and your phone carries the entire kit in Airplane Mode with 0 KB of data.
What it does
Touchdown prepares your arrival before takeoff and keeps guiding you after signal drops. It is live at https://touchdown-copilot.web.app (inspect live routing at https://touchdown-copilot.web.app/?view=trace).
- 01 · MY TRIP (Before takeoff, in the cloud). Starting from a blank slate (
/?view=build), Gemini (gemini-3.5-flash-lite,ONLY_IN_CLOUD) reads messy confirmations (flights, stays, trains, insurance;.txt,.md,.pdf,.eml,.html), builds one Arrival Kit for single- or multi-leg trips, caches the latest exchange rate for offline use, and audits for arrival risks—like landing 31 minutes after the last 21:44 Narita Express. It handles hotels and self check-in stays with lockbox PINs. - 02 · ON ARRIVAL (Offline, on your laptop with Gemini Nano). Flip Airplane Mode on. Chrome Gemini Nano (
ONLY_ON_DEVICE/PREFER_ON_DEVICE) writes bilingual Show Cards in the destination language (with custom cards and topic packs), builds 5 crisis playbooks (delayed flight, lost bag, missed last train, lost passport, medical), powers Counter Mode (with one-tapPin to Pocket), answers free-form kit questions (Ask & Live Card), and runs the Vision Scanner—flagging menu allergens into an instant Red-Alert Allergy Card or scanning receipts straight into Save to Expense + Vault, staying on-device offline and saving files in a local-only vault. - Zero-Network Pocket PWA (On landing, on your phone in Airplane Mode). Scan a zero-network
#kit=QR code (or sync via Firestore offline persistence) to open the installable Pocket PWA with 0 KB of data: full-screen Show Cards read aloud at0.70× Slowoffline speech, door codes,LOW-BATTERY VIEW(OLED dark mode),HOTEL GPS BEACON(0 KB distance & compass arrow),<0.2 KB"I Landed"SMS, one-tapSOS / ICEmedical card, a ten-tile Point-It board, currency converter, and quick expense logging. - 03 · EXPENSES (When weak Wi-Fi or signal returns). Captive Wi-Fi detection warns against fake airport login pages,
⚡ 10s Burst Syncrefreshes essentials on weak links, and Gemini in the cloud turns your offline log, category breakdown, PNR, and receipts into an airline or insurer claim ready for one tap:Open in Mail App(mailto:).
Three connectivity states drive routing—Online, Low-Data, and Offline—and every answer honestly displays its source (in_cloud, on_device, or local_fallback). Also included: a catalog of 199 countries and territories with emergency numbers, 29 languages, a local-only Document Vault (0 bytes uploaded; stored in browser IndexedDB with persistent storage), a trip budget meter, .ics / .csv / .json exports, and a printable backup sheet.
How we built it
- Firebase AI Logic (
[email protected]), one mode per job.ONLY_IN_CLOUDwithgemini-3.5-flash-litefor multi-document ingestion, risk audit, and claim drafting.ONLY_ON_DEVICEandPREFER_ON_DEVICEwith Chrome's Gemini Nano for Show Cards, Q&A, crisis playbooks, Vision Scanner, and Counter Mode. Structured output on both sides:responseJsonSchemain the cloud andresponseConstrainton-device. - Firebase Platform. Remote Config selects the cloud model; App Check protects AI Logic; Anonymous Auth and Cloud Firestore (with
persistentLocalCacheandmemoryLocalCachefallback) store trips; Firebase Hosting serves the PWA with strict CSP and HSTS headers. - Offline-first & on-device resilience. A CJK-weighted token budget to stay within Nano's context window; JSON recovery for malformed outputs; persistent local caching and request deduplication;
callCloudWithRetrywith realAbortSignaltimeouts;navigator.storage.persist()+ IndexedDBQuotaExceededErrorhandling; and a deterministiclocal_fallbackengine so an offline traveler never hits a dead end—always labeled honestly aslocal_fallback, neveron_device. - Privacy & Security. Firestore rules with bounded arrays, immutable owners, and append-only phone companion logs; zero sensitive vault documents ever uploaded (
0 bytes); random trip IDs; Workbox precaching with safenavigateFallbackDenylist. - Stack & Quality. Vite, React, TypeScript,
vite-plugin-pwa(Workbox), Web Speech API. 45 unit tests across 12 Vitest suites, zero TypeScript errors, and verified offline mobile Pocket QA. - Design. A calm, daylight-paper and matte-carbon instrument identity inspired by airport split-flap boards (
Archivo+IBM Plex Mono, single Solari Yellow accent on carbon, and the Flare mark).
Challenges we ran into
- Nano doesn't run in Chrome on phones yet. Instead of faking it, the laptop compiles the kit with Gemini Nano and hands it directly to the phone via a zero-network
#kit=QR payload (plus Firestore offline persistence), so the phone runs in true Airplane Mode with 0 KB and no local model. - Structured output differs between cloud and device. In hybrid mode a top-level schema is ignored on-device. It has to go inside
onDeviceParams.promptOptions.responseConstraint, with the cloud schema ininCloudParams.generationConfig. Solving that took on-device JSON reliability from 0/8 to 8/8. - Nano's tight context window, especially with Japanese and CJK text. Solved with a CJK-weighted token budget, focused prompts, and persistent local caching.
- Airport Wi-Fi that answers
200 OKwith a captive portal login page. Solved with active captive-portal content-type probing, three connectivity states (Online / Low-Data / Offline), and a⚡ 10s Burst Syncflow for weak links.
Accomplishments that we're proud of
- The full trip works end-to-end on a live production URL (
https://touchdown-copilot.web.app): cloud prep before takeoff, Gemini Nano offline on the laptop, a real phone in Airplane Mode via zero-network#kit=QR, and cloud claim drafting on reconnect. - Radical routing transparency: anyone can open
/?view=traceand inspect realin_cloud,on_device, andlocal_fallbackevents with latency, alongside a local-only IndexedDB vault with zero network imports. - A cohesive, calm product built solo—complete with a 15-page brand identity manual, 45 passing unit tests across 12 suites, strict Firestore security rules, and 199-country / 29-language coverage.
What we learned
On-device AI shines when you give it the jobs the cloud cannot reach—not when you treat it as a cheaper copy of the cloud. Connectivity while traveling is a spectrum, and calm, honest UI beats hype every time a traveler is tired at an unfamiliar gate.
What's next for Touchdown
Run the exact same on-device Nano flows natively inside mobile Chrome as soon as Prompt API reaches phones; add collaborative family/group kit sharing over peer-to-peer WebRTC/QR; and keep per-country transit and emergency guidance fresh via Firebase Remote Config.
Prior Work & Data Disclosure
producto/ was built from scratch during the #BuildHybridAI 2026 submission window. The Firebase AI Logic initialization pattern (App Check plus responseConstraint on-device and responseJsonSchema in the cloud) was first validated in a separate test harness, tecnico/probe-hybrid/, on Nov 10–11, 2026. AI coding tools were used during development. All sample itineraries, signs, menus, and receipts are synthetic and contain no real personal data. Licensed under Apache 2.0.
Built With
- chrome-built-in-ai
- cloud-firestore
- firebase
- firebase-ai-logic
- firebase-app-check
- firebase-authentication
- firebase-hosting
- firebase-remote-config
- gemini-3.5-flash-lite
- gemini-nano
- indexeddb
- pwa
- react
- typescript
- vite
- web-speech-api
