Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Airlock

Inspiration

Teams want LLM help on real documents — incident reports, customer threads, contracts — but every paste is a leak risk: names, emails, credentials, internal IDs. Airlock makes the privacy boundary visible and enforceable. It scrubs PII locally, tokenizes what it finds, and shows you exactly what will cross the airlock before anything leaves the machine.

What it does

  • Paste or load a document → Scan for PII runs a structured-extraction prompt through Firebase AI Logic in PREFER_ON_DEVICE mode (Gemini Nano via the Prompt API; automatic cloud fallback to gemini-3.8-flash on unsupported browsers).
  • Every detected entity renders as a clickable [type-N] token in the Airlock view — click to keep or release it; the sanitized text rebuilds instantly.
  • Send sanitized → cloud runs PREFER_IN_CLOUD analysis (summary, action items, reply draft) on the tokenized text only. Q&A follows the same rule.
  • A Data passport logs each inference: which backend served it (inferenceSource), and how many bytes left the device.

How we built it

  • React 19 + TypeScript + Vite SPA on Firebase Hosting.
  • firebase/ai — one getAI app, two GenerativeModels: scrubber (PREFER_ON_DEVICE → cloud fallback) and analyst (PREFER_IN_CLOUD). response.inferenceSource drives the backend badge on every result — the UI can't mislabel where inference ran.
  • Firebase App Check with reCAPTCHA Enterprise (debug tokens for dev).
  • Deterministic redaction engine: longest-match, non-overlapping range resolution produces stable [type-N] placeholders; toggling a token rebuilds the sanitized view without re-scanning.

Challenges we ran into

Making the trust boundary legible: users don't believe privacy claims, so every inference carries a machine-checkable provenance badge (inferenceSource) rather than a UI promise. Getting deterministic tokenization right — stable [type-N] placeholders across edits — required a longest-match, non-overlapping range resolver instead of naive regex replacement.

Accomplishments that we're proud of

The airlock metaphor is enforced end-to-end: the cloud literally never receives raw text, and the Data passport proves it per request — bytes-out per inference is auditable in the UI.

What we learned

Hybrid inference is a product feature, not just an architecture detail: users change what they're willing to paste when the on-device path is visible and verifiable.

What's next for Airlock

  • Signed "release receipts" — an auditable record of which entities crossed the airlock per request.
  • Policy presets (GDPR/HIPAA/SOC2) tuned entity lists.
  • A browser-extension version that intercepts pastes into any AI chat.

Built With

Share this project:

Updates

Submission history