Inspiration

"Mummy, na me. I dey use my friend phone." In Nigeria, messages like this arrive every day: fake bank alerts asking for your BVN and PIN, "I sent money to you by mistake", promos you never entered, jobs with a registration fee. My friends and family get them all the time.

Proof so far: 6/6 correct in my small on-device test (including 3 unseen messages). 4 testers sent written feedback, and 2 more coursemates tried it. Works with Wi-Fi off on desktop Chrome.

Students are a big target, because there's real pressure when "free money" appears. A fake "government empowerment" link keeps going round my school, promising students ₦50,000 if they enter their personal details to "claim" it. Some of my schoolmates nearly filled it in. When they tried ScamEye, they were happy that a tool like this exists, and that it still gives a check even without internet. When I showed a friend the first version, she sent it straight to her mum, because scammers had been messaging her.

Most scam checkers are built for American scams and American English. I wanted one that understands Nigerian tricks, explains itself in Pidgin, and keeps private messages on your own device whenever it can.

Who it's for

Nigerian students, parents and anyone new to mobile banking: people who receive these messages and just need a careful friend to look before they act.

ScamEye works in any browser, including on phones. On a phone, the AI check runs in the cloud (Firebase), and if the phone is offline, ScamEye still gives a basic check with its Nigerian scam rules. On desktop Chrome, the full AI check runs privately on the device with Gemini Nano, even with Wi-Fi off. Next step: an Android version with on-device Gemini Nano, so phones get the private, offline AI check too.

What early testers said

Four early testers (three students and a friend) sent written feedback after checking real scam messages they had received: a fake BVN "verification incomplete, your account may be blocked" threat, a "stranded, lost my phone, send ₦30,000" message and a fake ₦2,500 redelivery fee. All four said it helped them or someone they know avoid a scam. Two more of my coursemates checked the fake ₦50,000 "government empowerment" link and were relieved to have a tool that could tell them.

"It was fast." (Student, after ScamEye flagged the fake BVN message as a scam)

"You just saved my life, hahaha." (Student, on the "stranded, send ₦30,000" message)

"I and my siblings, cause we thought it was our dad." (Friend, on the same kind of message)

The same friend asked for one thing: "I hope the site doesn't crash." That's why ScamEye has four layers of fallback.

What it does

You paste a message and press Check. ScamEye:

  • gives a verdict: Likely scam, Suspicious or Probably safe
  • highlights the exact red-flag words in the message and explains each one
  • explains why, in English or Nigerian Pidgin, and can read the explanation aloud
  • plays a short voice clip of the verdict (my own voice)
  • gives clear next steps, plus a "Copy warning" button to share with family
  • shows where the check ran: 🔒 Checked on your device, ☁️ Cloud AI, or Basic check

How I built it with Firebase AI Logic

  • One getGenerativeModel call with InferenceMode.PREFER_ON_DEVICE: Gemini Nano in Chrome when it's available, Gemini in the cloud when it isn't.
  • Why on-device first: people paste private messages (bank alerts, family chats, account numbers), so those should stay on their computer whenever possible. The cloud is only a fallback.
  • response.inferenceSource drives the 🔒 / ☁️ badge, so users always know where their message went.
  • Warm-up: Gemini Nano is slow to start the first time, so ScamEye creates one session when the page opens and gives each check a fresh copy (clone()), so checks are faster and never mix messages.
  • A tiny on-device answer: a small model writes slowly on an ordinary laptop, so on-device it only returns a verdict, up to 3 exact phrases and up to 3 reason codes. The app turns those into full English and Pidgin explanations, then combines the result with Nigerian scam rules.
  • Cloud fallback: Firebase cloud (ONLY_IN_CLOUD, about 3 seconds) when on-device isn't ready or fails. If Firebase is down, my own server, then basic rules, so a user always gets an answer.
  • App Check with reCAPTCHA Enterprise protects the cloud calls (enforced: requests without a valid token are rejected). Remote Config can switch the cloud model from the Firebase console, with a safe default.
  • Plain HTML, CSS and JavaScript (no build step), Firebase JS SDK from Google's CDN, hosted on Vercel.

