Inspiration
I built Scam Shield around a question: what would I want beside my grandmother if a parcel notice asked her to pay $1.95 within 30 minutes? The small fee feels routine; the timer and card form create pressure. The grandmother and parcel page in this demo are fictional. I have not claimed she received this message or that this prototype has protected her.
What it does
Scam Shield gives a calm, plain-language warning beside a page, with one reason and a safe next step. It can say unsure when signs are mixed. The installed Chrome extension takes a bounded snapshot of the active page. After the user enables private screening and keeps the side panel open, it automatically checks a page with the on-device model. A suspicious result displays a dismissible warning on the page and a red extension badge. The user can also request a check of a page or selected screenshot and see whether inference ran on the device or in the cloud. A separate second-opinion action asks the cloud for more detail.
The public HTTPS checker lets judges try a real Firebase AI Logic text check without installing anything or creating an account. It has an explicit private-model path and a separate cloud-fallback button. Its parcel illustration is a sample, clearly labelled as such.
How we built it
Scam Shield is a Manifest V3 Chrome extension in TypeScript, built with Vite. It calls Firebase AI Logic at runtime. Automatic checks use InferenceMode.ONLY_ON_DEVICE, so they do not fall back to the cloud. Requested checks use PREFER_ON_DEVICE; a deliberate second opinion uses ONLY_IN_CLOUD. The SDK's returned inference source drives the label in the UI. Firebase App Check protects cloud requests, and Firebase Remote Config controls the cloud model and screening limits. The hosted checker separately uses Firebase AI Logic and reCAPTCHA Enterprise App Check. The code is public under Apache-2.0.
I used Codex to inspect the implementation and trust boundaries, improve result handling and source disclosure, build inert synthetic fixtures, construct an archived-page evaluation, and verify the flows in Chrome. The project is a Web/Chrome entry; it does not claim an Android or iOS build.
Challenges and what we learned
A model verdict needs an honest source label, an uncertainty state, and advice that does not depend on the suspicious page. We constrained automatic screening to the on-device path. When a Google Search-grounded second opinion hit an HTTP 429 quota response, the app retried without web search and disclosed that it could not independently verify the page; a successful grounded answer remains unverified. A cloud screenshot check was verified on a synthetic parcel image. The local model requires compatible Chrome and device support; it is not a universal install experience yet.
Evaluation
In a single fresh pass over 80 archived, publisher-labelled page snapshots, Scam Shield marked 30 of 40 scams suspicious, nine unsure, none safe, and one timed out. For 40 legitimate pages, it marked one suspicious, 21 unsure, and 18 safe. All 79 completed checks reported on-device inference; none reported cloud. These were static extracted text/features, not live page visits. Verdicts varied in repeat runs, and these counts are not a live-browsing accuracy or prevented-harm estimate. The repository includes the selection method and raw metadata-only results. A separate eight-page inert synthetic set exercised the extension's requested cloud path, and a real installed-extension capture shows its on-device warning on a synthetic local parcel page.
Try it
- Open the public checker in Chrome. On supported hardware, select a fictional example, click Prepare private model, then Check privately on this device. The result identifies where inference ran. Check with cloud fallback is an explicit requested check if the local model is unavailable; remove personal details before using it.
- For the companion extension, follow the README to build and load the unpacked extension in compatible desktop Chrome. Open its side panel, click Turn on private screening, and keep the panel open. No Firebase App Check token registration is needed for the private route. Try the inert local parcel page in the repository's
evaluation/fixturesfolder to see an automatic warning. Optional extension cloud features need owner-assisted per-install App Check debug-token registration.
What is next
Reduce installation friction, refine the high number of unsure verdicts while watching false alarms, broaden tests with consented live-page scenarios and older-adult usability sessions, and provide a production extension attestation route. Scam Shield is decision support, not a guarantee; important requests should be checked through an official app or a phone number already trusted.
Built With
- chrome
- firebase-ai-logic
- firebase-app-check
- firebase-remote-config
- gemini-nano
- typescript
- vite