Skip to content

jonerrr/trainstatus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Train Status

The best website to check the status of your train (and bus).

If you'd like to try a hosted version of the API, you can find the documentation here. You can also host your own version using the prebuilt container images linked to this repository.

A realtime bus map is available at map.trainstat.us.

Features

  • Blazingly fast 😼😼😼😼
  • Real-time alerts and arrivals for MTA subways and buses
  • Works offline
  • Installable as a PWA
  • Shallow routing between modals so you never lose your place
  • Shareable links for your trip
  • Works on mobile and desktop
  • No ads or tracking (your geolocation data never leaves your device)
  • Simple API that supports JSON and GeoJSON responses.

Self Hosting

  • Use the prebuilt container images linked to this repository.
  • Required environment variables are listed in backend/README.md and frontend/README.md.
  • Requires PostgreSQL and Valkey/Redis.

Development

Requirements

Setup

  1. Clone the repository
  2. Mise should automatically install required dependencies
  3. Set environment variables as listed in backend/README.md inside backend/.env.toml
  4. Start PostgreSQL and Valkey with docker compose up -d or podman compose up -d
  5. Install SQLX CLI with cargo install sqlx-cli --no-default-features --features native-tls,postgres
  6. Start backend with cargo r
  7. Start frontend with pnpm dev

About

MTA subway and bus data collector, API, and frontend

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •