Inspiration

People sign leases, loan agreements, insurance policies, employment contracts, and medical bills every day without fully understanding them—and these documents are packed with personal data (SSNs, IBANs, addresses, names). Uploading raw documents to cloud LLMs exposes sensitive PII.

What It Does

Plainly is a privacy-first document explainer that:

  1. Redacts locally first using a two-layer Local Shield (deterministic regex + Luhn validators merged with an on-device LLM).
  2. Enforces a Mandatory Review Gate before any cloud call is permitted.
  3. Routes by sensitivity using Firebase AI Logic's four hybrid modes (ONLY_ON_DEVICE, PREFER_ON_DEVICE, PREFER_IN_CLOUD, ONLY_IN_CLOUD).
  4. Explains & Audits: Generates Instant Summaries, Deep Review clause risk tables, and Q&A with citations on RedactedText only, rehydrates placeholders locally, and proves "Personal details sent: 0" via an exportable Privacy Ledger.

How We Built It

  • Type-Safe Privacy Boundary: Distinct RawText and RedactedText types in TypeScript, Kotlin, and Swift.
  • Firebase AI Logic: Hybrid inference across Web (Gemini Nano), Android (Gemini Nano), and iOS (Apple Foundation Models).
  • Firebase Security: App Check, Anonymous Auth, Remote Config kill-switch, and Firestore rules rejecting any raw-text fields.
  • Benchmarking: 10-document synthetic corpus with automated precision/recall evaluation (docs/BENCHMARK.md).

Built With

Share this project:

Updates

Submission history