A Kotlin / Spring Boot 4 service that turns published GTFS Schedule + AVL (Automatic Vehicle Location) feeds into live, predicted vehicle arrivals/departures — ingested, versioned, matched, and served over GraphQL — plus a Nuxt dashboard for watching it happen.
flowchart TD
subgraph gtfs["GTFS Schedule pipeline"]
A["GTFS Schedule feed"] -->|ingest| B[("gtfs_revision<br/>versioned, immutable")]
B --> C["derived schedule model<br/>trip patterns, stop paths, blocks, schedule times"]
end
subgraph avl["AVL pipeline"]
D["AVL feed (realtime)"] -->|poll| E[("avl_report<br/>PENDING")]
end
C --> F
E -->|match| F[("vehicle_match / vehicle_state")]
F --> G["predictions + accuracy tracking"]
G --> H(["GraphQL API"])
H --> I["web dashboard"]
- Ingests GTFS Schedule feeds from remote URLs, storing the full spec in Postgres as immutable, queryable revisions — every import is kept (subject to retention), nothing is overwritten in place. → docs/gtfs.md
- Derives a prediction-ready schedule model from each revision: trip
patterns with geometry, stop paths, vehicle blocks (including inference for
feeds with no
block_id), and per-trip schedule times. → docs/schedule.md - Ingests AVL feeds (GTFS-Realtime
VehiclePositiontoday) and matches each report to a trip in the derived model, spatially and/or against its own descriptor, tracking live vehicle state. → docs/avl.md - Generates arrival/departure predictions per stop for every matched vehicle, learns travel times (Kalman filter / historical average), and tracks prediction accuracy against what actually happened. → docs/predictions.md
- Serves all of the above over Spring GraphQL (GraphiQL at
/graphiql), and ships a Nuxt/Vue live dashboard (web/) for watching matched vehicles and predictions in real time.
The root Gradle project aggregates the backend modules:
app/: Spring Boot application, tests, benchmarks, and migration tooling (app/src/).geo/: geometry primitives and GeoJSON codecs shared by the application.
Run Gradle commands from the repository root. Unqualified commands such as test
and bootRun still work; use :app:bootRun or :geo:test to target a module.
Application jars and reports are written under app/build/.
docker compose up -d # Postgres + Prometheus + Grafana
./gradlew bootRun # runs everything in one process (monolith mode)GraphiQL: http://localhost:8080/graphiql. The shipped application.yaml
comes with two example feeds already configured
(transittrack.feed.feeds) so there's something to look at immediately.
For the dashboard: see web/README.md.
./gradlew testUses Testcontainers, so a running Docker daemon is required.
Runs as a container, splittable into four independently-scalable
Kubernetes roles (api / ingester / feed-processor / predictor)
selected via SPRING_PROFILES_ACTIVE — or as one monolith process (the
local-dev default) with no profile set at all. The web dashboard has its
own container too, included in the Helm chart as an opt-in frontend role
(frontend.enabled: false by default).
→ docs/deployment.md — image build, roles, multi-replica coordination (ShedLock), Helm chart usage, scaling guidance.
Every transittrack.* setting, its default, and what it controls:
Prometheus (bundled by docker compose, UI at
http://localhost:9090) scrapes the backend's
/actuator/prometheus on port 8080. Grafana is provisioned at
http://localhost:4000 (local credentials:
admin / admin) with overview, GTFS import, AVL/matching, and prediction
dashboards. Alert rules currently remain in the Grafana UI; no external
notification channel is configured. See
docs/deployment.md §5 for wiring
metrics up in a cluster instead.
| Doc | Covers |
|---|---|
| docs/gtfs.md | GTFS Schedule ingestion, revisions, mutations, retention, polling |
| docs/schedule.md | Derived schedule model: patterns, stop paths, blocks, schedule times |
| docs/avl.md | AVL ingestion, trip matching, GraphQL read API |
| docs/predictions.md | Prediction generation, travel-time learning, accuracy tracking |
| docs/database.md | Exposed + Liquibase: changeset generator, drift test, raw SQL allowlist, transaction rules |
| docs/deployment.md | Docker image, Kubernetes roles, Helm chart, scaling |
| docs/configuration.md | Full transittrack.* property reference |
| docs/benchmarks.md | Ingest/match/predict load benchmarks (kotlinx-benchmark) |
| docs/ci.md | GitHub Actions: lint, tests, vulnerability scans, benchmarks, image/chart publishing |
| web/README.md | The Nuxt/Vue vehicle dashboard |