Prize category

Entered for Best iOS. Counter Check is an iPhone app built on Firebase AI Logic's hybrid inference: Apple Vision reads the service sheet on the phone, plain code marks a line "on the factory schedule" with the page number, Apple Foundation Models on the device label what is left, and only the lines the phone could not decide go to Gemini in the cloud, without the owner's name or VIN.

Why it matters

In 2025 the average U.S. household spent $1,241 on vehicle maintenance and repairs (Bureau of Labor Statistics, Consumer Expenditure Survey). When that money is spent at a service counter, it is decided line by line, and Counter Check puts the factory schedule and its page next to each line before you sign.

Inspiration

At the service counter I had a minimum sheet, a recommended sheet, and an order to sign that did not show the prices. In a 2016 AAA national survey, 63 percent of U.S. drivers said they do not trust auto repair shops; 76 percent of them cited recommendations of unnecessary services.

Before deciding what to authorize, I wanted a different kind of answer: which instruction in the factory schedule supports this line?

What it does

Counter Check reads a service sheet from a photo and checks every line against the manufacturer's maintenance schedule for the car's model year and mileage. The screen separates the sheet into four groups. On the factory schedule means the line is exactly a service the schedule lists as due now, with the page number. Dealer add-ons covers products, treatments, flushes, plans, and services due at another mileage, and it names the due part when one is bundled inside. Repair or fee covers wear-based repairs, diagnosis and fees, where only the technician knows whether the work is needed. Unknown is what the phone could not decide. In a synthetic test it called none of 1,152 add-on and repair lines factory-scheduled (upper bound 0.33 %) and found 77 % of the lines that were on the schedule.

A worked example on a real dealer sheet from my own 20,000-mile visit (redacted, no per-line prices, $801.05 printed total). The app read 8 of the 9 service lines; a redaction box made it join two of them. It put the oil change, tire rotation and inspection on the factory schedule and flagged the other five lines for questions: three as dealer add-ons, one as a repair to ask about, and one it could not tell. All four lines I declined that day are among the flagged ones. Shop charges, tax and fees stay apart, the first question asks the advisor to price each line, and nothing left the phone. It is one sheet, so this is an example, not an accuracy measurement.

"At my 20,000-mile service the dealer sheet came to $801. I turned down four add-ons and signed for $391. Counter Check flags those lines before you sign."

— Mikhail Oskola, builder

A due part inside a bundle is named only when it is a due item of the schedule card, and a not-due item shows the mileage it belongs to. The questions for the service advisor at the end are written by code from those labels. Not on the factory schedule does not mean not needed: the schedule is a minimum, and the app never calls an off-schedule line unnecessary. A flag is a question for the service advisor before you pay, which the app writes for you.

Sums are computed by code in integer cents, per group and for the whole sheet, and checked against the total printed on the sheet. The price tower has one block per line, its height taken from the price. A sheet that prints only a total is still checked line by line; the app says the lines have no prices and asks the advisor to price them, and shop charges, tax and fees are kept apart from the services.

Other apps check a dealer sheet against the factory schedule too, but with a hand-typed table for a few makes and a cloud model deciding which lines are "Factory Mandated". Here the schedule card is read from the manufacturer's published maintenance guide, checked against the page image, and on the phone only plain code can mark a line "on the factory schedule"; the on-device model never does. Apps that benchmark each line of a repair quote against typical or fair-market prices, some with manufacturer-style service schedules beside it, are asking what a line should cost. Counter Check asks a different question of every line: is this service in the factory schedule at this mileage, and on which page? And where a whole bill goes to a server-side model that can label a line a predatory upsell, Counter Check reads the sheet on the device, sends only the lines it cannot settle in one cloud call without the owner's name or VIN, and never calls an off-schedule line unnecessary. Repairs, diagnosis and fees get their own label.

How we built it

On the phone, the route gives the one decision that costs money to code, and the on-device model only labels what is left. The cloud sees only the lines the phone could not decide.

On the phone, "on the factory schedule" is set only by code, never by a model. A strict matcher checks the line against the schedule card: the card's own name or alias for the due item, plus a short hand-written list of dealer wordings for oil and filter and routine inspections, and nothing else besides neutral words. Apple Foundation Models, through Firebase AI Logic's .systemModel(), then labels what the code did not match, as an add-on or as a repair or fee, and those lines stay on the phone. If the model says "on schedule" without the code agreeing, the line waits for the cloud. An answer that did not come from the on-device model is refused.

