-
-
MissionMind: See the consequences. Make the decision. A spaceflight emergency copilot built on Firebase AI Logic hybrid inference.
-
Online, Firebase AI Logic routes to Gemini 2.5 Flash Lite in the cloud. The badge and the latency are read from the actual response.
-
When the link drops, the router switches to Gemini Nano in Chrome with no network requests. The badge shows the real inference source.
-
Three futures side by side with safety scores and deltas. A what-if ("What if the repair takes 50 minutes?") reshuffles the ranking.
-
A deterministic physics engine projects each option 180 minutes ahead. Gemini never calculates the numbers, it only explains them.
-
If Gemini Nano isn't installed, the app says so and labels its output "Local rules fallback". Non-AI output is never presented as Nano.
-
Physics engine, then the Firebase AI Logic router (cloud or on-device), then the commander's decision logged to Firestore.
Inspiration
In a spaceflight emergency (a cabin leak, a power bus fault, a thermal loop failure), the crew usually has checklists. What they don't have is time to answer the hardest question: what happens next if we choose option A, B or C? We wanted a tool that shows the consequences of each option before the commander commits. Connectivity in space is also unreliable, with blackouts and long delays, so we knew the AI part had to work without a network.
What it does
MissionMind is a decision-support console for emergencies. For each scenario it: shows structured telemetry and the available actions, simulates each option over the next 180 minutes with a deterministic physics engine, compares the three futures side by side with safety scores, answers natural-language what-ifs such as "What if the repair takes 50 minutes?", re-running the physics and explaining why the ranking changed, explains its recommendation as structured output: the action, why, confidence, the critical assumption, and the next question to check, logs the commander's decision to a Firestore "black box."
Gemini never invents physics. The simulation produces the numbers, and the AI only explains them.
How we built it with Firebase AI Logic
All AI calls go through the firebase/ai SDK using hybrid inference. When online, PREFER_IN_CLOUD routes to Gemini 2.5 Flash Lite. When the link is lost, either through our "Simulate Comm Loss" demo toggle or a real offline event, we switch to ONLY_ON_DEVICE and run Gemini Nano in Chrome with no network requests. Cloud calls have a 5-second timeout and a try/catch, so a slow or failed request falls back to local execution too. Every answer shows its real inference source and measured latency. We also use App Check, Remote Config for safety thresholds, and Firestore for the decision log. The front end is React 19, TypeScript, Vite, Tailwind and Recharts.
Challenges we ran into Getting the hybrid behaviour right. Our first setup preferred on-device even when online, so judges would never have seen the cloud-to-device switch. We changed the online mode to prefer the cloud and use on device for comm loss. Outdated models. Our first cloud model was retired, so we moved to Gemini 2.5 Flash Lite. Gemini Nano isn't on every machine. We added availability detection, an on-screen notice, and a clearly labelled rules fallback, so non-AI output is never presented as Nano. Cost protection for a public demo. We added client-side caps and set Google Cloud quotas. Accomplishments we're proud of A real, visible online-to-offline switch, shown with live source badges, not a mock-up. Keeping physics and generative AI strictly separate, so the explanations stay tied to computed numbers. Honest labelling of everything: the prototype disclaimer, "illustrative" flight rules, and the local-fallback badge.
What we learned Hybrid inference is most useful when you design for failure: deciding what happens when the model is missing, the network is slow, or a quota runs out, and making that visible to the user. We also learned to check claims in our own docs, such as measured latency instead of marketing numbers.
What's next More scenarios (thermal, fire, medical), real telemetry-format ingestion, and uncertainty ranges in the projections. We would also test the on-device path across more Chrome builds and extend to Android with Gemini Nano.
Built during the hackathon period Built between Nov 11 and Nov 30, 2026. AI coding assistants used: e.g. Google Antigravity and Gemini CLI.
Limitations A prototype. Telemetry is simulated and the flight rules are illustrative, not official NASA rules. It is not certified flight software.
Built With
- chrome-built-in-ai
- cloud-firestore
- express.js
- firebase
- firebase-ai-logic
- firebase-app-check
- firebase-authentication
- firebase-hosting
- firebase-remote-config
- gemini
- gemini-2.5-flash-lite
- gemini-nano
- hybrid-ai
- node.js
- on-device-ai
- react
- recharts
- tailwindcss
- typescript
- vite