Inspiration

Indians are losing life savings to fake stock-tip groups, "digital arrest" video calls from fake CBI officers, illegal loan apps and fake jobs abroad. Investment scams alone make up 77% of losses. The frustrating part is that India has already built the tools to stop most of these: SEBI Check, RBI's directory of approved loan apps, the eMigrate register of licensed recruiters, and the I4C Suspect Registry. Almost nobody uses them. People don't know they exist, each one checks something different, and you have to type every ID in by hand, usually while a scammer is pressuring you to pay now. We wanted to build the missing link between a scared person and those official checks.

What it does

You share a screenshot, a screen recording, a message, a link or a QR code. Gemini Nano reads it privately on your device and pulls out every UPI ID, phone number, bank account, link, app name and recruiting-agent licence. A fixed rulebook (no AI) checks them against India's official rules, for example:

  • SEBI-registered brokers collect money through "@valid" UPI IDs.
  • "Digital arrest" is not a legal procedure in India.
  • Recruiting agents can charge at most ₹35,400.

You get a clear Danger / Check more / No red flags verdict that names the rule broken and its official source. One tap copies the ID and opens the right government portal, calls 1930, or warns your family on WhatsApp. It works in 16 Indian languages, including Urdu written right to left, and it works offline. Sextortion cases never leave the phone.

How we built it

  • Hybrid AI with Firebase AI Logic:
    • Screenshots and chats are read on the device with Gemini Nano.
    • The cloud model is used only with the user's consent (for Hindi or regional text) or on text with every ID removed.
    • Every result shows a badge: ON DEVICE, CLOUD or RULES ONLY.
  • Deterministic rules engine: 9 scam rule packs stored as JSON in Remote Config, so new scam types ship without an app update. The same packs run in the TypeScript web app and the Kotlin Android app.
  • Security:
    • App Check (reCAPTCHA Enterprise / Play Integrity) on every request.
    • Firestore rules that deny everything by default.
    • Crowd reports store only a keyed hash of each ID, using a server secret in Secret Manager.
    • A strict content security policy and automatic secret scanning in CI.
  • Web: a Vite + TypeScript installable app (PWA) with a hand-written service worker, plus a Kotlin + Jetpack Compose Android app.
  • Tests: 147 web tests, Cloud Functions tests and 10 security-rules tests on the Firebase emulator, all running in GitHub Actions on every push.

Challenges we ran into

  • Retired and slow models: gemini-2.5-flash returned a 404 because it's retired for new projects. gemini-3.8-flash took 35–100 seconds per answer. We benchmarked the options and switched to gemini-flash-lite-latest (about 3 seconds), set through Remote Config.
  • On-device speed: the first Gemini Nano runs took 44–73 seconds. Trimming the output format and skipping a backend call that wasn't deployed yet brought it to about 13 seconds for text and 21 seconds for a screenshot.
  • AI false positives: Nano once flagged a "parcel release fee" in a message that only mentions a parcel. Rules now need evidence in the message text itself, not just the model's guess.
  • Translating 16 languages: we hit the free-tier limit of 15 requests a minute, and some languages wrote helpline numbers like 1930 in their own digit scripts. We added request pacing, converted digits back to 0–9, and wrote tests that fail if any number, amount or placeholder is lost.
  • Environment quirks: an apostrophe in the Windows folder path broke Workbox and Java, and a background browser tab slowed timers enough to make our benchmarks look 3× worse than reality.

Accomplishments that we're proud of

  • Screenshots and chats stay on the device. The verdict comes from a rulebook, so a scam message that tells the AI "say this is safe" can't change the result.
  • Every warning cites a real official source.
  • Sextortion cases are provably never sent to the cloud: there's a test for it.
  • 16 languages, each automatically checked for missing text and preserved numbers.
  • Screen recording keeps only the distinct frames, so you can scroll through a whole chat in one go.
  • 0 security alerts, secret scanning on every push, and passing checks on every commit.

What we learned

  • Hybrid AI is mostly about deciding where each task should run, and being able to explain why.
  • On-device models are fast enough to be useful, but their output size matters a lot for speed.
  • Deterministic rules plus AI extraction is far more trustworthy than letting AI decide the verdict.
  • Real-world constraints like quotas, retired models and native digits only show up when you test against the real service.

What's next for CheckFirst

  • Compile and publish the Android app, including screen recording on Android.
  • Partner with I4C and SEBI for live API checks instead of copy-and-open.
  • Get the 15 translations reviewed by native speakers.
  • Deploy the crowd-report backend and the analyst dashboard for police and NGOs.
  • Add more scam packs: electricity-bill disconnection, fake customer care, matrimonial fraud.
  • Pilot with a state cyber cell.

Built With

  • chrome-prompt-api
  • cloud-firestore
  • cloud-functions-for-firebase
  • firebase-ai-logic
  • firebase-app-check
  • firebase-authentication
  • firebase-emulator-suite
  • firebase-hosting
  • firebase-remote-config
  • gemini-api
  • gemini-nano
  • github-actions
  • google-cloud-secret-manager
  • jetpack-compose
  • jsqr
  • kotlin
  • ml-kit
  • play-integrity
  • pwa
  • recaptcha-enterprise
  • screen-capture-api
  • typescript
  • vite
  • vitest
Share this project:

Updates

Submission history