
🚆 Railways & Public Transport · C4 Architecture · Pro
A journey planner that combines metro, bus, suburban train and last-mile options into one trip plan with a single ticket.
C4 Architecture diagrams are part of Pro. Anyone can view this one; generating and editing it needs Pro.
Drawing diagram…
Journey planner platform: riders use an app that calls a trip planner service. The planner uses a routing engine (OpenTripPlanner) with GTFS timetables from metro, bus and suburban rail operators and live GTFS-realtime delay feeds. A ticketing service sells one QR ticket covering all legs and splits revenue among operators. Last-mile options (bike, auto) come from partner APIs.
C4Container
title Multimodal Journey Planner
Person(rider, "Rider", "Plans and pays for trips")
System_Boundary(jp, "Journey Planner") {
Container(app, "Rider App", "Flutter", "Plan, pay, show QR")
Container(plan, "Trip Planner API", "Java", "Trip options")
Container(route, "Routing Engine", "OpenTripPlanner", "Graph of all networks")
Container(ingest, "Timetable Ingest", "Python", "GTFS and realtime feeds")
Container(tix, "Ticketing Service", "Node.js", "One QR for all legs")
ContainerDb(db, "Tickets DB", "PostgreSQL", "Tickets and revenue split")
}
System_Ext(ops, "Transit Operators", "Metro, bus, suburban rail")
System_Ext(lm, "Last-mile Partners", "Bikes, autos")
Rel(rider, app, "Uses")
Rel(app, plan, "Plan trip")
Rel(plan, route, "Routes")
Rel(ingest, ops, "Reads GTFS feeds")
Rel(ingest, route, "Updates graph")
Rel(plan, lm, "Last-mile options")
Rel(app, tix, "Buys ticket")
Rel(tix, db, "Reads/writes")
Rel(tix, ops, "Validates and settles")A railway reservation system in the style of IRCTC: seat inventory per train and class, waitlists, Tatkal quota, payments and e-tickets.
The states of a train ticket from booking to journey, including RAC and waitlist confirmation and cancellation.
How a metro fare is charged with a smart card or bank card: tap in at the entry gate, tap out at the exit, fare by distance and balance update.
How a city bus app shows live bus positions and arrival times: GPS devices on buses, a prediction model and updates to apps and stop displays.
How a modern railway signalling network is connected: interlocking at stations, track circuits, train control radio and the central traffic control centre.
Tables for train operations: trains, routes, stations, scheduled stops, coaches and daily running with actual times.