mobile-app: Unified React Native + Expo app combining Planner and Journal. OAuth2 PKCE auth, MapLibre maps, versioned REST API with Zod schemas, configurable server URL, offline SQLite, Web Push relay notifications. TanStack Query + Zustand state management. Jest + Maestro testing. 76 tasks across 5 phases. map-core-package: Extract renderer-agnostic map definitions (tiles, color palettes, POI categories, z-index) into @trails-cool/map-core. Pure refactor preparing for MapLibre on mobile. 27 tasks. mobile-activity-recording: GPS recording, live stats, HealthKit/Health Connect export. Separated from mobile-app for independent scheduling. mobile-nearby-sync: BLE route sync between nearby devices for offline group riding. QR waypoint sharing as simpler v1. TXQR noted as future. journal-rest-api spec: Full API contract — endpoints, auth, pagination, errors, discovery, versioning, BRouter proxy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 KiB
2 KiB
ADDED Requirements
Requirement: Expo app scaffold
The system SHALL provide a React Native + Expo managed workflow app at apps/mobile/ in the monorepo, sharing workspace packages.
Scenario: App boots on iOS and Android
- WHEN the app is launched on iOS or Android
- THEN the Expo managed app loads, displays the tab navigation, and renders the Map tab by default
Scenario: Monorepo integration
- WHEN the mobile app is built
- THEN it resolves
@trails-cool/types,@trails-cool/gpx, and@trails-cool/i18nfrom pnpm workspace dependencies
Requirement: Tab navigation
The system SHALL provide a bottom tab bar with four tabs: Map, Routes, Activities, and Profile.
Scenario: Tab switching
- WHEN the user taps a tab (Map, Routes, Activities, or Profile)
- THEN the corresponding screen is displayed and the active tab is visually highlighted
Scenario: Tab state preservation
- WHEN the user switches between tabs
- THEN each tab preserves its scroll position and navigation stack
Requirement: Authentication flow
The system SHALL require Journal account authentication before accessing protected screens.
Scenario: First launch
- WHEN the user opens the app for the first time
- THEN a login screen is shown with the option to enter their Journal instance URL and authenticate
Scenario: Session persistence
- WHEN the user has previously authenticated and reopens the app
- THEN stored tokens are loaded from SecureStore and the user is logged in automatically
Requirement: Deep linking
The system SHALL handle deep links for opening routes and activities.
Scenario: Open route via deep link
- WHEN the app receives a deep link like
trailscool://routes/:id - THEN the app navigates to the route detail screen for that route
Scenario: Open Planner for collaborative editing
- WHEN the user taps "Edit in Planner" on a route
- THEN the system opens the Planner web URL in the device browser with the appropriate session callback