Inspiration

Riding the T is a necessity for residents (routine, waiting, friction, and nothing gained when it breaks) and feels passive and disconnected for tourists. We asked how to make the ride something people look forward to, so we built a Pokemon-Go-style layer over the MBTA: collect stops, track routes Strava-style, earn points and climb a travel rank. And because we were already collecting the live MBTA feed in Tiger Data, we added an Analytics tab that shows what that data says about the system right now.

Demo disclaimer. T-Quest is a hackathon prototype. Every sponsor, store, team, discount and label is a demo placeholder. No partnership, endorsement or real discount is implied. Rider data is synthetic; stops, routes, schedules and live vehicles are real MBTA data.

What it does

  • Live Boston map: real MBTA lines, stations and live trains from our Tiger Data database, a 2D/3D toggle with landmark buildings from Boston open data, and tappable spots with a fact (and source) each.
  • Tap in, ride, verify: tap in at a station and pick where you get off. The ride counts only if the speed is believable and a real scheduled MBTA trip matches the times (checked against the public MBTA schedule). Tapping out instantly, as a GPS spoofer would, is rejected. Verified rides earn points from our game engine (demo mode).
  • Analytics (live MBTA data): a tab that shows what the T is doing right now, computed from the data we collect: vehicles per subway line, active alerts and which lines they affect, vehicle reports per hour for each line over the last hours, and the busiest and quietest hours and lines. These come from a continuous aggregate in Tiger Data. A separate block shows demo rider insights (stops collected, home line, points, leaderboard place), clearly labeled as demo data from synthetic riders, not real people.
  • Traveled: the real network with miles per line and unlocked spots.
  • Explore: nearby spots and perks from fictional demo businesses, filtered by category, line and ownership label. A label is shown only if the business declared it or an official directory lists it, with evidence stored; pending labels are never shown or matched. Real businesses carry no labels in the demo.
  • Faves and a user page: facts you starred, your rank and points, and demo perks.
  • Home-line compensation points (built, no screen yet): your favorite ("home") line is the line you checked in on most in the last 30 days. When an MBTA alert on that line is an outage, the game engine pays compensation points once per alert.
  • Tourist facts from open sources with attribution: Analyze Boston, Digital Commonwealth (open-rights items) and hand-written Freedom Trail facts.

How we built it

  • One Tiger Data database (PostgreSQL + TimescaleDB) holds user profiles, rewards and content next to the high-frequency MBTA streams, joined in plain SQL.
  • Hypertables for MBTA vehicles, predictions, rider events, points and place visits; continuous aggregates for per-line vehicle reports, leaderboards and the home-line rule; compression and retention policies.
  • A standalone collector polls the MBTA V3 API (vehicles, predictions, alerts) into Tiger Data.
  • Three FastAPI services (data-platform read API, insights-sponsors, game-engine) with contract-first OpenAPI. The Analytics tab reads one new read-only endpoint, GET /analytics/system, which runs a handful of queries against the vehicles_route_5m aggregate and the live vehicles table in a single database round trip.
  • Clients: a React/TypeScript app built from Isabella's design canvas, with Boston GIS maps (MapLibre) from Bryan, and an Analytics tab designed to match the canvas. An earlier vanilla-JS prototype is in the repo too.
  • Built by four people, each with their own area, coordinating through GitHub issues.

Tiger Data results (measured Nov 22, small dataset)

Real MBTA data collected by our collector: 1,243,142 vehicle position rows over about 2.7 days.

  • The vehicles_route_5m continuous aggregate answered the per-line report query in 49.28 ms versus 2840.62 ms on the raw table (57.6x, server-side time, warm cache). The same aggregate now powers the live Analytics tab, so the number is not just a benchmark: the app reads from it.
  • Compression of one settled day-chunk with indexes included: vehicles 11.3x (110.4 MB to 9.7 MB) and predictions 16.2x (158.0 MB to 9.7 MB). That is one chunk per table, so a small sample, not a general claim. Method and numbers: docs/TIGER_DATA_RESULTS.md in the repository.

Challenges

  • Deciding what counts as a real ride: we verify tap-in and tap-out against the real MBTA schedule instead of trusting GPS.
  • Designing a screen with no existing design: we authored the Analytics tab and its nav icon from the approved canvas tokens and checked with a before/after screenshot diff that no existing screen changed except the bottom nav.
  • The hour-of-day chart is thin until the collector has run for more days, so the screen says how many hours and days it covers.
  • Predictions are keyed by platform id while our stops are stations, so station-level predictions are not shown yet.
  • Keeping demo data honest: every sponsor, store and label is a flagged placeholder, and synthetic rider data is never presented as real users.
  • We chose to run the demo locally rather than host it publicly: the database holds our live data and credentials, and we did not want a public host holding a connection to it. A hardened production mode (signed short-lived tokens, CORS allowlist, rate limits) exists but is off by default.

What we learned

Compression and continuous aggregates pay off most on high-volume streams; at our small data size we report the numbers as measured. Contract-first APIs let four people build in parallel.

What's next

The check-in screen (no approved design yet), friends, leaderboard, quests and redemption screens, delay and cancellation notifications, a designer review of the Analytics tab, rider insights computed from real rides once there are real riders, moving consent and analytics onto Postgres, and public hosting after a security review.

Data and credits

Transit data from the MBTA (MBTA V3 API and GTFS, MassDOT Developers License). Analyze Boston, City of Boston (PDDL). Digital Commonwealth (items with open rights). Basemap by OpenFreeMap / OpenStreetMap contributors. Freedom Trail facts and fun facts written by the T-Quest team.

Run it yourself

T-Quest is not deployed. It runs locally on your own machine with your own database; see docs/RUN_LOCALLY.md in the repository.

Built With

Share this project:

Updates

Submission history