taste of T
BostonHacks · Eats and Streets track
Inspiration
Beli changed how we talk about food. You log a place, rank it against the places you already love, and suddenly your list says something about you. But Beli stops at the list. It tells you where you have been, not where to go tonight — and it certainly does not get you across Boston to get there.
That gap is what we wanted to incentivize. We kept running into the same Boston problem: four friends, a group chat, forty minutes of "idk where do you want to go," and then someone notices the kitchen closes at ten and the night dies. The T is right there. The restaurants are right there. The decision is the hard part.
So taste of T is Beli's taste graph pointed outward: keep the ranking and the memory, add a reason to leave the house. Points for actually showing up, extra for taking the T or the bus, extra for bringing friends, and a map that treats the MBTA as the menu.
What it does
Spin the T. Pick how far (0.5 to 5 miles), a budget, and a craving. The app ranks places near you, takes a weighted-random pick from your top six, and turns it into a quest. The payout scales with the place: a 100-point base, plus 10 per mile up to 50, times a price multiplier (1× to 4×), rounded to five — so a cheap slice nearby is 100 and a $$$$ dinner across town is 600. "Let's Go" starts recording the trip.
Squads. One friend creates an adventure and gets a four-letter code. Everyone joins, the host starts, and the group gets a deck of ten places. Everyone swipes; the top five become the plan. Halal, kosher and allergies are hard filters; vegetarian and vegan are softened, so a vegan gets a full deck marked "likely has vegan options" instead of an empty one.
The map. The real MBTA network — every subway line and branch, 125 stations — with live train positions, the stations you have stamped, and the route to your pick by T and bus. It draws itself offline from a committed snapshot by default and switches to Google Maps when you turn it on. Below the map: what is trending this week.
Trips. A Strava-style path to dinner: walking versus bus/T, distance, time, and a live group map where everyone converges on the restaurant, drawn as it grows.
Rewards. Photograph the receipt and claim points. A GPS check-in, a recorded trip, or a verified ride proves you were actually there. Verified bus and T rides earn extra, and groups multiply the payout.
Rewards shop. Spend points on a free coffee, a dessert, $5 off, a Bluebikes day pass, or $10 off the group's bill. Vouchers last 30 days, and nine achievements worth 750 points sit alongside them.
Installable. A PWA that installs from Safari to the home screen, guest mode for judges, and a
/demopresenter view that puts the live app inside an iPhone frame.
How we built it
Design first. We built the whole thing in Figma before writing screens: an iOS-flavored system (large titles, inset-grouped lists, a blurred tab bar, light and dark) on a lavender-and-plum palette. Then we ported the tokens into Tailwind 4 theme variables, so components use bg-grouped, text-plum, and border-separator instead of one-off hex codes. A Figma Make prototype served as the clickable spec for the flows and caught layout problems before they were code.
The app is Next.js 16 (App Router), React 19, and TypeScript, with Tailwind 4, Prisma 7 over libSQL (SQLite locally, Turso for a hosted deploy), and Vitest for the logic. API routes stay thin: authenticate, validate with Zod, call one feature function, map errors.
Auth is a signed httpOnly session cookie, scrypt-hashed passwords, rate-limited login, guest accounts that upgrade in place, and Google sign-in where the ID token is verified server-side against Google's JWKS.
Places come from Google Places API (New) on the server, cached in memory only (Google's terms do not let us store the content), with 32 fictional Boston places as a fallback so the app works with an empty .env. Photos are proxied through our own route with the food shots first, so a card shows the dumplings instead of the storefront.
The map is offline-first: the committed MBTA snapshot is decoded into SVG lines and stations, so it costs no Google quota and works with no signal. Google Maps is a switch (NEXT_PUBLIC_MAP=google) over the same data, and a bad key or a dead connection falls back to the SVG automatically. Live vehicles are proxied through our own API with a shared 10-second cache to stay under the no-key rate limit.
Directions are a server call: Google Routes transit when ROUTES_API_KEY is set, otherwise an offline subway planner over the same snapshot that walks, rides, and transfers on the real graph. Either way the map hides the lines you are not riding.
Squads are a small state machine on the room — collecting → swiping → planned — with a version counter and ~2-second polling instead of websockets, because it has to work on a phone through a tunnel and on a serverless host. Once the group has a place, the T map and the Trip Map turn into the same live adventure, polling every 10 seconds while anyone is on the way.
where (R) is the receipt total, (d) the number of diners, (T \in {10 \text{ (bus)},\ 5 \text{ (T)},\ 0}) is the verified travel bonus, (r_k \in {1, 1, 0.5, 0.25}) decays with repeat visits, and (n \le 12) is how many people actually showed up.
The receipt is read, not typed. The phone photographs it, Gemini (gemini-3.5-flash-lite, minimal thinking) fills a fixed JSON schema where every field is nullable, and anything unreadable comes back null so the app can ask for a retake instead of guessing. The server signs the facts it accepts into a 30-minute token tied to the user, and the claim uses the token's numbers, never the request's. The photo is never stored.
Being at the restaurant is proved separately, within 3 hours of the receipt time, by any one of: a GPS fix within 150 m plus up to 75 m of reported error, a recorded trip that passed within 150 m, or a verified ride that ended within 400 m. Rides are verified against live MBTA vehicle positions: while a trip records, the phone pings its location and every ping is matched against every vehicle in the feed. A ride counts when the same vehicle keeps matching:
$$ m \ge 2,\qquad \Delta t \ge 60\ \text{s},\qquad \Delta s \ge 300\ \text{m},\qquad v > v_{\text{walk}} $$
or, in slow traffic, after 4 matches over 3 minutes. Nobody picks "bus" or "T": if the claim does not name a ride, the server attaches the verified, unused one that ended near the place. Tested live: Bus 62 verified after four matches and was followed for 3.9 km, and Green Line C verified on the right train while a second C train ran 100–400 m behind it the whole time.
Trending is the app's own signal, not a static list: likes from group swipes, 4× verified visits, and 2× ratings of 8+, over the last 7 days. Buzz outranks Google popularity, so the list reflects what people in the app actually did this week.
Challenges we ran into
Live groups were the hardest part. Polling means every phone holds a slightly stale copy of the truth. Two people finishing their last swipe at the same moment both think they ended the session. A phone reloads mid-deck and has to resume without double-counting votes. The host closes the tab. We fixed it by making the server own every transition, adding a version counter so phones only re-render on change, upserting swipes per person/place/session, computing "everyone is done" from the database rather than from whoever polled last, and writing the deck snapshot once so late joiners see the same ten places. The live adventure has the same shape: everyone's path is a growing array, so we poll the whole crew every 10 seconds and re-frame the map only when someone joins or the destination changes.
OCR humbled us, then we shipped it. Receipt photos are adversarial: thermal paper, folds and shadows, LANTERN DUMPLING HSE #2, tax and tip, one bill split six ways. A wrong total is worse than no total when points are at stake, so we did not let the model be clever. It fills a schema where every field can be null, we reject "not a receipt" and unreadable photos with a retake message, and the accepted facts are signed into a token so the claim cannot be edited after the fact. Merchant names are fuzzy-matched on shared words, a receipt key catches duplicates, diners are capped, the receipt must be under 36 hours old, and scans are limited to 12 an hour. We would rather refuse a blurry photo than pay out on a guess. It is still not fraud-proof — a photo of someone else's real receipt from that restaurant would read fine — but one claim per receipt, a 3-hour presence window and 2 rewarded visits a day cap what that is worth.
Maps fought us on three fronts. Browser key versus server key (the Maps JS key ships to the client and must be referrer-restricted; Places and Routes stay server-only). Map IDs and the new Places API behaving differently from the old one. And the phone tunnel URL changes every run, so every origin we opened the app from had to be allowed or the map silently fell back to SVG. That last one is why the offline map became the default instead of the fallback: it always works, it costs nothing, and the Google view is now a deliberate switch for the demo.
Underground, GPS disappears. The subway is a tunnel, so ride verification has to catch the above-ground segments, and the Silver Line reports a bus position about once a minute. Presence proof has the same problem in reverse: a phone at a basement table may not get a fix at all, which is why a recorded trip or a verified ride can stand in for the check-in instead of blocking the claim.
Plus the usual framework tax: Next 16's async params, Prisma 7's driver adapters, time zones around "today" for the daily caps, and a phone that has to stay awake to record a trip.
Accomplishments that we're proud of
- The loop closes end to end: recommendation → trip → verified ride → scanned receipt → proof of presence → points, with every number computed server-side.
- Ride verification works against real MBTA data, including telling two Green Line C trains apart.
- The group flow actually converges — ten places, everyone swipes, five survive, and dietary needs shape the deck instead of emptying it.
- Receipt reading that refuses to guess, behind a signed token and a rate limit.
- It looks like an app, not a hackathon demo: installable PWA, light and dark mode, iOS-native feel, a shop with vouchers.
- It degrades instead of breaking: no Places key means seed data, no Google key means the SVG map (now the default), no signal means cached geometry, no Gemini key means a typed receipt.
What we learned
Google Maps is a product family, not an API. We learned the difference between the Maps JavaScript API, Places API (New), Routes, and the web-service endpoints; why keys are split by surface and restricted by referrer or IP; what a Map ID is for; and how caching rules differ — Places content cannot be stored, place IDs can. We also learned to check quota before demo day, not during it, and that the cheapest map is the one you draw yourself.
Figma is a design-system tool if you let it be. We stopped designing screens and started designing components and tokens. Figma Make gave us a clickable prototype early, which surfaced flow questions — where does "start" live, what does a host see — while they were still cheap to answer.
Debugging is mostly making the system observable. The bugs that hurt were not crashes; they were silent staleness — a phone showing yesterday's deck, a ride that never verified because one ping was forty meters off. We added version counters, a points breakdown on every reward, and rejection reasons that say why ("receipt too old," "not recommended in 48 hours," "we couldn't confirm you were at Lantern Dumpling House").
And scope is a feature. Deciding what not to fake — a routing engine, a timed itinerary, achievements that award themselves — made the parts we did build much more solid. We shipped OCR only once we could make it refuse, and we left generatePlan unbuilt rather than invent leave-by times we could not stand behind.
What's next for taste of t
- Award the achievements. The nine are listed and priced, but nothing checks them yet; the plan is to evaluate after each trip, verified ride and claimed meal, and pay each one once.
- The timed night: turn the top five into an itinerary with leave-by times, last-train checks, and kitchen closing times. Directions exist;
generatePlanis the next hill. - Harden OCR: on-device first, a vision fallback, and a confidence threshold that refuses to guess.
- Real partner deals behind the shop — today's rewards are demo partners with no deals signed.
- Collaborative filtering now that swipe history is accumulating, streaks on top of the points ledger, more Boston neighborhoods, an Android install path, and a hosted Turso deploy so the demo URL stops changing.
Built With
- gemini
- gemini-vision
- google-maps
- ml
- next.js
- ocr
- react
- yolo