-
-
Switch the box to Canada and the rules check both items again, with 0 model calls. The lotion is OK to pack.
-
Chrome reads the gift's label on the laptop itself, with 0 cloud calls. The verdict comes in 20.6 s: Take it out.
-
The model only reads the photo. The app's own USPS rules decide, and the card links the rule it matched.
-
The laptop read 5,000 mAh. After a yes, a cloud second look read 50,000 mAh, so the app shows both and asks.
-
The whole flow: a photo, a read on the device, the cloud only after a yes, the USPS rules decide, then the card.
-
The iPhone app in airplane mode: Apple's on-device model reads the label, with no network. Take it out.
-
The exact Firebase calls each app makes, from the shipped code, plus the console settings: AI Monitoring on, App Check enforced.
-
Same rules on Android. The Galaxy A16 has no model, so it asks, then reads in the cloud. The Pixel reads on the phone.
Inspiration
My mom, Bridget, has worked for the post office for over 30 years. When I asked her what goes wrong with boxes going abroad, she told me, "The problems that I've seen with shipping internationally were people sending cigarettes." She also named jewelry, coins and banknotes. A box like that gets packed at a kitchen table, one item at a time, and the rules live in a long USPS publication plus a separate list for each country. The Philippines list runs 12 lines and Canada's runs 35. And a country can close with no warning: in 2024, a strike stopped U.S. mail to Canada from November 29 to January 6, right through the holidays. None of that is visible at the table, so I built a check that runs right there, before the tape goes on.
What it does
- You pick the country and show it each item. My laptop reads the label itself, and the photo stays on the laptop unless you say yes to a second look in the cloud.
- The rules decide, not the model. Each card says OK to pack, Check this, or Take it out, and links the USPS rule it matched.
- For battery numbers it offers a second look in the cloud, only if you say yes. On my own power bank, the laptop read 5,000 mAh and the cloud read 50,000. The label says 50,000, so the app showed me both and asked me to pick.
- Switch the country and the rules check the whole box again, with no model call.
- I tested it on all three devices: Chrome on my MacBook Pro, a Pixel 10 and an iPhone 17 Pro. Each one read a label on the device, read one in the cloud, and read one with the network off. A Galaxy A16, a phone with no on-device model, asks first and then reads in the cloud. Every run is logged with its build and device in https://github.com/StephenSook/before-you-tape/blob/main/docs/TEST-MATRIX.md.
You can try nine real items at https://before-you-tape-2026.web.app/judge with no camera and no sign-in. The Android app installs from https://github.com/StephenSook/before-you-tape/releases/latest.
The people who helped
Faran at Pak Mail in Marietta offered to review our 40-item check. Kelli Mansure, Student Organizations Coordinator at Georgia State, connected me with the Filipino Student Association, and Georgia State's Indian Student Organization shared it. KSU's Office of Global Education passed it to international student staff and faculty, and Professor Mohammed Obeidat of KSU pointed me to the KSU entrepreneurship center. None of them endorses Before You Tape.
Under the hood: how we use Firebase
Honestly, Firebase made this a lot more fun to build. I didn't run a server at all. The whole app is AI Logic, Firestore, Auth, Remote Config and Hosting, so I spent my time on the rules and the label reads. Here's every piece we use and why.
Firebase AI Logic powers the AI in all three apps. On iPhone we follow Firebase's guide for Apple's Foundation Models framework.
- Hybrid inference: in Chrome, getAI with GoogleAIBackend reads labels in ONLY_ON_DEVICE mode on Chrome's built-in model. After you say yes, reads use PREFER_ON_DEVICE, and the second look runs in the cloud on gemini-3.5-flash-lite. On Android, Firebase.ai with GenerativeBackend.googleAI() uses the same routes, with Gemini Nano on a Pixel. On iPhone, Apple's on-device model (SystemLanguageModel) reads the label, and the cloud route is Gemini through geminiLanguageModel(name:) in FirebaseAILogic. On the web and Android, each card shows where the read ran, from the SDK's inferenceSource. On iPhone it shows which model answered.
- AI Monitoring is on, and label text is kept out of the logs. Each user is limited to 20 requests a minute, and only signed-in users can call the model.
App Check guards AI Logic and Firestore, so only our real apps get in: reCAPTCHA Enterprise on the web, Play Integrity on Android and App Attest on iPhone, with limited-use tokens and replay protection on.
Cloud Firestore holds the rule editions the app checks against, a sender's saved boxes, and the sessions for our 40-item blind check.
Remote Config's kill_cloud switch can pause every cloud read live, and cloud checks stay off until the browser has fetched it.
Authentication uses anonymous sign-in, so nobody needs an account and AI Logic still knows a real app user is calling.
Crashlytics catches uncaught errors on the web app with the message removed in the browser, so no label text or item name leaves the page; we planted a test error in a production build and saw it arrive.
We also use Performance Monitoring on the web and Android, and Hosting for the site and the /judge page.
What I learned and what's next
The on-device models are really good at reading a label and not good at deciding what it means for the mail. So the model reads and the rules decide. Next, a person checks every line of the Canada and Philippines rules one by one. Today each line was checked against the USPS listing by two AI reviews and approved by me as a whole, not line by line. Then more countries, one at a time.
Before You Tape isn't affiliated with or approved by the US Postal Service.