Inspiration
Ask a Boston college student where they ate this week and you'll hear the same three places near campus. Boston has amazing food, but if you don't have a car it's easy to never leave your bubble. A BU student can go four years without eating in Allston, even though it's one Green Line stop away.
We wanted a reason to get on the T and try somewhere new. So we borrowed an idea from video games: fog of war. In ChewChoo, the whole city starts out covered in fog, and the only way to clear it is to eat your way through it.
What it does
- Unlock the map. Boston is split into 25 neighborhoods, all fogged. Eat at 3 different restaurants in one and the fog clears.
- Get there by T. All 704 restaurants on the map show the nearest station, live MBTA arrivals, and step-by-step directions. You can filter by craving, budget, and T line.
- Ask the concierge. Type something like "cheap ramen near the Green Line" and our AI agent gives you picks along with the route to each one.
- Check in honestly. A check-in counts if you're within 50 m of the restaurant or you scan a receipt that Gemini confirms is from that place, today. You only need one, because not everyone gets a receipt.
- Climb two ladders. Points give you an overall rank. Each neighborhood also has its own ladder: Wanderer → Neighbor → Insider → Mayor. You can be a newcomer citywide and still be the Mayor of Allston.
- Compete. There are leaderboards citywide, by college, and for every neighborhood, plus line quests, badges, and a tracker for the CO₂ you saved by not taking an Uber.
How we built it
Stack: Next.js 14 (App Router), TypeScript, Tailwind, Leaflet with OpenStreetMap tiles, and Firebase Auth.
- Tiger Data (Postgres + TimescaleDB) stores all the game data. Check-ins live in a hypertable, and every leaderboard is a plain SQL query.
- Mastra + Gemini run the craving concierge. It's an agent with tools for restaurant search, live arrivals, and routing.
- Gemini vision reads receipt photos and checks the restaurant name and the date.
- Our own trip planner. We parsed the MBTA GTFS feed into a graph covering subway, light rail, bus, and Silver Line, and we run Dijkstra over it. Each edge's cost is the scheduled ride time plus the live wait from MBTA's V3 predictions:
$$ \text{cost}(u \to v) = t_{\text{ride}}(u,v) + t_{\text{wait}}^{\text{live}}(u) $$
Designing the scoring so exploring pays
All game rules live in one file, scoring.ts. The big design decision was making a visit worth more the farther it is from home, so the fastest way to climb is to go somewhere new:
$$ P = \operatorname{round}\big(10 \cdot m_{\text{dist}} \cdot m_{\text{depth}}\big) + 5\,[\text{indie}] + 50\,[\text{new hood}] + 25\,[\text{new line}] + 50\,[\text{unlock}] + 25\,[\text{quest}] $$
where the distance multiplier depends on how many subway stops the restaurant is from your home station:
$$ m_{\text{dist}} = \begin{cases} 0.5 & \text{in your home neighborhood} \ 1 & \le 4 \text{ stops} \ 1.5 & \le 9 \text{ stops} \ 2 & \text{farther} \end{cases} $$
and the depth multiplier shrinks the longer you stay in one place. It's 1 until you're a Neighbor there, 0.75 as a Neighbor, and 0.5 as an Insider. So a Mayor can't farm their own neighborhood forever.
For the CO₂ tracker, we compare each trip to taking a rideshare:
$$ \text{CO}2\ \text{saved} = (0.25 - 0.05)\,\tfrac{\text{kg}}{\text{km}} \times d{\text{km}} $$
Challenges we ran into
- Ranks that disagreed with points. Our first rank system was based on neighborhoods unlocked, while the leaderboard sorted by points. The demo then showed players ranked higher who had fewer points. We split it into two clear systems: an overall rank from points, and a per-neighborhood ladder from how many spots you've eaten at there. We also rewrote the seed data so fake players explore neighborhood by neighborhood, the way real ones would.
- Check-in rules that were too strict. At first we required location and receipt. Then we realized lots of places don't hand you one, so now either one is enough.
- A crowded map. Hundreds of pins on a phone screen were unreadable. The map now shows 12 iconic landmarks by default and reveals a neighborhood's spots when you open it. Pins and labels also scale with zoom.
- Colors that meant two things. We outlined unlocked neighborhoods in green, and it looked exactly like the Green Line. They're purple now, and the T line colors are used only for the T.
- Bundle size. The full restaurant list was shipping to the browser. We moved it behind API routes, so phones load only what they need.
- Cutting scope. We prototyped on-chain badges and check-ins on Solana, then took them out. They added setup and slowed the demo without making the game more fun.
- A demo that works anywhere. Every external service (Gemini, Mastra, MBTA, Tiger Data) falls back to a canned response in demo mode. So the whole app runs with zero API keys, and you can show every feature without walking anywhere.
Building with Cursor and Grok Bot
With 24 hours and a big feature list, we used AI tools to move faster, and kept the design and game decisions for ourselves.
Cursor was our main editor. We mostly used it for:
- Turning plans into code. We'd describe a feature in plain language, like "a multi-stop trip engine with a timeline on the Plan tab", and use Cursor's agent to scaffold the API route, types and UI. Then we reviewed and refined it ourselves.
- Edits across many files. Restyling the whole app in our T-signage design, renaming the app from Unfog to ChewChoo, and pulling the restaurant list out of the browser bundle all touched dozens of files. Cursor kept those changes consistent.
- Data scripts. Cursor helped us write the scripts that parse MBTA GTFS into a station graph and pull restaurants and landmarks from OpenStreetMap. Those were tedious to write by hand and easy to check against the output.
- Debugging. We pasted stack traces and type errors into chat with the relevant files attached. That was much faster than hunting by hand at 3 AM.
Grok Bot was our thinking partner away from the code:
- Game balance. We used Grok to stress-test the points economy. We'd ask things like "how would a player farm this?", and that led directly to the home-neighborhood penalty and the depth falloff that make exploring the best strategy.
- Product and copy. Grok helped us brainstorm rank names (Wanderer → Neighbor → Insider → Mayor), concierge prompts, and short, sentence-case UI copy that sounds like Boston, not a SaaS dashboard.
- Research. Grok gave us quick answers about MBTA data formats, TimescaleDB hypertables and Mastra agent tools, which kept us from getting lost in documentation.
- Pitch prep. We drafted and tightened our elevator pitch and 3-minute demo script with Grok.
The split worked well. Grok helped us decide what to build and why, and Cursor helped us build it. Every AI-generated change was still reviewed, tested in demo mode and committed by a person.
What we learned
- How messy real transit data is. Turning GTFS into a usable graph, and merging it with live predictions and alerts, was harder than the routing algorithm itself.
- How to give an LLM agent narrow, typed tools with Mastra and Zod, instead of letting it make up restaurants or routes.
- Time-series tables are a natural fit for activity logs. Leaderboards turned out to be short SQL queries instead of app code.
- Game design is mostly incentive design. Small changes to the multipliers completely changed which behavior paid off, so we put every number in one file and tested it.
- Polish beats features. We spent our last hours on motion, focus states, and copy, not new screens.
What's next
Live campus-vs-campus seasons, group trips where friends unlock a neighborhood together, and restaurant partnerships that reward people for discovering independent spots.
Built With
- cursor
- firebase
- gemini
- grok
- leaflet.js
- mastra
- next.js
- node.js
- openstreetmap
- postgresql
- react
- tailwind
- tiger
- turf
- typescript
- vercel
- vultr
- zod