-
-
Paid 32 h. You logged 35.5 h. $52.50 short. The app does the math from your own shifts.
-
One line logs a shift. In Chrome and on Android, the model on the device can read it with no signal.
-
A written lunch break counts. Read by rules on your device.
-
A note to payroll, written. You read it and change it before you send it.
-
You turn cloud help on. No cloud model sees your words until you do.
-
Every model answer is counted. On the device, in the cloud, waiting and rejected.
-
Rules from official pages. Each rule shows its quote and where it came from.
Judging criteria at a glance
Count My Hours is a hybrid AI app for hourly workers, built with Firebase AI Logic. Gemini Nano reads on the device in Chrome and on Android, Apple Foundation Models read on iPhone, and Gemini models in the cloud read the long public labour rules page after you say yes.
Technological Implementation: "How well is the project built, and how effectively does it use Firebase AI Logic hybrid inference as part of the solution?" Every model call goes through Firebase AI Logic, and each of the 5 features has its own inference mode. A typed line about a shift runs PREFER_ON_DEVICE. A posted schedule and a pay stub run ONLY_ON_DEVICE, because they hold pay and co workers' names. The long public labour rules page runs ONLY_IN_CLOUD from a queue that waits for signal. The note to payroll runs PREFER_IN_CLOUD. Each answer shows which side wrote it, read from the SDK's own inferenceSource. Plain code checks every answer before it is used: each time must be found in your own line, a shift may not be longer than 16 hours, and code, not the model, turns "Tuesday" into a date; each stub value must carry its quote; a rule card must quote the page word for word; and the note to payroll is refused if the model wrote any number, so code fills every hour and dollar on the device. App Check guards every call to the cloud model: on 22 Nov a call with no token got HTTP 401 and a call with a token got HTTP 200. Proof: 84 of 84 Firestore rules tests pass, and all 67 refusal cases fail against a rules file that allows everything; 403 shared logic, 456 web, 798 Android and 237 browser tests pass.
Design: "Does the project deliver a complete, coherent product experience, not just a technical proof of concept?" It is a whole app on web, Android and iPhone: a first run tour, setup with your pay rate, overtime rule and rounding, a week view with hours this week and this pay period, one line shift entry, a posted schedule photo (Chrome and Android; on iPhone you type the schedule), pay stubs, the stub check, the verdict, a note to payroll, an export of your record, public rule cards, the on device model status, a preview of exactly what will leave the device before any send, a ledger of which side answered, and Delete my data. One line in, one answer out: "Paid 32 h. You logged 35.5 h. $52.50 short." The video shows a shift read on the device with no signal at 0:00, the stub check at 0:55, Android at 2:15 and the iPad at 2:28.
Potential Impact: "Does the project make a credible, specific case for solving a real problem for a real audience, and does the solution address it based on what's demonstrated?" It is for an hourly worker in a shop, a kitchen, a warehouse or care work who is paid for fewer hours than they worked and has no record to prove it. The app keeps that record on the worker's own phone, in a stockroom or break room with no signal. On payday it compares the stub with the record and names the gap in hours and money. It checks overtime with the federal rule, "after 40 hours of work in a workweek" (U.S. Department of Labor), and shows what rounding of start and end times does to your pay, a practice that 29 CFR 785.48 accepts only when it "will not result, over a period of time, in failure to compensate the employees properly". In fiscal year 2025 the U.S. Department of Labor recovered "more than $259 million in back wages for nearly 177,000 employees", "an average of $1,465 per worker" (https://www.dol.gov/newsroom/releases/whd/whd20260108, read 27 Nov 2026). We ran it on the Department of Labor's own case in Fact Sheet #23: "a 45 hour workweek" at "a regular rate of $9.00" (https://www.dol.gov/agencies/whd/fact-sheets/23-flsa-overtime-pay, read 27 Nov 2026). On the live site, with the federal rule (over 40 hours a week at 1.5 times), five lines of 09:00 to 18:00 were read by rules, Week showed 45 h, and the stub check gave Regular hours 40, Overtime hours 5 and Expected gross pay $427.50: the fact sheet's $405 plus $22.50. A stub of $427.50 came back "Match."
Quality of the Idea: "Is this a creative, non-obvious use of Firebase AI Logic, and does the team show genuine understanding of the problem space?" The record belongs to the worker, not the employer. The private papers, the stub and the schedule, are read only on the device. The public labour rules page, which no phone model can hold, is read in the cloud. A cloud model can also word the note to payroll, or read a shift line the device cannot. Each send happens only after you see the exact words and say yes. The note to payroll is polite by design: the app refuses a note that says "wage theft" or "illegal", and the note request holds no name, no employer and none of your numbers.
In short
Keep your own record of the hours you worked. On payday, check the pay stub against it. Ask payroll about a gap with a polite note.
How we used Firebase AI Logic
| Feature | Inference mode |
|---|---|
| Typed line to shift | PREFER_ON_DEVICE |
| Posted schedule picture to my row | ONLY_ON_DEVICE |
| Pay stub to fields | ONLY_ON_DEVICE |
| Labour rules page to rule cards | ONLY_IN_CLOUD, queued offline |
| Note to payroll | PREFER_IN_CLOUD |
Before any send, What goes up shows the exact words that will leave the device; nothing goes until you press Send. The model lists are held in Remote Config. Cloud Firestore keeps your record, also with no signal. App Check guards every call to the cloud model (reCAPTCHA Enterprise on the web, Play Integrity on Android, App Attest on iPhone). Firebase Authentication signs you in as a guest, and you can link a Google account. Firebase Hosting serves the web app.
A typed shift line is read by plain rules first (date, start, end and an unpaid break), with no model and nothing sent; the screen says Read by rules. A line the rules cannot read goes to the on device model, and the screen says On this device. Only with no device model and Cloud help on can the line go to the cloud, and then What goes up shows it first and nothing leaves until you press Send.
Features and functionality
- Setup: pay rate, overtime rule and rounding of start and end times.
- Week: hours this week, hours this pay period and the next payday (the day after the pay period ends). Week opens on the week of your latest shift.
- Add shift: one typed line becomes the date, start, end and unpaid break, marked Read by rules or On this device.
- Schedule photo: your own row from a posted schedule, read on the device only, in Chrome and on Android.
- Pay stubs: read on the device only; each value keeps the words it came from.
- Verdict: paid hours against your hours, the gap in hours and money, and what rounding changes.
- Note to payroll: worded by the model with no numbers or names; the app fills them in on the device.
- Record: an export of your hours.
- Rules: paste the official labour rules page; each card quotes it word for word.
- Ledger and Delete my data.
Value proposition
A pay stub says what you were paid for. Count My Hours keeps what you actually worked, on your own phone, and says the gap in plain words.
Built during the submission period
All of Count My Hours was built during the submission period; its first commit is 6a88aa0 on 22 Nov 2026. It starts from our own shared hybrid kit, written for these entries in the same period, and uses open source libraries under their licences.
Check it
Open https://count-my-hours.web.app in Chrome, take the tour and set up your hours. In Add a shift, type "Worked Tuesday Nov 17 from 9 am to 5:30 pm, 30 min unpaid lunch" and press Read shift: the fields fill with November 17, 9:00 AM, 5:30 PM and a 30 minute break, marked Read by rules, with no signal needed.
Testing
See field 4.11.
Built With
- apple-foundation-models
- cloud-firestore
- firebase-ai-logic
- firebase-app-check
- firebase-authentication
- firebase-hosting
- firebase-remote-config
- gemini
- gemini-nano
- jetpack-compose
- kotlin
- playwright
- preact
- recaptcha-enterprise
- swift
- swiftui
- typescript
- vite
- vitest