Inspiration

Most scams, viruses and malware attacks shows up in three places that feel ordinary. A phishing email about a parcel held at customs. An SMS that says a bank transfer will go through unless you send the code. A job offer that lands as a DM in a social inbox and wants a registration fee first. That is the kind of message people forward to a friend, or worse, they tap it.

Often the last step is a website. The email, the text, or the DM is only there to get you onto a look-like login page, a fake checkout, or a download that should never be opened. People need a second look at the message, and a second look at the address itself, in words they can trust.

Email, SMS texts, and social DMs are the places people most want that second look. They are also the places many people do not want to drop into a random cloud box. A lot of the people who need this live on a phone, or on a connection they pay for by the megabyte. CheckFirst started from that tension. If hybrid inference is real, a checker for everyday Google users should try to stay on the device first, and only go to the cloud when the device cannot do the job.

What it does

CheckFirst has two modes: Message and Website.

In Message mode, paste a phishing email, an SMS text, a social inbox DM, a link, an invoice, or a screenshot, or right-click selected text in Chrome. CheckFirst gives a plain-English verdict: a risk score from 0 to 100, a Likely scam / Looks clear / Be careful label, Why chips for the red flags, and what to do next. The point is that these scams do not live in one channel. They arrive wherever people already read messages.

In Website mode, paste a website address, or right-click a link or a page in Chrome and choose "Check this website with CheckFirst". The result is not a 0 to 100 score. It is one of five plain words: Good, Cautious, Risky, Bad, or Malicious. The check looks at the address itself (look- alike hosts, odd endings, hidden redirects, raw IPs), asks Google Safe Browsing through our helper if that service is connected, can use domain age, and can ask the same hybrid AI to explain the verdict in ordinary language. We send only the website address to the helper and to Safe browsing, not the rest of a private message.

A well-known address such as google.com comes out Good. A look-alike login address on a throwaway domain comes out Risky or Bad. An official Google Safe Browsing test URL comes out Malicious once Safe Browsing is connected.

Every result shows where the AI ran, how long it took, and why that route was chosen: An instant scan runs in the browser, with no AI. It flags look-alike domains, link shorteners, raw IPs, urgency, and requests for codes or passwords. It works offline and feeds those signals into the model.

A website address scan also runs in the browser first, then the helper can add Safe Browsing and domain-age signals.

Firebase AI Logic prefers on-device Gemini Nano for private messages, screenshots, and website explanations, so the content can stay on the device.

If this computer has no local model, cloud Gemini is used automatically, so a phone or an older laptop still gets a full check.

Long emails and PDFs go to the cloud, because they sit outside the on-device window and input types.

Private mode is a user guarantee for Message checks: on-device only, nothing is uploaded. The toggle applies to messages and screenshots. Website checks send only the address to the helper for Safe Browsing and domain age.

Second opinion is a user-chosen cloud pass when you want another look. Message checks and website checks each use a shared JSON schema on both AI paths, so the UI stays the same. If Safe Browsing has already flagged an address, the verdict stays Malicious. The model is not allowed to talk that down. You can save or share a warning card from a result, and share the warning instead of the original message or link. History stays in this browser only.

How we built it

The site is a Vite app. All model calls go through Firebase AI Logic ( firebase/ai ) with InferenceMode.PREFER_ON_DEVICE and cloud Gemini 3.5 Flash Lite as the fallback. App check is on for the hosted path.

The production site uses reCAPTCHA Enterprise for app check. The production chrome extension cannot run reCAPTCHA, so a small helper ( checkfirst-appcheck.onrender.com ) mints a short-lived App Check token for the pinned extension ID aahdbhdmlfblabbdhoffijbkndlenjcf . The same helper also exposes POST /url-check for Google Safe Browsing Lookup API v4 and a domain-age lookup. The Safe Browsing API key

stays on the server, never in the website bundle or the repo. The helper allowlists only the live site origin and that extension origin, rate-limits by IP, and does not log tokens. The site and helper are hosted on Render. The public repo is https://github.com/Nwa-Ani/checkfirst. Website verdicts are decided in shared, network-free code ( src/url-signals.js ) so the site, the extension, the helper, and the tests all use the same five-way scale. The hosted product on main ( a31ac32 ) is the Message plus Website build.

