3.6 KiB
3.6 KiB
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
- mobile follows the intended Expo / React Native MVP path
mobile/package.jsonalready consumes multiple shared@bytelyst/*packages@bytelyst/offline-queueis already part of the current mobile direction
Phase M0 — Identity and Config Alignment
- Align mobile config with
shared/product.json - Remove hardcoded raw identity values where a canonical source can be used
- Standardize auth storage prefix with web/backend
- Standardize platform/product base URL strategy
Phase M1 — Shared Client and SDK Alignment
- Keep
@bytelyst/auth-clientas auth foundation - Keep
@bytelyst/api-clientas product-backend client foundation - Keep
@bytelyst/platform-clientas platform-service client foundation - Keep
@bytelyst/offline-queueas 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 - Delete or replace
mobile/src/lib/platform.ts - Delete or replace
mobile/src/lib/telemetry.ts - 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 -
Replace fallback notes as the primary runtime path
-
Replace inline workspace returns with real API calls
-
Persist note edits to the backend
-
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.tsmobile/src/api/auth.tsmobile/src/api/client.tsmobile/src/api/notes.tsmobile/src/api/workspaces.tsmobile/src/lib/platform.tsmobile/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