Skip to content

SharpHawks/shiftos

Repository files navigation

ShiftOS

Offline mobile app (Expo + TypeScript + Expo Router) for passive shift tracking at a geofenced workplace, local SQLite, dark glass UI, Latvian and Russian i18n.

Requirements

  • 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:ios or EAS development builds.
  • @rnmapbox/maps also requires native code (not Expo Go). After cloning, set .env, then npx expo prebuild --clean (or expo run:*).

Setup

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 start

For native projects (after expo prebuild or expo run:*), generated android/ and ios/ folders are gitignored.

Mapbox (@rnmapbox/maps + Expo)

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.
  1. Copy .env.example.env — fill pk. token from Account access tokens (expo start loads extra.mapboxAccessToken via app.config.ts).
  2. 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.
  3. This project already has the @rnmapbox/maps config plugin in app.config.ts; optional: pin SDK with plugin option RNMapboxMapsVersion (see plugin/install.md).
  4. npx expo prebuild --clean or npx expo run:android/run:ios after env is set — not Expo Go.

Stack

  • 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. + secret DOWNLOADS:READ для сборки)
  • i18next (lv default, ru)

Permissions

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.

Scripts

  • npm run start — Metro
  • npm run typecheck — TypeScript

Data

All data stays on device (shiftos.db). No backend or accounts.

About

ShiftOS — geofenced work shift tracker (Expo, offline)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors