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-tap Pin 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 at 0.70× Slow offline speech, door codes, LOW-BATTERY VIEW (OLED dark mode), HOTEL GPS BEACON (0 KB distance & compass arrow), <0.2 KB "I Landed" SMS, one-tap SOS / ICE medical 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 Sync refreshes 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_CLOUD with gemini-3.5-flash-lite for multi-document ingestion, risk audit, and claim drafting. ONLY_ON_DEVICE and PREFER_ON_DEVICE with Chrome's Gemini Nano for Show Cards, Q&A, crisis playbooks, Vision Scanner, and Counter Mode. Structured output on both sides: responseJsonSchema in the cloud and responseConstraint on-device.
  • Firebase Platform. Remote Config selects the cloud model; App Check protects AI Logic; Anonymous Auth and Cloud Firestore (with persistentLocalCache and memoryLocalCache fallback) 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; callCloudWithRetry with real AbortSignal timeouts; navigator.storage.persist() + IndexedDB QuotaExceededError handling; and a deterministic local_fallback engine so an offline traveler never hits a dead end—always labeled honestly as local_fallback, never on_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 safe navigateFallbackDenylist.
  • 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

  1. 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.
  2. 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 in inCloudParams.generationConfig. Solving that took on-device JSON reliability from 0/8 to 8/8.
  3. Nano's tight context window, especially with Japanese and CJK text. Solved with a CJK-weighted token budget, focused prompts, and persistent local caching.
  4. Airport Wi-Fi that answers 200 OK with a captive portal login page. Solved with active captive-portal content-type probing, three connectivity states (Online / Low-Data / Offline), and a ⚡ 10s Burst Sync flow 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=trace and inspect real in_cloud, on_device, and local_fallback events 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
Share this project:

Updates

Submission history