Skip to content

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).

  • 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 pnpm for the web app; Flutter ≥ 3.41 for mobile.
  • About 500 MB of downloads the first time (GTFS + OpenStreetMap extract).
Ventana de terminal
git clone https://github.com/jeronimotech/opentransit-api && cd opentransit-api
make venv # virtualenv with dependencies
make up # Postgres/PostGIS on localhost:5435
make graph CITY=bogota # download GTFS + OSM, clip to the bbox, build the graph (~2 min)
make otp # serve OpenTripPlanner on http://localhost:8080
cp .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:

Ventana de terminal
curl localhost:8001/healthz
curl "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 OpenAPI
Ventana de terminal
git clone https://github.com/jeronimotech/opentransit-web && cd opentransit-web
pnpm install && cp .env.example .env.local
pnpm dev # against the local API (NEXT_PUBLIC_API_URL=http://localhost:8001)
pnpm dev:mock # no backend, sample data

The app is at http://localhost:3000/bogota; the operator panel at /admin.

Ventana de terminal
git clone https://github.com/jeronimotech/opentransit-mobile && cd opentransit-mobile
flutter pub get && flutter gen-l10n
flutter run --dart-define=API_URL=http://localhost:8001 # iOS simulator
flutter run --dart-define=API_URL=http://10.0.2.2:8001 # Android emulator
flutter run --dart-define=MOCK=true # no backend
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.