T-Recs

Recs, by T. A Boston food finder that ranks spots by how long they actually take to reach on the MBTA, and tells you when the last train home leaves.

Built for BostonHacks 2026 · Bos(tons) of Eats and Streets track.

About

Most food apps answer one question: what's good near me? In Boston, a second question decides the night: can I actually get there, and can I get home? Map apps list restaurants and the MBTA app lists trains, but nothing combines the two. T-Recs does. Tell it what you're craving and how much time you'll spend getting there. It ranks spots by real door-to-door time on foot or by T, and every pick shows the line, the trip breakdown, and the last train back.

Inspiration

Most of us are students who get around Boston without a car. Picking a place to eat meant checking reviews in one app, a route in another, and then the MBTA site to see if the Green Line would still be running at 12:30 AM. Sometimes it wasn't. We wanted one place that says "Pinocchio's: 22 min by T, last train back 12:47 AM" and lets you stop worrying.

What it does

  • Asks what you're craving. Type a craving, choose Walk only or Walk + T, and set how many minutes you're willing to travel.
  • Ranks by door-to-door time. We count every part of the trip, not just the ride:

$$ T_{\text{door}} = t_{\text{walk to stop}} + t_{\text{wait}} + t_{\text{ride}} + t_{\text{walk to venue}} $$

A train only counts if you can actually catch it, meaning it leaves the stop after you get there:

$$ t_{\text{depart}} \ge t_{\text{now}} + t_{\text{walk to stop}} $$

If walking is faster than the T, walking wins.

  • Shows the last train back. Each T pick shows the return line and its last departure of the service day, which ends at 3:00 AM. A spot only counts as reachable if you can stay at least an hour and still catch a train home:

$$ t_{\text{last return}} \ge t_{\text{arrive}} + 60\ \text{min} $$

  • Rates the last train. A recorder logs live MBTA predictions for 12 stations every minute into a Tiger Data (TimescaleDB) hypertable. Cards then show how late the last train back has actually run, for example "ran 3 min late on average in the last 12 h (8 trains)." The average only appears once at least 5 trains have been recorded.
  • Speaks Boston. Route IDs become real line names and colors: Red, Orange, Blue, Green B/C/D/E, Mattapan, and the Silver Line (SL1–SL5, SLW). Subway is preferred over bus, commuter rail, and ferry when trips are close.
  • Matches your taste. Connect TikTok and T-Recs pulls food tags from your videos and guesses place names from captions, clearly labeled "guessed from TikTok caption." TikTok only personalizes results; it never adds venues. Save favorites, and browse the College Atlas to see what's near your campus.
  • Is honest about its data. Every pick comes with a score breakdown (fit, travel time, weather from the National Weather Service, neighborhood signals from Boston 311 and food-license data). Each source is labeled live, demo, cached, or unavailable.
  • Has a mascot. A small T-Rex in a dinosaur-garden theme, because transit apps don't have to be gray.

How we built it

  • Frontend: React and TypeScript with Vite. Lilita One and Open Sans fonts are bundled with the app through @fontsource. The garden illustrations are hand-built SVG.
  • Backend: Python with FastAPI. The transit layer calls the MBTA V3 API for stops, routes, schedules, live predictions, and alerts. For each venue it finds nearby stops, tries up to six candidate routes, and builds a round-trip plan: walk to stop, wait, ride, walk to venue, plus the last return.
  • Places and city data: Google Places, with OpenStreetMap as a fallback when the quota runs out. City data comes from Boston's open-data portal (CKAN: 311 and food-establishment licenses), with weather from the National Weather Service. Public responses are cached in SQLite with short expiry times.
  • Data: Tiger Data (TimescaleDB) stores train departures as a time series. Delay averages and 15-minute time_bucket timelines are served from /api/reliability. The recorder runs inside the API on Render, and a GitHub Actions job pings it every 5 minutes so the free plan doesn't sleep.
  • Demo mode: A clearly labeled offline dataset (APP_MODE=demo) so the demo works even when the Wi-Fi doesn't.
  • Shipping: A single Docker image builds the frontend and serves it from the API. GitHub Actions runs pytest, the frontend build, and a Playwright walkthrough of the demo before anything deploys to Render.

Challenges we ran into

  • Defining "how far." A distance radius means nothing on transit: a spot 2 miles away on the Red Line can be faster than one 0.8 miles away across a river. We redefined the limit as door-to-door minutes, which meant modeling walks and waits, not just the ride.
  • Trains you can't catch. A train that leaves in 2 minutes from a stop 8 minutes away isn't an option. Filtering those out made our time estimates honest.
  • Late-night service. The MBTA service day runs past midnight, until 3 AM, so "tonight's last train" can technically fall on tomorrow's date. Getting this right took careful timezone work in America/New_York.
  • Measuring delays. A train only counts once it has left and dropped out of the MBTA feed. Trips the MBTA runs without a schedule, such as extra trips during a shuttle, have nothing to compare against, so we skip them.
  • API limits during the hackathon. We hit Google Places quota limits mid-build, which is why we added the OpenStreetMap fallback, the response cache, and the offline demo mode.
  • Testing live data. Arrival times change every minute, so we wrote tests that don't depend on the current time, plus fixed demo trips (Red, Green D, and Orange Line), so CI stays stable.

Accomplishments that we're proud of

  • Picks are ranked by real door-to-door travel time, not by distance on a map.
  • The "last train back" line on every card, which no app we know of shows next to restaurant recommendations.
  • Live last-train reliability from our own time-series data on Tiger Data, shown right on the card.
  • Clear labels for where every piece of data comes from and how fresh it is.
  • A friendly, illustrated interface that doesn't look like a template.
  • A full test suite and a recorded Playwright demo walkthrough in CI.

What we learned

Transit data looks simple, but the details matter: stops versus parent stations, schedules versus predictions, service days that end at 3 AM. We learned to design around rate limits and failures early, and that a fallback dataset is a feature, not a hack. We also learned that a big part of good UX is honesty: telling someone when the last train leaves and how late it usually runs builds more trust than another star rating.

What's next

  • Longer reliability history: "this last train ran late 30% of nights this month," instead of just the last 12 hours.
  • Bluebikes and late-night bus options as alternate ways home.
  • Group mode: find a spot that's fair for everyone, starting from different neighborhoods.
  • Accessibility: elevator outages from MBTA alerts, and step-free routes.

Run it yourself

Requires Python 3.12 and Node.js 20+.

python3 -m venv .venv && . .venv/bin/activate
pip install -r backend/requirements.txt
APP_MODE=demo uvicorn app.main:app --app-dir backend --reload --port 8000

In another terminal:

pnpm install
pnpm dev

Or with Docker:

docker build -t boundless-boston .
docker run --rm -p 8000:8000 -v boundless-data:/app/.cache boundless-boston

Demo mode is the default. For live data, copy .env.example to .env, set APP_MODE=live, and add your keys. Never commit API keys.

Built With

Share this project:

Updates

Submission history