Inspiration

Older adults are one of the fastest-growing groups online, and the group that loses the most when something goes wrong. By 2030, one in six people in the world will be 60 or older, and most of them now bank, shop, and talk to family online, often alone. In 2025, the FBI's Internet Crime Complaint Center received about 201,000 complaints from people over 60. They reported about $7.7 billion in losses, 37% more than the year before and over a third of all reported losses. Fake tech support, fake bank alerts, and "you've won" prizes are the usual way in.

The tools meant to protect them don't fit. Parental controls are built for children and security suites for IT departments. Keyword blockers both over-block and miss what matters. Our own extension, Senior SafeSurf, was a keyword and site blocker. Its v1.3 blocked any page containing "history" because the word contains "tor", and it missed scams, which rarely use a word on a list. We wanted protection that understands what a page is doing, without sending a parent's browsing to a server. Hybrid inference made that possible.

What it does

Senior SafeSurf is a free Chrome extension for older adults and the people who look after them. It blocks sites and words, warns about scams, and adds a large-button speed dial and an on-page reading toolbar. Version 2 adds an AI check built on Firebase AI Logic. It runs Gemini Nano on the computer first, and uses Gemini in the cloud only when the on-device model is missing or unsure, and only if the user agreed.

When a page contains a blocked word, the extension covers the page and asks the AI whether the mention is harmful in context. A museum page about frontier history stays open, and an online casino is blocked with a plain-language reason. Pages that ask for a password or card number get a background scam check, even without a blocked word, and a confident phishing verdict shows a large warning banner. The user can also click "Is this page safe?" in the popup or on the on-page toolbar for an instant answer. Every warning has a one-click "Block this site" button.

Every result says where it was checked: "Checked on this computer (Gemini Nano)" or "Checked in the cloud". Users choose Off, On this computer only, Hybrid, or Cloud only, and cloud checks need explicit consent. An optional family account, backed by Firebase Authentication and Cloud Firestore, lets a son or daughter see the week's blocks and warnings from their own Chrome. The AI then writes a short summary they can read in seconds.

How we built it

The extension is Manifest V3 with no remote code, so the Firebase JavaScript SDK is bundled with esbuild and runs in an offscreen document. Content scripts only build a small page snapshot of at most 3 KB: site name, path without the query string, title, headings, about 600 characters around the matched word, and three form flags. The service worker applies the user's switches and a fail-safe policy. The offscreen engine then calls Firebase AI Logic in on-device mode, with the same JSON schema for Gemini Nano and the cloud model, so both return a verdict, category, confidence, and reason. In hybrid mode, if Nano's confidence is low, the same snapshot is checked once more in the cloud.

Firebase AI Logic requires App Check, and reCAPTCHA can't run on a chrome-extension origin. So cloud calls go through a small page on Firebase Hosting, loaded in a hidden iframe. There, App Check is backed by reCAPTCHA Enterprise. The page answers only our extension IDs and accepts only two request types, so no debug token or secret ships in the extension or the repository. Remote Config holds a cloud kill switch, the cloud model name, the escalation threshold, extra prompt guidance, and the photo API key. Firestore stores the optional family log, with rules that allow only the owner to read it and make entries append-only.

We also rebuilt the parts of v1.3 that the AI relies on. Matching is now whole-word and Unicode-aware, with Chinese and Japanese words still matched without word boundaries. Page rescans are debounced, and single-page-app navigations are handled. The master password is now stored as a PBKDF2 hash instead of plain text. The paid PRO tier, the Stripe checkout, and the PHP license server were removed, so every feature is free.

Challenges we ran into

App Check was the biggest one. The obvious workaround, an App Check debug token inside the extension, would have published a credential anyone could copy. Hosting a cloud bridge with real reCAPTCHA Enterprise attestation solved it. We then learned that automated headless browsers fail that attestation while a normal Chrome passes, which changed how we tested.

On-device inference needed its own care. The model downloads about 4 GB once, and only after a user click, so the welcome screen checks the computer, starts the download on "Start protecting", and explains exactly why when a computer can't run it. We also found that in prefer-on-device mode the SDK doesn't fall back to the cloud if the on-device call throws or stalls. So the engine gives Nano a time limit and does the cloud fallback itself. Keyword protection stays active whenever the AI is off, unavailable, or too slow, so a page is never left unprotected.

Keeping the photo API key out of the repository without a paid Firebase plan took one more step. The key now lives in Remote Config, filled in at deploy time, and photo searches run inside the engine with a fixed category list.

Accomplishments that we're proud of

The hybrid split is a privacy policy, not just a fallback. The private, every-page work runs on the computer for free. The cloud only sees a small snapshot, only with consent, and every result says which one answered. The AI makes keyword protection less annoying and more effective at once: harmless mentions stop getting blocked, and scams with no blocked word get caught.

We're also proud that the whole thing stays simple for the people it's for: big buttons, one question ("Is this page safe?"), plain sentences, and one-click blocking. Everything is free, and there's no paid tier. A fresh clone from GitHub builds and runs without any keys.

What we learned

On-device AI changes what's reasonable to do in a browser. Checking every page you visit would be too costly and too invasive in the cloud, but it's fine on the computer. We learned to design for the cases where the model isn't there: older hardware, the first download, browsers without Nano. That meant treating the cloud as a consented fallback and keywords as a floor.

We also learned how much of Firebase fits a browser extension once you work with Manifest V3's rules. That means a bundled SDK, an offscreen document, the web-extension build of Auth, and a hosted page wherever reCAPTCHA has to run on a real web origin.

What's next for SafeSurf

Next we'll publish v2 to the Chrome Web Store as a free update to the existing listing, so current and new users get the AI protection. We want on-device checks in more languages as Gemini Nano adds them, starting with Italian, Spanish, German, and French. A web dashboard on Firebase Hosting would let family members read the shared log from a phone, and gentle weekly summaries could be sent by email.

Further out, we'd like a mobile companion that uses Firebase AI Logic's hybrid inference on Android and iOS with the same verdict schema. We'd also like a production App Check setup that doesn't depend on the hosted bridge.

Built With

  • chrome
  • chrome-prompt-api
  • cloud-firestore
  • css3
  • declarativenetrequest
  • esbuild
  • firebase
  • firebase-ai-logic
  • firebase-app-check
  • firebase-authentication
  • firebase-hosting
  • firebase-remote-config
  • gemini
  • gemini-nano
  • github
  • html5
  • javascript
  • manifest-v3
  • recaptcha-enterprise
  • vitest
  • web-crypto
Share this project:

Updates

Submission history