# Lookout: we turned waiting for the T into a scavenger hunt (BostonHacks 2026)

> Source: <https://dev.to/darsh_pandya_373f43c60e71/lookout-we-turned-waiting-for-the-t-into-a-scavenger-hunt-bostonhacks-2026-alp>
> Published: 2026-11-23 19:36:19+00:00

**Recommendation:** When using a vision model to verify user-submitted photos, require structured JSON output with a confidence threshold and fail closed on low confidence or API outages rather than granting a free pass.
More in the playbook "Verifying model output": <https://wpnews.pro/playbooks/output-verification>

*This is a submission for the [MLH x DEV Writing Challenge](https://dev.to/mlh-hackathon)*

## 
  
  
  What I Built

Anyone who rides Boston's T knows the wait can feel longer than the ride. Most of us spend it scrolling. But every station is full of things nobody notices: a sticker on a pillar, an old sign, a cracked tile, a mosaic, a mark on a bench.

For the **Transit Gamification** track at **BostonHacks 2026**, my team of three built **Lookout**, virtual geocaching for the MBTA. Our tagline: **Hide it. Find it. Ride together.**

**How it plays**

- 📸 **Hide:** snap a small detail in your station. Gemini screens the photo first, so no faces, no blank walls, and the name you type has to match what's in the picture.
- 🔍 **Find:** other riders at that station get your photo and a timer (1 to 3 minutes depending on difficulty). Find the real thing, take a proof photo, and Gemini checks it's the*same object* , not just something similar. There are five levels, from Easy (10 pts) to Impossible (60 pts, heavily blurred photo), plus up to +50% for speed.
- 🚇 **Ride together:** this is the part I'm proudest of. Lookout can tell when you're actually**on a train** . We compare your phone's GPS with the MBTA's live train positions. One reading next to a train isn't enough (you could be standing on the platform), so you're verified when two readings 20 seconds to 5 minutes apart both match the same train, and you moved about as far as the train did. Everyone verified on that train lands in one lobby for that ride. Each rider pledges 100 points' worth of eggs they've found, riders can donate eggs to each other or tap "Help me", and when everyone reaches 100 the whole train gets a bonus. Strangers on a train end up helping each other.

There's more around it:

- a live map with every train gliding along the real tracks
- monthly and all-time leaderboards
- rider levels and stamps
- friend groups with chat under anonymous chat names
- an egg collection on your profile: a plain blue egg for Easy, up to platinum for Impossible

**What I learned**

- 
**Real-time data is messy.** Live train positions jump around, and phones lose GPS underground, so "is this person on this train?" turned into a small detection algorithm rather than a single distance check.
- 
**Concurrency matters even in a game.** Two players finding the same egg at the same moment, or double-tapping a pledge, has to resolve to exactly one result. We used MongoDB transactions with per-slot and per-user locks so players never collide.
- 
**AI checks are a product decision, not just an API call.** We had to decide what "the same object" means, what happens when the model is unsure (it fails, not passes), and what happens when it's down (try again, never a free pass).

## 
  
  
  Demo

🎮 **Play it:** [lookout.boston](https://lookout.boston). Open it on your phone and allow location to detect your station.

| Your station | Find an egg | Found it! | 
|  |  |  | 

| Live train map | Train lobby | Profile and egg collection | 
|  |  |  | 

We tested it on the T at four real Green Line stops: **BU Central, BU East, Blandford Street and Kenmore**.

## 
  
  
  Partner Technologies

**Google Gemini API.** Gemini does two jobs, both with structured JSON output so the app gets a clear verdict instead of free text:

1. 
**Photo screening when you hide an egg.** Before anything is saved, Gemini rejects photos with faces, photos with nothing specific to find, and blank walls. It also checks that the label the hider typed ("bench", "red sticker") matches the photo. Rejected photos are never stored.
2. 
**"Is this the same object?" when you find one.** We send the original egg photo and the finder's proof photo. The prompt is strict: other angles, lighting and zoom are fine; a different object of the same kind, or a photo of a screen, is not; when unsure, answer no. Gemini returns`{ sameObject, confidence, reason }` , and a find only counts at**confidence ≥ 0.7** . Re-uploading the egg's own photo is caught before Gemini is even called.

We run `gemini-3.1-flash-lite` with `gemini-3-flash-preview` as a fallback, each with a 15-second timeout, so a slow or overloaded model just falls through to the next one. Early on, one model we tried was no longer available to new API keys and another was too slow for a timer-based game. So we added a health check that makes a real tiny Gemini call (cached for 10 minutes), so we'd know right away if the model stopped working.

**MongoDB Atlas.** Everything lives in Atlas: players, eggs (photos included), finds, groups, chats and train lobbies. The features that mattered most:

- 
**Transactions** for anything two players could do at once: claiming an egg slot, rotating eggs after a find, pledging eggs in a lobby. A partial unique index also guarantees one live egg per slot at the database level.
- 
**Aggregation pipelines** for leaderboards (monthly and all-time, by station and by line), the map's per-station stats, and the "Keeper" of each station.
- 
**TTL indexes** so sessions, chat messages and GPS sightings clean themselves up.

Deployment is a single serverless Node app on **Vercel**, with live station, prediction, vehicle and track-shape data from the **MBTA V3 API**.

## 
  
  
  Hackathon Experience

We built Lookout at **BostonHacks 2026** in the Transit Gamification track as a team of three. We split the work across the map and UI, the game rules, and the backend, then took it out of the building and played it on the T at BU Central, BU East, Blandford Street and Kenmore. Watching it detect a real train in real time was the moment it clicked for us.

Thanks to the BostonHacks organizers and MLH for a great weekend, and if you ride the T: go find something. 🥚
