Skip to content

zarinrahman04/MBTA-Web-App-Project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MBTA-Web-App-Project

Zarin Rahman

  1. Project Overview

This web application allows users to enter a location in the Greater Boston area and receive key information about that place. The app uses the Mapbox API to convert the user’s input into geographic coordinates, then uses the MBTA API to identify the nearest public transit station and whether it is wheelchair accessible. I extended the project by adding custom CSS styling for improved user experience and integrating the OpenWeatherMap API to show real-time weather conditions at the searched location. Overall, the app displays the latitude and longitude, nearest MBTA station, accessibility status, and current weather for any valid Boston-area location.

  1. Reflection

Development Process

I approached the project by breaking it into small, testable pieces, which made the workflow much smoother. Starting with the helper functions in mbta_helper.py was especially helpful because I could verify each API call before involving Flask. Testing get_json() and get_lat_lng("Boston Common") early on helped me understand how Mapbox structures its JSON and made debugging easier later.

One memorable challenge was the repeated “No MBTA stops found near this location” error. At first, I thought the MBTA API was the issue, but printing the coordinates revealed that Mapbox had returned a completely wrong location—“Fenway Park” alone placed me in Long Island, not Boston. Adding “Boston, MA” fixed the issue and taught me not to assume the API is wrong before checking the data.

I also encountered smaller issues, like PowerShell refusing to run app.py without the .\ prefix, and missing environment variable errors that helped me understand how .env and python-dotenv work. Throughout the project, I relied on printing URLs, inspecting raw JSON, and checking documentation when something didn’t behave as expected.

If I did the project again, I would document my debugging steps earlier and start working on the HTML templates sooner, since seeing the output in the browser made errors easier to understand.

Teamwork & Work Division

I worked alone on this project, so I divided the tasks by phase: building and testing the helper functions first, then developing the Flask routes, and finally completing the HTML/CSS and optional features. Keeping the helper logic separate from the Flask logic made identifying issues much easier because I always knew where to look when something didn’t work. After finishing the required components, I added enhancements like CSS styling and real-time weather data. Working independently made it easier to stay organized and adjust my pace as needed.

Learning & Use of AI Tools

This project helped me understand how APIs, JSON data, and Flask work together to create a complete web application. I learned how to read nested JSON structures, how form data moves through Flask routes, and how templates dynamically display information. It also showed me the value of writing modular code—testing helper functions separately made the entire project more manageable.

I used ChatGPT throughout the project to understand API errors, troubleshoot tracebacks, and brainstorm optional features. AI helped me quickly understand unfamiliar libraries and provided examples when I wasn’t sure how to structure something. However, I learned that AI suggestions always need to be checked against actual API documentation, and that clearer, more specific questions lead to better answers.

Overall, this project improved my confidence in working with APIs, organizing a multi-file project, debugging step-by-step, and using AI as a supportive tool rather than a crutch.

About

This is the base repository for my Web App Developement project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 77.2%
  • HTML 17.8%
  • CSS 5.0%