Inspiration
People who cannot see a photo cannot tell what it shows before they send it: a bank card on the desk, a letter, an open screen, a face. Research on assistive photo services found that more than 10% of the images blind users submitted contained private content. Cloud tools that describe photos send the whole image away before the person can decide anything.
What it does
SafeSnap is a privacy checkpoint that runs before you share a photo.
It looks for six kinds of possibly private items: faces, card-like objects, documents, screens, address-like text, and other items that may be private. For each one it reports only a category, a position on a fixed 3x3 grid, a size and a confidence. It never reads or repeats any text. It never says a photo is "safe". The best it says is "I didn't find anything private, but I can't be certain." You then choose: keep it private (a short description made on the device), send it to the cloud for a detailed description (you confirm for that photo), or retake or crop. Every result shows which engine ran: on-device or cloud. SafeSnap stores nothing. The photo is processed in the browser tab. How we built it (Firebase AI Logic) Hybrid inference with Firebase AI Logic, called directly in the code path judges can read: ONLY_ON_DEVICE (Gemini Nano in Chrome) for the check, and ONLY_IN_CLOUD for the consented detailed description. We chose these on purpose instead of PREFER_ON_DEVICE, because a privacy tool must not move a photo to the cloud on its own. If Nano is unavailable the app says so and asks first. Files: src/scanner/firebaseScanner.ts, src/describe/describe.ts, src/firebase/client.ts. One shared structured-output schema for both engines, strict validation of every model answer, and inferenceSource to show the real engine in the interface. App Check with reCAPTCHA Enterprise, Remote Config for the cloud model name, Firebase Hosting, and an API key restricted to the app's domains. Vite, TypeScript, Three.js scenery (lazy-loaded and decorative only), Vitest (22 unit tests) and Playwright with axe-core (25 end-to-end tests). Screen-reader-first design: every state change is announced in a live region, full keyboard use, visible focus, reduced-motion support. Challenges Hardware. Gemini Nano runs only on computers Chrome rates as capable. A weaker laptop is refused ("Very Low" performance class). We built a /device-check.html page that tells a person plainly whether their computer qualifies, and the app shows a clear message instead of failing or silently using the cloud. Bugs only a real device could show. On the first real Nano run we found two real bugs: the SDK reports on_device in lowercase, so our app labelled on-device scans "cloud", and Chrome cannot decode SVG with createImageBitmap, so our sample photo failed. Both are fixed and covered by tests. Slow first run. On a laptop without a strong graphics card the first on-device call can take minutes, so we added a Cancel button, elapsed-time status and a 5-minute no-progress timeout. Making honesty testable. An evaluation page (/eval.html) runs 40 synthetic scenes with known ground truth and reports detection, misses, false alarms and timing. Accomplishments A hybrid design where the privacy decision belongs to the user at every step. Gemini Nano ran a real on-device scan end to end on a laptop ("Checked on this device. The photo did not leave your computer."). A measured comparison of both engines on 40 drawn test scenes: Real items found Right grid cell Clean photos wrongly flagged Median time On device, Gemini Nano 30 of 36 (83%) 33% 10 of 10 45 s Cloud, Gemini 36 of 36 (100%) 97% 4 of 10 2.2 s What we learned
Hybrid AI is not only about speed or cost. Where the model runs is a privacy decision, so the interface must show it and the user must control it. Our numbers show why: Nano is a private first pass that over-flags and is slow on weak hardware, the cloud model is more precise but needs consent. That is exactly why SafeSnap never says a photo is safe and leaves the choice to the user.
What's next
Evaluation on real photos with fake private data, more languages as Gemini Nano adds them, faster on-device inference as Chrome improves, and phone support when on-device models allow it.
Honest limits Gemini Nano worked on one laptop (16 GB RAM, 8 cores) and was refused on another that Chrome rates "Very Low". On unsupported computers SafeSnap says so and never falls back to the cloud silently. Nano is coarse: on our test scenes it found 83% of real items but placed only a third in the right grid cell and flagged every clean photo. Our first Nano evaluation run was mislabelled "cloud" by the app because of the bug above. It was fixed afterwards, and the run is identified as on-device by its timing (about 45 s per image against 2 s in the cloud). Raw run files are in docs/eval-runs/ in the repository. The 40 test scenes are drawn, not real photos, so they are easier than real use. Built during the submission period
SafeSnap was created from scratch on 26 to 29 November 2026. No code from earlier projects was reused.
AI assistance disclosure
Built with the help of an AI coding assistant (Claude). The author directed the idea, design and decisions, and tested the live app.## Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for SafeSnap
Built With
- chrome-prompt-api
- firebase-ai-logic
- firebase-app-check
- firebase-hosting
- firebase-remote-config
- gemini
- gemini-nano
- playwright
- three.js
- typescript
- vite