Loading repository data…
Loading repository data…
asdfghj1237890 / repository
Trilingual 3D visualization of Macau's public transit and aviation — LRT, buses, ferries, and MFM airport flights with schedule-driven simulation
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
3D visualization of Macau's public transit, ferry, and aviation system, inspired by Mini Tokyo 3D and Mini Taiwan.
Visualizes the Macau Light Rapid Transit (LRT), bus network, HK–Macau ferry routes, and MFM airport flights on an interactive 3D map. Vehicles move along actual geometry in a timetable-driven simulation, with an opt-in RT mode that replaces simulated bus positions with live DSAT realtime data.
How "live" is this? See Data freshness & update strategy for a per-layer breakdown — LRT / buses / flights / ferries each sit at a different point on the simulated-to-live spectrum.

Three clean stages: upstream sources get normalized by Python into versioned static JSON, which the browser runtime replays on a simulated clock. RT mode adds a parallel live-feed path for buses only.
flowchart LR
subgraph Sources["External sources"]
OSM[OpenStreetMap]
MLM[MLM LRT timetables]
DSATFreq[DSAT bus frequencies]
AS[AviationStack API]
TJ[TurboJET · CotaiJet]
DSATrt[DSAT realtime feed]
end
subgraph Pipeline["Python pipeline · GitHub Actions"]
Scripts["data/scripts/*.py<br/>(manual regen)"]
CronF["update-flights.yml<br/>(daily)"]
CronFerry["update-ferry-schedules.yml<br/>(monthly)"]
end
subgraph Static["Bundled static JSON (public/data/)"]
J1[lrt-lines · stations · trips]
J2[bus-routes · bus-stops]
J3[flights.json]
J4[ferry-schedules.json]
end
subgraph Runtime["Browser runtime"]
Sim["Simulation engine<br/>timetable-driven playback"]
RT["RT client<br/>/api/dsat/batch · 8s cache"]
UI[MapLibre layers + React UI]
end
OSM --> Scripts
MLM --> Scripts
DSATFreq --> Scripts
AS --> CronF
TJ --> CronFerry
Scripts --> J1
Scripts --> J2
CronF --> J3
CronFerry --> J4
J1 --> Sim
J2 --> Sim
J3 --> Sim
J4 --> Sim
DSATrt -.->|opt-in RT toggle| RT
Sim --> UI
RT --> UI
| Layer | Technology |
|---|---|
| Frontend | React 19, TypeScript 6, Vite 8 |
| 3D Map | MapLibre GL JS, custom WebGL fill-extrusion layers |
| Geo utilities | Turf.js (nearest-point-on-line) + custom precomputed-polyline cache |
| Styling | Tailwind CSS v4 |
| Fonts | Orbitron, JetBrains Mono, Noto Sans HK (Google Fonts) |
| Data pipeline | Python 3.13+, uv, OpenStreetMap Overpass API, OSRM |
| Flight data | AviationStack API (daily sync) |
| Ferry data | TurboJET + CotaiJet timetables (monthly web scraper) |
| Deployment | Cloudflare Pages (via GitHub Actions) |
| Analytics | Google Analytics (gtag.js) |
npm install
npm run dev
The app will be available at http://localhost:5173.
npm run build
npm run preview
Transit data is pre-generated and included in public/data/.
cd data
# Set up Python environment
uv sync
# Run all data extraction scripts
uv run python main.py
This will:
railway=light_rail ways)data/output/Then copy the output to public/data/.
Flight schedules are fetched from the AviationStack API and stored as a static JSON file:
cd data
# Fetch today's MFM flights (requires API key)
AVIATIONSTACK_API_KEY=your_key uv run python scripts/fetch_flights.py
# Fetch a specific date
AVIATIONSTACK_API_KEY=your_key uv run python scripts/fetch_flights.py 2026-04-19
The sync:
MFM) from the AviationStack flights endpointpublic/data/flights.json with times in Macau local (UTC+8)This is also automated via GitHub Actions (.github/workflows/update-flights.yml), which runs daily at 04:00 Macau time (UTC+8) and commits updated flight data if changed.
Ferry timetables are scraped from the operator sites and stored as a single static JSON file with 6 routes across two operators (TurboJET and CotaiJet):
cd data
# Scrape the current month's schedules for all routes
uv run python scripts/fetch_ferry_schedules.py
The scraper:
fetchedAtUtc and effectiveAs metadata