Amtrak National Rail services are a critical part of American transit. In 2023, Amtrak reported 28.58 million users, which was still 11% down from pre-pandemic levels. However, for such an important transit system, Amtrak's capability to allow users to easily and effectively track their services is lacking. The official Amtrak train tracker page is hard to use for searching trains, finding trains, and getting specific information from them. The Amtrak app is a better source of truth, but still does not always show as much information as would be useful.
This app is meant as a 3rd party open source solution to Amtraks train tracker options. TrainTracker is an intuitive and easy to use web application meant for both desktop and mobile, and allows users to access detailed information about all trains that Amtrak has running on the rails at any given time. This app was built using a self-serviced version of the Amtrak API with Cloudflare, and React & Leaflet to create a cohesive and simple user experience.
To use this online, go to https://cis3296f24.github.io/TrainTracker/
The home page has a search option and a table for train responses. Users can search trains by number, line, or station and use a favorite preset to save time while searching their trains. The response table will bring up all trains that fit the user query. The train line, number, start & destination, and status will be displayed by default. For any train, it can be selected to get more details, including updates for all stations. Additionally, all trains have a shareable link as part of this popup.
The map page has a search option and a map of Amtrak lines. Users can search trains by number, line, or station and use a favorite preset to save time while searching their trains. The map will, by default, show all trains and lines. When a particular train or line has been searched, only the selected items will be shown on the map. For any train, it can be selected on the map and will show the train line, number, speed, status, and the last time Amtrak updated its status and data.
This page is where shareable links will lead to. By default, when accessed from the home sidebar and not from a sent link, a table with all available trains will be shown. These trains can be selected, and their links used as shareable links as well.
Follow this project board to know the latest status of the project.
- Use this github repository (https://github.com/cis3296f24/TrainTracker/)
- Clone this repository to your local system (git clone)
- If you haven't, download Node.js for your respective system here
i.npm -v
ii.node -v - Navigate to the folder train-tracker:
cd train-tracker npm installnpm start
i. Runs the app in the development mode.
ii. Open http://localhost:3000 to view it in your browser.
iii. Running this app in development mode starts a local proxy that will directly communicate with Amtrak to collect information.
iv. The page will reload when you make changes. You may also see any lint errors in the console.
If you'd like to deploy this project yourself:
npm run build
This builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
See the section about deployment for more information.
To see the full JSDoc, download the entire docs folder found in train-tracker/doc and open the index.html in a browser
If you'd like to install this directly instead of cloning from git, follow these steps instead
Download the .tar file of this repository's most recent release from 'Releases'.
Move the file to wherever you would like to build this project on your local machine.
Inside the folder that has the .tar file, run the following command:
This project was bootstrapped with Create React App.
The train favicon was downloaded from Train icons created by Smashicons - Flaticon.
The routes GeoJSON data was downloaded from The US Department of Transportation.
This software is open-source and available under the MIT License (Copyright 2024; Amitai Goldmeer, Louise Dupont, Molly Barron, Nicholas Rehac, TJ McBride, William Sims)
