Getting started
Everything runs locally on real data. Bogotá is the first configured city; the same flow works for any city with GTFS (see Adding a city).
Requirements
Section titled “Requirements”- Docker (PostgreSQL/PostGIS).
- Python ≥ 3.12 and a JDK ≥ 21 (OpenTripPlanner runs natively; Docker Desktop’s VM is usually too small to build a big-city graph).
- Node ≥ 20 with
pnpmfor the web app; Flutter ≥ 3.41 for mobile. - About 500 MB of downloads the first time (GTFS + OpenStreetMap extract).
1. Backend and router
Section titled “1. Backend and router”git clone https://github.com/jeronimotech/opentransit-api && cd opentransit-apimake venv # virtualenv with dependenciesmake up # Postgres/PostGIS on localhost:5435make graph CITY=bogota # download GTFS + OSM, clip to the bbox, build the graph (~2 min)make otp # serve OpenTripPlanner on http://localhost:8080cp .env.example .env # set ADMIN_TOKEN (any long random string)make dev # API on http://localhost:8001; first start ingests the GTFS (~1 min)Check it answers:
curl localhost:8001/healthzcurl "localhost:8001/v1/cities/bogota/plan?fromLat=4.7546&fromLon=-74.0459&toLat=4.5978&toLon=-74.1616" | jq '.itineraries[0]'open http://localhost:8001/docs # interactive OpenAPI2. Web
Section titled “2. Web”git clone https://github.com/jeronimotech/opentransit-web && cd opentransit-webpnpm install && cp .env.example .env.localpnpm dev # against the local API (NEXT_PUBLIC_API_URL=http://localhost:8001)pnpm dev:mock # no backend, sample dataThe app is at http://localhost:3000/bogota; the operator panel at /admin.
3. Mobile
Section titled “3. Mobile”git clone https://github.com/jeronimotech/opentransit-mobile && cd opentransit-mobileflutter pub get && flutter gen-l10nflutter run --dart-define=API_URL=http://localhost:8001 # iOS simulatorflutter run --dart-define=API_URL=http://10.0.2.2:8001 # Android emulatorflutter run --dart-define=MOCK=true # no backendDefault ports
Section titled “Default ports”| Service | Port |
|---|---|
| API | 8001 |
| OpenTripPlanner | 8080 |
| PostgreSQL | 5435 |
| Web | 3000 |
- Change fares, links or maintenance mode from the admin panel without redeploying.
- Read the data quality notes before trusting timetables, fares or accessibility.