Offline mobile app (Expo + TypeScript + Expo Router) for passive shift tracking at a geofenced workplace, local SQLite, dark glass UI, Latvian and Russian i18n.
- Node.js LTS
- Development build — background geofencing and reliable local notifications do not work in Expo Go. Use
npx expo run:android/npx expo run:iosor EAS development builds. @rnmapbox/mapsalso requires native code (not Expo Go). After cloning, set.env, thennpx expo prebuild --clean(orexpo run:*).
npm install
cp .env.example .env # Windows: copy .env.example .env
# Fill EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN (pk.*) from https://console.mapbox.com/account/access-tokens/
# For native builds, set MAPBOX_DOWNLOADS_TOKEN in your environment or EAS secrets (never commit).
npm run startFor native projects (after expo prebuild or expo run:*), generated android/ and ios/ folders are gitignored.
Per rnmapbox/maps install and Mapbox native SDK docs (via Context7: /rnmapbox/maps, /mapbox/mapbox-maps-android):
| Need | Role |
|---|---|
EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN (pk.*) |
Runtime: Mapbox.setAccessToken(...) before any map — onboarding uses Mapbox tiles/styles (mapbox://styles/mapbox/dark-v11). |
Secret token + DOWNLOADS:READ |
Compile time: Gradle/CocoaPods authenticate to Mapbox Maven (username = literal mapbox, password = secret token). Same idea as MAPBOX_DOWNLOADS_TOKEN / SDK_REGISTRY_TOKEN in Android docs. |
- Copy
.env.example→.env— fillpk.token from Account access tokens (expo startloadsextra.mapboxAccessTokenviaapp.config.ts). - Create a secret token in the same console with
DOWNLOADS:READ— use it only for native builds; prefer~/.gradle/gradle.properties, env in CI, or EAS Secrets — not committed files. - This project already has the
@rnmapbox/mapsconfig plugin inapp.config.ts; optional: pin SDK with plugin optionRNMapboxMapsVersion(see plugin/install.md). npx expo prebuild --cleanornpx expo run:android/run:iosafter env is set — not Expo Go.
- Expo SDK 54, React Native 0.81, Expo Router
expo-sqlite,expo-location,expo-task-manager,expo-notifications- Zustand (UI refresh),
react-native-gifted-charts,@rnmapbox/maps(Mapbox dark on onboarding — см. секцию Mapbox выше:pk.+ secretDOWNLOADS:READдля сборки) - i18next (
lvdefault,ru)
Android: foreground + background location, foreground service (location), notifications. iOS: always/when-in-use location, background location mode — configured via app.config.ts and Expo config plugins.
npm run start— Metronpm run typecheck— TypeScript
All data stays on device (shiftos.db). No backend or accounts.