DEV Community

Dillion Huston
Dillion Huston

Posted on

Refactoring a FastAPI Journey and Route API for clarity and maintainability

RouteReality v1.3 is Live

I’m excited to announce that RouteReality v1.3 is now available. This release focuses on improving stability, cleaning up the core logic, and preparing the system for bigger features in the future. It’s more than just a version bump — it’s a step toward making RouteReality a more reliable and maintainable platform for community-driven, real-time bus tracking.
View Journey

What RouteReality Does

RouteReality is an open-source real-time bus arrival prediction system. It combines static timetable data with live journey events reported by users. The goal is simple: to give people a clearer picture of when their bus is actually arriving, rather than relying solely on the static schedule. The more users interact with the system, the smarter and more accurate the predictions become.

How RouteReality is Different

Many Belfast-based bus trackers focus on tracking events after they happen, such as when a bus departs, arrives, or is delayed. These systems are mostly reactive.

RouteReality, on the other hand, is predictive and community-driven:

It predicts bus arrival times instead of just reporting past events.

It blends static timetables with live user reports for more accurate predictions.

It uses community input to improve accuracy over time, so the system learns from repeated journeys.

Predictions include a confidence measure, showing how reliable the estimate is.

It’s open-source and developer-friendly, making it easy for others to contribute or extend the system.

What’s New in v1.3

This update focuses on stability, reliability, and improving the foundations of the system.

Stabilization and Improvements

Added UI screenshots to the README to help new developers understand the app.

Improved handling of journey event types for a clearer journey lifecycle.

Expanded prediction payloads to include context such as recent event counts, source metadata, and historical data.

Introduced more robust logging and instrumentation throughout the prediction and event handling layers.

Naming and Refactor

Renamed key prediction fields (for example, static_dt is now reference_time) for better clarity and consistency.

Centralized prediction refresh logic to reduce duplicated code and improve maintainability.

Improved timetable loading and fallback logic for situations where static data is limited.

Bug Fixes

Fixed crashes caused by unsafe timetable unpacking.

Stabilized prediction confidence scoring when limited data is available.

Improved API error handling for invalid routes or stops.

This release sets the stage for v2, which will include features like authentication, personalized experiences, more sophisticated prediction models, and deeper community engagement tools.

You can view the full v1.3 release notes here:
https://github.com/dillionhuston/RouteReality/releases/tag/V1.3

The updated README also includes guides and screenshots to help you get started:
https://github.com/dillionhuston/RouteReality/blob/main/README.md

What’s Next

We’re already working toward:

User accounts and preferences

Prediction models that consider time-of-day patterns and historical trends

Improved mobile-friendly UI and performance

Stronger community reporting and feedback loops

A big thank you to everyone who has tested, reported bugs, and provided feedback. Your contributions are helping shape the future of RouteReality.

Happy building and coding!

Top comments (0)