NYCTransitHub is a web application developed during the LeetCode Bootcamp that provides real-time updates, schedules, and transit information for New York City's public transportation system. By leveraging the MTA API, the app delivers accurate and timely data to enhance the commuting experience.
- Real-Time Updates: Stay informed with live data on train and bus arrivals, service changes, and delays.
- Schedules: Access up-to-date schedules for all NYC subway lines and bus routes.
- Station Information: Retrieve details about station amenities, accessibility features, and nearby points of interest.
To set up the NYCTransitHub application locally, follow these steps:
-
Clone the repository:
git clone https://github.com/AM-git-hub/NYCTransitHub.git cd NYCTransitHub
-
Create and activate a virtual environment:
python3 -m venv env source env/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up environment variables:
- Obtain an MTA API key by registering at the MTA Developer Portal.
- Create a
.env
file in the project root directory and add your API key:MTA_API_KEY=your_api_key_here
-
Initialize the database:
flask db upgrade
-
Run the application:
flask run
The application will be accessible at
http://127.0.0.1:5000/
.
- Homepage: View an overview of current transit conditions, including major service alerts and delays.
- Search: Enter a specific station or route to get detailed information and real-time updates.
- Favorites: Save frequently accessed stations or routes for quick reference.
We welcome contributions to enhance NYCTransitHub. To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your_feature_name
- Commit your changes:
git commit -m 'Add a descriptive commit message'
- Push to the branch:
git push origin feature/your_feature_name
- Open a Pull Request detailing your changes.
- Metropolitan Transportation Authority (MTA) for providing the transit data API.