This guide explains how to run the Flutter demo client together with the Python FastAPI backend-for-frontend (BFF).
- Flutter SDK installed (
flutter doctorpasses). - Python 3.12+ (managed by
uv). - Entur OMSA sandbox credentials (
CLIENT_ID,CLIENT_SECRET, and required headers).
From the repository root:
cd bffs/python-fastapi
cp .env.example .env # populate with Entur credentials and headers
uv sync # installs dependencies into .venv
uv run uvicorn app.main:app --reloadKey notes:
- The server listens on
http://localhost:8000/api/v1by default. - Flip
OMSA_MODE=localin.envto point at a stub backend instead of Entur's dev environment (primarily for Entur devs with a local backend running) uv python install 3.12or any version<= 3.14 && >= 3.10ensures the expected interpreter is available.
In a new shell, from the repo root:
cd clients/flutter
flutter pub get
flutter runTips:
- If you have a BFF running at a different URL, run the flutter app with
--dart-define=BFF_BASE_URL=<your-bff-url-here>. - Update
lib/config.dartfor a checked-in default. - Use
flutter testandflutter analyzeto validate changes before shipping.
- Client cannot reach BFF: Hit
http://localhost:8000/healthor watch the FastAPI log output. - OAuth failures: Double-check credentials in your
bffs/python-fastapi/.env.
- Different pairing: Add a new guide under
docs/(e.g.react-express-guide.md) and link it from the repo README.