Built during the hackathon

ScamEye started on 14 Nov 2026 and was first entered in SafeSpace Hacks as a cloud-only app. For #BuildHybridAI (21 to 30 Nov 2026) I added: Firebase AI Logic hybrid inference (on-device Gemini Nano with cloud fallback), the warm on-device session, the tiny on-device answer combined with rules, App Check, Remote Config, the "Checked on your device" privacy badge, a test set (ScamEyeTest()), and the judges' quick-start in the README. The core value the original app brings: the Nigerian scam knowledge, the Pidgin explanations and the voice clips. It's already used by friends, family and schoolmates, who shared it with others. Code as submitted: release v2-hybridai.

Challenges I ran into

  • Speed. At first every on-device check took about 47 seconds and timed out. Logging the real errors showed two problems: a new session for every check, and a long answer. The warm session and the tiny answer brought it to about 6 to 13 seconds on my laptop.
  • Accuracy. The small model called everything "Suspicious", even a normal class message. Adding 3 worked examples and combining its answer with Nigerian scam rules fixed it: 6 out of 6 correct in my tests, including 3 messages it had never seen.
  • A 403 from the cloud. It turned out to be a settings issue in the Firebase console, not the code.
  • The cloud went down. During final testing, Google's cloud model returned "high demand" errors. ScamEye still gave the right verdict through its fallbacks, which is exactly why they exist.
  • Real vs fake. A real-looking airtime message ("Borrow airtime by dialing *303#") was marked Suspicious, not safe. I left it cautious, because SMS sender names can be faked, and the advice tells people to check with the official number.

Accomplishments that I'm proud of

  • It works with Wi-Fi off: the full AI check on desktop Chrome, and a basic rules check on phones.
  • Every layer has a fallback, so the app always answers.
  • It speaks Pidgin, which most scam tools don't.
  • Real students used it: all 4 testers who sent feedback said it helped them or someone they know avoid a scam.

What I learned

I'm a beginner, and this was my first time using on-device AI. I learned that small on-device models need small jobs, that real error logs beat guessing, and that privacy can be a design choice, not just a promise.

What's next for ScamEye

  • An Android app with on-device Gemini Nano through Firebase AI Logic, so phones get the private, offline AI check too
  • A Chrome extension, so people can check messages where they receive them
  • Firebase server prompt templates, so the instructions live on the server
  • Performance Monitoring to compare on-device and cloud speed for real users
  • A bigger test set of real Nigerian scam messages, collected with permission, including student-targeted "empowerment" and job scams
  • Partners: universities, telecoms, banks and consumer-protection groups

How to test it

  1. Open https://scameye.vercel.app in any browser, including a phone, and tap an example, such as "Bank: update your BVN". This uses the cloud AI (badge ☁️ Cloud AI).
  2. To see on-device AI: use desktop Chrome 139 or newer, open chrome://flags/#prompt-api-for-gemini-nano-multimodal-input, set it to Enabled, and restart Chrome. Open the site, click the page once, and wait for "🔒 On-device AI is ready" (the first model download can take a while). The badge then says 🔒 Checked on your device.
  3. Optional: once it's ready, turn off Wi-Fi and check another message. It still runs on the device.
  4. Optional: open the console (F12) and type ScamEyeTest() to run 3 sample checks.

No login is needed. The only key in the repo is the public Firebase web config key; cloud AI requests are protected by enforced App Check.

Built With

  • chrome-prompt-api
  • css3
  • firebase-ai-logic
  • firebase-app-check
  • firebase-remote-config
  • gemini
  • gemini-nano
  • html5
  • javascript
  • recaptcha-enterprise
  • vercel
Share this project:

Updates

Submission history