# health-app Cross-platform (iOS + Android) Expo app — native front end for the private health dashboard at **https://health.rehbock.xyz**. The app is a pure client: all data lives on the server and is fetched live over HTTPS with a bearer API token. Nothing is stored on the device except the auth token (in the platform keychain via `expo-secure-store`). ## Screens | Screen | Data source | | --- | --- | | Today | overview cards + clinical priorities (`health-meta.json`) | | Blood | `/api/health/v1/biomarkers` + `/draws` — search, flags, sparklines | | Sleep | `/api/health/v1/sleep` + `sleep-data.json` — stacked stage chart | | Train | `/api/health/v1/workouts` — weekly volume chart, expandable sessions | | Body | `dexa-scans.json` — DXA summary with deltas, regions, indices | | Mind | `/api/meditation/v1/stats` + `/sessions` | | DNA | `ancestry-traits.json` — 99 AncestryDNA traits | Ported from the PWA at `health.rehbock.xyz/app/` (repo `marcus/health.rehbock.xyz`, `app/index.html`); charts are react-native-svg, tap a bar for the night/week detail. ## Development ```sh npm install npx expo start # scan the QR with Expo Go (iOS or Android) ``` There is no login screen. Open **Settings** (⚙️ on the Today screen) and paste the API token; without one the app has no data. The server accepts it via `HEALTH_APP_TOKEN` in `health-auth` (`~/personal/health-auth/.env` on the VPS, passed through `docker-compose.yml`). Rotate it by changing that value and running `docker compose up -d`. ## Android release APK Signing expects (auto-skipped if absent, falling back to the debug key): - keystore `~/.android-keys/health-app-release.jks` (alias `health`), or `$HEALTH_KEYSTORE` - password in `~/.android-keys/health-app-release.password`, or `$KEYSTORE_PASSWORD` The signing config is injected by `plugins/with-release-signing.js` at prebuild. ```sh npx expo prebuild --platform android cd android && ./gradlew assembleRelease # → android/app/build/outputs/apk/release/app-release.apk ``` Install on GrapheneOS by copying the APK over, or via Obtainium. ## CI (Gitea Actions) Every push to `main` runs `.gitea/workflows/release.yml`: prebuild → signed arm64 APK → Gitea release tagged `v1.0.`, APK attached. `app.config.js` stamps `VERSION_CODE`/`VERSION_NAME` from the run number so each release installs as an upgrade (Obtainium-friendly). Repo secrets: `KEYSTORE_B64` (base64 of the jks), `KEYSTORE_PASSWORD`. ## iOS No Mac is available in this setup, so there is no local iOS build. Options: - **Expo Go** (zero setup): `npx expo start`, scan the QR from the iPhone. - **EAS Build** (real install): `npx eas build -p ios` — needs an Apple Developer account; produces a TestFlight/ad-hoc build in the cloud. The `ios.bundleIdentifier` is already set to `xyz.rehbock.health`.