The Chrome extension is Manifest V3. The Firebase SDK is bundled, so the popup loads no remote scripts. Right-click a link or the page and choose "Check this website with CheckFirst", or right-click selected text and choose "Check this text with CheckFirst". "Open full check" sends the text or address to the live site in a URL fragment ( #check=... or #site=... ), never in the query string.

Install the production extension (unpacked zip)

  1. Unzip checkfirst-extension.zip .
  2. In Chrome, open chrome://extensions .
  3. Turn on Developer mode.
  4. Click Load unpacked and select the unzipped folder.
  5. Confirm the extension ID is aahdbhdmlfblabbdhoffijbkndlenjcf .

For the current Website-aware extension, build from the repo with npm run build:ext (this is the production-style build; do not ship npm run build:ext:dev ). Load the generated dist-extension/ folder the same way, not the extension/ source folder. If you attach a zip on Devpost, rebuild it from this commit so Website mode is included

Challenges we ran into

The hard part was not drawing a score or giving a verdict. It was making every path honest and shippable. App Check is enforced on Firebase AI Logic. That is the right default, but it splits the product in two. The hosted site can use reCAPTCHA Enterprise. Extension pages cannot. Shipping a production extension that still gets a cloud fallback meant a tiny token helper, a pinned extension ID, a tight origin allowlist, and production Vite builds that strip the App Check debug token so it never lands in a public bundle.

Website checks needed a different kind of honesty than message scores. A number from 0 to 100 is the wrong shape for "is this page genuine?" We used five plain words, Good, Cautious, Risky, Bad, and Malicious, and we kept Google Safe Browsing on the helper so the API key never entered the public site bundle. If the key is missing, the address scan and the hybrid AI still run, and the result says so, instead of pretending there was a Safe Browsing miss. If Safe Browsing has a hit, the AI cannot downgrade it

The two AI paths also had to return the same shape. If on-device output and cloud output drifted, the Why chips and the card would lie. We used a shared JSON schema on both routes, one for messages and one for websites, and always show the source badge, including when the check falls back to the instant scan. A practical testing wrinkle: the Chrome on our build box ignores --load-extension , so we could not open chrome-extension:// pages in automation. We still verified the production zip against the live helper, including token minting for the pinned ID and cloud checks for both a scam sample and a safe sample

Accomplishments that we're proud of

It is a real, hosted product, not a local demo.

On 21 November 2026 we ran the live site in headless Chrome after the hosted domain was added to the reCAPTCHA key. A locked-account message with a look-alike login domain, urgency, and a request for a one-time code scored 100, verdict Likely scam, in about 11 seconds. The badge showed Google cloud, and the model was Gemini 3.5 Flash Lite, because that test browser has no on-device model. The Why chips named the pressure, the request for a code, and the fake domain.

A normal lunch plan, "Hey, are we still meeting for lunch at 1pm tomorrow?", scored 0, verdict Looks clear, in about 10 seconds, on the same path.

App Check exchanged a reCAPTCHA Enterprise token with HTTP 200. Both generateContent calls returned 200. There was no debug-token exchange.

The product is meant for the three places these messages usually arrive: email, SMS, and social inbox DMs. The demo on the live site walks a generic customs-fee phishing email (risk 100, Likely scam, about 2 to 3 seconds), a bank-style SMS that asks for an OTP (risk 95, Likely scam, about 1 second), and a job-offer DM that wants a registration fee sent to a wallet (risk 95, Likely scam, about 1 second), then a safe lunch plan for contrast (risk 0, Looks clear, about 1 second). The production extension popup scored the same customs-fee email at 100, Likely scam.

All five of those checks ran on Google cloud with Gemini 3.5 Flash Lite, because that test browser has no on-device model. All of those samples are text only, with no real brand logos. Website mode is live on the same site. A well-known address such as google.com comes out Good (address scan plus Google Safe Browsing, with no warning on the list). A look-alike login address on a throwaway domain comes out Bad.

An address that hides a long redirect can come out Risky. On the live site, the official Google Safe Browsing malware test URL on testsafebrowsing.appspot.com came back Malicious, with Why chips naming the Safe Browsing flag, in about 1 second. The badge showed Google cloud, and the model was gemini 3.5 Flash Lite

The helper returned 200 on /health . A request from a bad Origin was rejected with 403. Requests from https://checkfirst.onrender.com and from chrome-extension://aahdbhdmlfblabbdhoffijbkndlenjcf returned 200 and a token. The production extension bundle then used that path for a cloud check: the same scam text scored 100, the lunch plan scored 0, both in_cloud , with generateContent 200.

The instant scan, which does not need App Check, also scores that scam at 100 and the lunch plan at 0, so the tool still helps when AI is unavailable. The unit tests for the message scanner, the website verdicts, the samples, and the helper rules all passed (32/32).

We also care about how it feels. The Night Signal UI uses a score or a plain website verdict, labels, icons, and dashed or dotted chips so the result is not red versus green alone. The shareable warning card is meant for a family chat: send the warning, not the original message or link

What we learned

Hybrid is a product decision, not only a model switch. People need to see where a check ran, and they need a mode that promises the message will not leave the device. App Check changes the architecture once you leave the web page. A site and an extension that share one Firebase app still need two attestation paths. The instant scan is not a fallback in the sad sense. It is the first useful answer, it works offline, and it makes the model better by handing it the red flags it already found. A website verdict has to stay plain, and a model must not be allowed to talk a Safe Browsing hit down to Good

What's next for CheckFirst

An Android build on the same Firebase AI Logic SDK, so the same hybrid route can live in a phone app. Remote Config for risk thresholds and route rules, so we can tune them without a redeploy.

Built With

Share this project:

Updates

Submission history