A full-stack transit app featuring a Django REST framework and a Multi-threaded Kivy mobile interface.
A Reliable transit apps require robust front-end logic. I built this UK Bus Tracker (v1) as a Proof of Concept to demonstrate a mobile-ready UI (Kivy) capable of processing transit data. To ensure a consistent demo experience without API rate-limiting, v1 utilizes a mocked data engine that simulates real-world bus arrivals.
---
- 26/26 Passing Unit Tests✅
- Mocked Time - (Proof of concept)
- Multi-threaded Kivy UI
- Django REST Framework Backend (Scalable app structure)
- Clone the repository and install:
git clone https://github.com/reory/bus_app.git
cd bus_app
pip install -r requirements.txt
python manage.py migrateThis project requires both the backend and frontend to be running simultaneously.
-
Start the backend:
python manage.py runserver
-
Start the frontend: cd frontend
python main.py
bus_app/
├── api/ # Main API Gateway & GTFS Imports
├── bus_backend/ # Project Core
│ ├── apps/ # Modular Business Logic
│ │ ├── notifications/# User alerts & notifications
│ │ ├── realtime/ # Live bus tracking data
│ │ ├── routes/ # GTFS route & stop management
│ │ └── users/ # Custom user models & auth
│ └── settings.py # Global configuration
├── frontend/ # Kivy Mobile Application
├── tests/ # 26 Unit tests (Backend & Frontend)
├── manage.py # Django management script
└── main.py # Kivy entry point
The project includes a comprehensive suite of 17 tests covering models, serializers, and the Kivy UI logic.
To run the tests:
pytest- Python 3.x
- Django (REST framework)
- Kivy (UI Framework)
- Pytest (Testing)
- Celery (Task scheduling)
-
Synthetic GTFS Generator (Faker) The Goal: Build a localized data factory to simulate a bustling city transit network. The Tech: Use
faker.providers.address to generate realistic street name bus stops (e.g., "Main St & 4th Ave") and clamp random lat/long coordinates within a tight boundary to simulate a dense downtown core. -
Rust-Powered Schedule Matrix Compiler The Goal: Generate millions of realistic, connected schedule times without melting your CPU. The Tech: Pass your synthetic
fakerstop lists into aRust+PyO3extension. LetRusthandle the heavy loop calculations to instantly generate sequential arrival and departure times (StopTime rows) for thousands of simulated trips. -
Multi-Stop Journey Planner The Goal: Give the app actual point-A to point-B routing capabilities. The Tech: Implement pathfinding algorithms (like Dijkstra’s or Connection Scan) on the backend to calculate the fastest multi-stop trips.
-
Offline Spatial Caching The Goal: Keep the app functional when cellular data drops out. The Tech: Embed a lightweight
SQLitecache on theKivyclient to store and render route shapes and stop layouts completely offline. -
WebSocket Push Alerts The Goal: Notify riders of sudden route delays instantly. The Tech: Use
DjangoChannels to maintain live WebSocket connections, pushing urgent service disruptions directly to theKivyUI. -
Personalized Dashboards The Goal: Let users see their daily commute countdown immediately. The Tech: Build a "Favorites" schema allowing users to pin specific stop IDs directly to the launch screen, skipping the route menus entirely.
- Version 1.0 Initial release.
- 26 passing unit tests.
- Ensure the Django backend is running before starting the Kivy frontend.
Built By Roy Peters Click here for contact details 😁





