How putra10/transitlabs works
TransitLab is a browser-based route-optimisation lab for journeys from Universitas Indonesia to Blok M. Visitors adjust the fare/time weighting, transport modes, station closures, and must-pass stops; the lab recomputes and ranks routes, then shows fares, times, criticality, and animated route playback on a schematic or optional map. The engine handles graph search and route scoring; line definitions supply transit topology and display geometry. The README documents additional method and data pages. Some UI wiring is only partially sampled, so uncertain connections are omitted.
Main entry points: app.js Route controls · index.html Route lab · engine.mjs Route engine · lines.mjs Lines and stations
Components 15
Visitor experience
- Route lab
public/index.html - Route controls
public/app.js - Schematic view
public/app.js - Map view
public/app.js - Language toggle
public/site.mjs
Route engine
- Route engine
public/engine.mjs - Transit graph data
public/data/optg.json
Transit network
- Lines and stations
public/lines.mjs - Map geometry
public/data/geometry.json
Reference pages
- Method page
public/method.html - Data page
public/data.html
Other components
- Visitor
- Leaflet
- OSM tiles
- Browser storage
Connections 16
- Visitor → Route lab: opens
- Route lab → Route controls: hosts
- Route controls → Route engine: requests routes
- Transit graph data → Route engine: provides graph
- Route engine → Route controls: returns rankings
- Route controls → Schematic view: updates display
- Route controls → Map view: updates display
- Lines and stations → Schematic view: defines lines
- Lines and stations → Map view: defines stations
- Map geometry → Map view: provides paths
- Map view → Leaflet: renders map
- Leaflet → OSM tiles: loads tiles
- Route lab → Language toggle: initializes language
- Language toggle → Browser storage: persists choice
- Visitor → Method page: reads
- Visitor → Data page: reads