Geo Tracking - Specs

Installation and local environment

Preparing the native app and backend, building the field-test APK, and accounting for the existing toolchain.

The repository has independent installations: geo-demo contains the Expo app and native module; tracking-server contains the Worker and dashboard; specs contains this documentation. To test background location, build the native app. Expo Go and browsers do not include the required local module.

Requirements of the current codebase

ComponentRequirement or repository configuration
Node and npmA version accepted by the installed React Native; the guide records Node 24.21.0 for validation and a minimum of 24.3 in the 24 series. Node 22.0 is insufficient for the app.
AppExpo ~56.0.12, React Native 0.85.3, and React 19.2.3, with its own lockfile.
AndroidA JDK compatible with Gradle, Android SDK, platform tools/adb, NDK, and tools required by the Expo project. The wrapper pins Gradle 9.3.1.
Field-test APKPython 3, keytool, SDK build-tools 36.0.0 for apksigner and aapt, plus the Android build environment.
iOSmacOS, Xcode, a simulator, and CocoaPods. The guide records a successful build with Xcode 27 and an iOS 16.4 minimum for pods.
BackendNode 22 or later declared in the package; Wrangler and Miniflare installed from the lockfile.
Automated UIMaestro CLI and an already installed native app; the repository documents Maestro 2.6.0 or later.

Use the lockfiles when installing. The versions listed describe the current tree and recorded runs, without claiming to be the latest releases. See technologies for each dependency's role.

Installing and checking the app

From the repository root:

cd geo-demo
npm ci
npm test
npx tsc --noEmit

For Android, with the SDK and an emulator or device ready:

npx expo run:android

This build uses the package com.bracaroto.geodemo. Keep Metro available during development. npm run android opens Expo for Android; it should not be confused with compiling the native module through expo run:android.

iOS specifics

The package pins expo-modules-jsi to 56.0.13 through an override. The guide records this build fix for Xcode 27, without a manual patch in node_modules.

Inside geo-demo:

npm ls expo-modules-jsi
cd ios
pod install
cd ..
npx expo run:ios

The inspection should show expo-modules-jsi@56.0.13 overridden. The Podfile raises older pods' deployment targets to the app minimum and preserves targets that already require a higher version. Podfile.lock is part of reproducing this environment.

Use normal simulator signing. The history records Keychain error -34018 with an unsigned build, resolved by reinstalling a signed build. The credential remains in Keychain; there is no plaintext fallback to work around that failure.

The geo-demo/ios and geo-demo/android directories are maintained in the repository. Do not run expo prebuild --clean as a routine step: review how native integrations will be preserved before regenerating them. Changes to app.json require checking their effect on the existing native projects.

Local backend and credentials

In another terminal, from the root:

cd tracking-server
npm ci
npm run secrets:local
npm run dev

Open the dashboard at http://localhost:8787. The initializer creates the local secrets used by the Worker; tracking-server/.dev.vars must stay out of Git and screenshots. Authenticate the dashboard with the local administrative credential. The phone uses a credential restricted to that device.

Automatic enrollment on the current screen points to the published HTTPS Worker. To direct a development build to the local backend, use configureTracking with a test endpoint and credential, as described in API. The screen no longer offers manual connection fields.

On an Android device connected to the computer, forward the port:

adb reverse tcp:8787 tcp:8787

HTTP is accepted only for local exceptions validated by the module. Use HTTPS for the published service and physical-device tests. Configuring a connection does not start collection; that requires permissions and a local action in the app.

Building a standalone APK

With Android dependencies prepared, run from the root:

python3 scripts/build-android-fieldtest.py

The script prepares the fieldtest variant, uses a time-based version code, and builds :app:assembleFieldtest. You can provide an increasing integer with --version-code; --prepare-only prepares the variant and signing without generating the bundle.

The dedicated signing material is stored in geo-demo/.android-signing/, with restricted permissions and Git exclusion. Preserve that directory to sign compatible future updates. If only part of the key and properties exists, the script fails and requires the complete signing material to be restored.

The build embeds JavaScript, produces com.bracaroto.geodemo.fieldtest named Geotrack, and includes 32-bit ARM, ARM64, and x86_64. It then checks the signature, package, name, non-debuggable status, bundle, and architectures. The APK and a JSON receipt with size, version, metadata, and SHA-256 are written to artifacts/releases/.

This command builds locally. Publishing the download is a separate step described in deployment, and using the device is covered in field testing.

Known diagnostics

The October 15, 2026 toolchain report records 19 of 22 passing expo-doctor checks. The recorded issues were the Hermes memory warning in the Expo 56 base, manual synchronization of native configuration, and dependency versions available in the SDK matrix. The expo-modules-jsi fix resolved the observed build problem; it does not itself resolve memory and battery evaluation.

A successful build does not mean every mobile scenario has passed. Record new runs separately from historical evidence, including version, device, and permission/network conditions.

Repository sources

  • README.md, geo-demo/package.json, and tracking-server/package.json.
  • docs/ios-toolchain.md, geo-demo/ios/Podfile, and geo-demo/ios/Podfile.lock.
  • geo-demo/android/app/build.gradle and geo-demo/android/gradle/wrapper/gradle-wrapper.properties.
  • scripts/build-android-fieldtest.py and scripts/android-fieldtest.gradle.
  • geo-demo/modules/geo-monitoring/android/src/main/AndroidManifest.xml and geo-demo/app.json.

On this page