Inspiration

In many cities, public transport can be a frustrating experience due to unreliable schedules and a lack of real-time information. Passengers often face long waits at bus stops and uncertainty about arrival times, leading to inefficiency and distrust in the system. This project was inspired by the need for a solution that empowers commuters with accurate, real-time data to make their journeys smoother and more predictable.

What it does

Our Real Time Public Transport System provides users with live updates on the location and status of public buses. Using a user-friendly web interface, passengers can see a map with bus icons moving in real-time along their routes. By selecting a specific bus, they can view its current speed, estimated time of arrival at upcoming stops, and the number of available seats. This system also includes features for route planning and provides alerts for delays or service disruptions, helping users navigate their city's public transit network with confidence.

How we built it

We built the front-end using HTML, Tailwind CSS, and JavaScript to create a responsive and intuitive user interface. For the map pointing and visualization, we used Leaflet.js, a lightweight and powerful open-source library that allowed us to easily integrate interactive maps. For the real-time data, we used Firestore as our NoSQL database, which allowed for seamless synchronization of bus location data across all users. We simulated the bus data stream and pushed it to Firestore, which then triggered updates on the client-side. The entire project was hosted on GitHub Pages, providing a simple and effective way to deploy and showcase our application.

Challenges we ran into

One of the main challenges was managing the real-time data flow efficiently. Initially, we faced performance issues with frequent database reads and writes, which could have led to high costs and slow updates. We overcame this by optimizing our data model and using Firestore's real-time listeners, which only update the client when data changes, rather than constantly polling the database. Another challenge was accurately simulating the bus movement and route logic in a way that felt realistic and was easy to manage.

Accomplishments that we're proud of

We are most proud of successfully creating a functional and responsive real-time map interface that provides accurate and useful information. The seamless integration of Firestore with our front-end and the effective use of Leaflet for a smooth mapping experience were significant accomplishments. We are also proud of the clean, minimalist design achieved with Tailwind CSS, which makes the application easy to use for all commuters.

What we learned

This project was a great learning experience in several areas. We deepened our understanding of real-time data synchronization using NoSQL databases like Firestore and learned how to optimize data structures for efficiency. We also gained valuable experience in using the Leaflet.js library for interactive mapping. The process taught us the importance of tackling challenges systematically and iterating on our design and code.

What's next for Real Time Public Transport System

Looking ahead, we plan to expand the system to include more features. We want to integrate actual GPS data from public transport vehicles, rather than using simulated data. We also plan to add a feature for user-submitted feedback on bus overcrowding or cleanliness and introduce a notification system for users who want to be alerted when their bus is approaching. Ultimately, our goal is to partner with a city's public transport authority to implement this system on a larger scale and make public transit more reliable for everyone.

Built With

Share this project:

Updates

Submission history