PPP Mobile App — Gaps & Missing Features
This document lists what the app does not yet do — missing features, known limitations, and technical gaps that represent either user-facing deficiencies or compliance/security risks.
Security Gaps
G-SEC-01: WebView localStorage Token Extraction
Status: Active tech debt tracked in GitHub issue #565 The authentication mechanism relies on JavaScript injection to scrape Cognito tokens from the web app's localStorage. This approach is fragile and presents XSS-escalation risks. No native OAuth PKCE flow exists.
G-SEC-02: No Certificate Pinning
The tRPC client makes no use of certificate pinning. A MITM attacker on hospital WiFi could intercept medical data in transit.
G-SEC-03: No Token Refresh
There is no automatic Cognito token refresh flow. When the idToken expires, API calls silently fail. Background geofencing tasks will create timesheets with an expired token, leading to data loss.
G-SEC-04: MMKV Encryption Key Not Configured (RESOLVED via #634)
MMKV is now encrypted with AES-256. The encryption key is generated via crypto.getRandomValues() and stored in device-bound secure storage (iOS Keychain / Android Keystore) via expo-secure-store.
G-SEC-05: No Jailbreak/Root Detection
No runtime integrity checks exist. Compromised devices can access the MMKV storage sandbox.
G-SEC-06: No Data Residency Routing
UK and Australian users share a single TRPC_URL. Data should be routed to jurisdiction-appropriate endpoints.
Testing Gaps
G-TEST-01: Zero Test Coverage
package.json declares jest-expo preset and Jest as a devDependency, but no test files exist. Running pnpm test starts Jest in watch mode with 0 test suites.
G-TEST-02: No React Native Testing Library
@testing-library/react-native is not installed. Component testing is not possible without it.
G-TEST-03: No Geofencing Logic Tests
The location-service contains complex state machine logic (enter/exit, deduplication lock, daily notification limits) with no test coverage. Race conditions in notificationLock are untested.
G-TEST-04: No Auth Flow Tests
The WebView token extraction flow is completely untested. No mock for react-native-webview exists.
G-TEST-05: No Accessibility Tests
No @testing-library/jest-native accessibility assertions are in place. WCAG/APCA compliance for medical data screens is unverified.
G-TEST-06: No E2E Tests
No Maestro or Detox E2E test suite exists. Critical medical data flows (logbook entry, timesheet, wellness questionnaire) have never been tested end-to-end.
G-TEST-07: No Compliance Tests
No tests verify GDPR or AU Privacy Act requirements (data isolation by region, consent capture, right-to-erasure token clearing).
CI/CD Gaps
G-CICD-01: No Mobile CI Pipeline
The monorepo CI (ci.yml) does not include any mobile/ppp/ path filters or test jobs. No lint, type-check, or test runs occur for the mobile codebase on PRs.
G-CICD-02: Native Build Pipeline (not EAS Cloud)
Builds run via .github/workflows/mobile-build-native.yml on GitHub-hosted and self-hosted macOS runners using native xcodebuild (iOS) and Gradle (Android) — not EAS Cloud. The workflow is called by mobile-cd.yml once daily on a schedule for uat (previously on every push, changed by #11149) and can also be triggered manually via workflow_dispatch. TestFlight upload is via xcrun altool; Play Store via r0adkll/upload-google-play.
G-CICD-03: No Automated Store Submission
TestFlight and Google Play Internal Track submissions are performed manually. There is no automated pipeline for main → store submission.
G-CICD-04: No Mobile Dependency Audit
The weekly security-scan.yml workflow does not include mobile/ppp/ in its pnpm audit scope.
G-CICD-05: No EAS Secrets in GitHub Actions
EXPO_TOKEN, Apple ASC credentials, and Android keystore are not configured as GitHub Actions secrets, blocking automated EAS builds.
Code Quality Gaps
G-QUALITY-01: Minimal ESLint Configuration
.eslintrc.json contains only:
{ "env": { "es6": true }, "parserOptions": { "sourceType": "module" } }No React Native rules, no TypeScript rules, no security plugin, no accessibility plugin.
G-QUALITY-03: No Prettier Config
The mobile app inherits root Prettier configuration. An explicit mobile/ppp/.prettierrc.json should be present for clarity and IDE integration.
G-QUALITY-04: No Pre-commit Hooks
The root monorepo uses husky + lint-staged. The mobile directory has neither, allowing unformatted or broken TypeScript to be committed.
G-QUALITY-05: yarn vs pnpm Divergence (RESOLVED)
The mobile app now uses pnpm (>= 9), aligned with the monorepo package manager. The yarn.lock file has been replaced with pnpm-lock.yaml.
G-QUALITY-06: Hardcoded 2-Second Delay
lib/services/location-service.ts:621:
await new Promise(resolve => setTimeout(resolve, 2000));This is acknowledged in the comment as a workaround for native module initialization. It should be replaced with a proper isTaskDefined polling or event-based check.
G-QUALITY-07: any Types in Use
app/index.tsx:57: (event: any) — violates the monorepo's TypeScript no-any policy. lib/services/location-service.ts:156: { data: any; error: TaskManager.TaskManagerError | null } — the task data type should be narrowed.
G-QUALITY-08: Console Logs in Production Code
Extensive console.log / console.error calls exist throughout location-service.ts. While babel-plugin-transform-remove-console is installed, it must be verified as active in production builds.
Feature Gaps (User-Facing)
G-FEAT-01: Offline Mode
No offline queue for timesheet creation or logbook entries. If the device loses connectivity inside a hospital geofence, the automatic timesheet creation will silently fail.
G-FEAT-02: No Biometric Authentication
After the initial WebView login, there is no biometric lock (Face ID / fingerprint) to protect re-entry after backgrounding.
G-FEAT-03: Android HealthKit Equivalent
react-native-health is iOS-only. No Android Health Connect integration exists.
G-FEAT-04: Deep Linking
The ppp:// URL scheme is registered (app.config.js) and an OAuth callback handler in app/_layout.tsx processes ppp://wellness/<provider>/callback deep links for Whoop and Garmin (shipped in #4701). Push notification taps do not rely on URL schemes — they route via expo-notifications data payloads in NotificationContext.tsx. Remaining gap: no deep-link entry points for password-reset or other transactional email flows.
G-FEAT-05: No Error Boundary
No React error boundary wraps the tab screens. An unhandled JavaScript error will crash the app with a red screen in development and a white screen in production.