The lines the phone could not decide go to Gemini 3.5 Flash-Lite through Firebase AI Logic, one request per sheet, and only those lines. The cloud may call such a line "on the factory schedule". Nothing is sent until you tap Ask the cloud, and the app shows exactly what will be sent first: the line texts, the size in bytes, and the whole request. It is the same request that is sent. Header lines, the name, VIN, repair order, advisor, phone, e-mail and address, and lines without a price are never sent. A VIN, e-mail or phone number inside a line is masked, and the request is checked again just before sending.

The schedule card is read from Firestore. App Check is enforced for Firebase AI Logic and Firestore: a request without a valid token is refused. A strong cloud model built the cards from the manufacturer's published maintenance guide. We checked them against the page image and cache each card once per vehicle. A maintenance guide of 66 to 82 pages is beyond the on-device model, and a wrong card is the most dangerous kind of error, because every line is checked against it. Firestore stores schedule cards only, never lines, prices, names or VINs.

Apple Vision reads the sheet into text and code groups it into lines, estimates the photo's skew, aligns prices to names, and turns price tokens into integer cents. This is a system OCR API, not Firebase AI Logic. The app warns when one price may have slid to the next line, and it never moves a price on its own.

The on-device step uses Firebase Apple SDK 12.19.3.

Challenges we ran into

Reading the sheet correctly does not fix a wrong schedule. When a cloud model built the cards from the guides, it turned an inspection into a replacement, and generating the card again did not remove an error the model kept making. The cards we ship are checked against the PDF page, and every scheduled match the code makes carries its page.

Prices were the other trap. A price read onto the wrong line keeps the same total, so checking the totals cannot catch it. The app warns when exactly one line at the top or the bottom has no price, the usual sign of such a shift, and then it does not fill that line from the printed total.

Accomplishments that we're proud of

We measured the mistake we most wanted to avoid. In a synthetic test of 1,152 add-on and repair lines the app called none of them factory-scheduled (0 of 1,152, upper bound 0.33 %). The cloud step was replayed from recorded answers and spot-checked live. The app found 77 % of the lines that were on the factory schedule.

The sheets in that test are synthetic, rendered and degraded like phone photos, and a single labeller marked the truth. The demo sheets are sample sheets made for this demo: no real dealer, customer or VIN appears on them. Two cars have schedule cards checked against the guide page, a 2024 Lexus RX 350 at 20,000 miles (page 50) and a 2024 Toyota RAV4 at 30,000 miles (page 41). The demo video and the two schedule-card screenshots in the gallery were recorded with an earlier build whose card footer reads "Checked by a person against the factory guide". That was wrong: the two cards were checked against the guide pages by a model reviewer, not by a person, and the current build says "Checked against the factory guide page".

What we learned

Sometimes the useful answer is "here is the schedule page", and sometimes it is "ask why this repair is needed". A due maintenance item, a bundled extra and a repair that depends on the car's condition get separate groups, not one green or red verdict.

What's next for Counter Check

The app runs today with the sample sheet and the cloud step on tap. Not measured yet: real phone photos, with glare, folds and handwriting; speed on an iPhone; a second labeller. Cards are published for the two vehicles above, and the next ones get the same check against the page before they ship.

Pre-existing work

This project builds on two of our earlier hackathon projects. Menu Line Check (AWS Builder Center hackathon, October 2026) read a car-service menu photo line by line; reused here are about a quarter of the synthetic sheet-line names in the shared fixtures, 33 service names from its menu set, and the way the measurement rendered and degraded synthetic sheets and called Apple Vision. No Menu Line Check code is in this repository. Line by Line (PayPal AI Hackathon, November 2026) worked in the same sheet-to-lines domain; no code or data from it is in this repository.

New in this project: the comparison with the factory maintenance schedule, the schedule cards, the strict matcher and the labels, the route between the phone and the cloud with Firebase AI Logic, the iOS app, the line grouping for skewed photos, the price and total checks, and all of the code here.

How AI was used

Two model calls in the app, both through Firebase AI Logic. Apple Foundation Models on the device (.systemModel()) labels the lines the strict code did not match, as an add-on or a repair or fee, and an answer that did not come from the on-device model is refused. Gemini 3.5 Flash-Lite in the cloud takes one request per sheet for the undecided lines, after the app has shown the request. A strong cloud model built the schedule cards from the public factory guides once per vehicle, outside the app, and we checked the published cards against the PDF page. "On the factory schedule" on the phone is set only by code.

Built With

  • apple-foundation-models
  • apple-vision
  • cloud-firestore
  • firebase-ai-logic
  • firebase-app-check
  • firebase-remote-config
  • gemini
  • swift
  • swiftui
  • typescript
Share this project:

Updates

Submission history