# Mobile Reuse Alignment Roadmap Status: Draft Parent: `docs/ARCHITECTURE_REVIEW_AND_REUSE_ROADMAP.md` Scope: `mobile/` # Goal Make the React Native / Expo MVP follow the ByteLyst reuse-first path more strictly by removing temporary local wrapper code and relying on shared clients and shared platform capabilities wherever available. # Baseline Already Confirmed - [x] mobile follows the intended Expo / React Native MVP path - [x] `mobile/package.json` already consumes multiple shared `@bytelyst/*` packages - [x] `@bytelyst/offline-queue` is already part of the current mobile direction # Phase M0 — Identity and Config Alignment - [x] Align mobile config with `shared/product.json` - [x] Remove hardcoded raw identity values where a canonical source can be used - [x] Standardize auth storage prefix with web/backend - [x] Standardize platform/product base URL strategy # Phase M1 — Shared Client and SDK Alignment - [x] Keep `@bytelyst/auth-client` as auth foundation - [x] Keep `@bytelyst/api-client` as product-backend client foundation - [x] Keep `@bytelyst/platform-client` as platform-service client foundation - [x] Keep `@bytelyst/offline-queue` as queue foundation - [ ] Evaluate actual runtime adoption path for `@bytelyst/react-native-platform-sdk` # Dependency Notes - [ ] Complete M0 before broad auth/storage cleanup - [ ] Complete M2 before declaring mobile reuse alignment healthy - [ ] Use backend contract decisions to drive M3 data-shape cleanup - [ ] Coordinate telemetry/diagnostics/blob/extraction choices with the platform/shared-services roadmap # Phase M2 — Remove Placeholder Local Wrappers Checkpoint: - Placeholder wrapper cleanup completed in [`86e2da8`](https://github.com/saravanakumardb1/learning_ai_notes/commit/86e2da8) - [x] Delete or replace `mobile/src/lib/platform.ts` - [x] Delete or replace `mobile/src/lib/telemetry.ts` - [x] Audit other local helper files for no-op or placeholder behavior - [ ] Keep only thin product-specific composition helpers that add real value # Phase M3 — Replace Fallback Runtime Paths Checkpoint: - Mobile backend-backed runtime alignment completed in [`8580ad3`](https://github.com/saravanakumardb1/learning_ai_notes/commit/8580ad3) - [x] Replace fallback notes as the primary runtime path - [x] Replace inline workspace returns with real API calls - [x] Persist note edits to the backend - [x] Align mobile note detail with real backend fields - [ ] Ensure approval/activity flows use real backend-backed data where intended # Phase M4 — Shared Platform Completion - [ ] Wire real telemetry through shared client/runtime path - [ ] Wire diagnostics if supported on the selected RN path - [ ] Keep blob/extraction/feature flag integrations on shared-platform rails - [ ] Avoid creating product-local substitutes for shared platform capabilities # Phase M5 — Verification - [ ] Add tests for auth/bootstrap behavior - [ ] Add tests for API wrapper behavior - [ ] Add tests for store behavior under real backend contracts - [ ] Add smoke tests for note list/detail/edit flows # High-Collision Areas - [ ] `mobile/src/api/config.ts` - [ ] `mobile/src/api/auth.ts` - [ ] `mobile/src/api/client.ts` - [ ] `mobile/src/api/notes.ts` - [ ] `mobile/src/api/workspaces.ts` - [ ] `mobile/src/lib/platform.ts` - [ ] `mobile/src/lib/telemetry.ts` - [ ] mobile stores that assume local-only persistence # Done When - [ ] mobile relies primarily on shared clients and shared platform capabilities - [ ] no fake wrapper files remain - [ ] no inline workspace or long-term fallback note runtime remains - [ ] notes-specific mobile UX remains local and intentional