Expo Router app for nearby public transit discovery with native Google Maps support and a Mapbox-backed web map.
-
Install dependencies
pnpm install
-
Configure DigiTransit API access
cp .env.example .env
Then set
EXPO_PUBLIC_DIGITRANSIT_API_KEYin.env. Register for an API key athttps://portal-api.digitransit.fi. If you want Android Google Maps tiles in a development build, also setEXPO_PUBLIC_ANDROID_GOOGLE_MAPS_API_KEYin.env. If you want Google Maps-backed native dark map parity on iOS, also setEXPO_PUBLIC_IOS_GOOGLE_MAPS_API_KEY. If you want the live web map instead of the local fallback surface, setEXPO_PUBLIC_MAPBOX_PUBLIC_TOKEN. You can optionally override the GraphQL endpoint withEXPO_PUBLIC_DIGITRANSIT_API_URL.For standalone EAS builds, set the same public variables in the EAS environment used by the build profile. The
previewprofile expects the EAS environment namedpreview.Local standalone APKs are written to
artifacts/android/digitransit-preview.apkby default. You can override the path withANDROID_STANDALONE_OUTPUT_PATH=/your/path/app.apk.After adding the Google Maps key, rebuild the Android app so the native manifest metadata is regenerated. After adding the iOS Google Maps key, rebuild the iOS app so the config plugin can regenerate native settings.
-
Start the app
pnpm start
-
Regenerate GraphQL types after editing any
.graphqldocumentpnpm codegen
In the output, you'll find options to open the app in a
- development build
- Android emulator
- iOS simulator
- Expo Go, a limited sandbox for trying out app development with Expo
You can start developing by editing files under src/. Route entry points live in src/app,
feature code in src/features, and platform adapters in src/core/platform.
Run all checks at once:
pnpm checkIndividual checks:
| Command | Purpose |
|---|---|
pnpm lint |
ESLint |
pnpm typecheck |
TypeScript type checking |
pnpm format:check |
Prettier formatting validation |
pnpm test |
Jest unit/integration tests |
pnpm test:ci |
Full test suite (CI mode) |
pnpm codegen |
Regenerate GraphQL types |
To learn more about developing your project with Expo, look at the following resources:
- Expo documentation: Learn fundamentals, or go into advanced topics with our guides.
- Learn Expo tutorial: Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
Join our community of developers creating universal apps.
- Expo on GitHub: View our open source platform and contribute.
- Discord community: Chat with Expo users and ask questions.