north-star / mobile / files / docs / react-native-migration.md
Branch mobile · default branch · all branches
react-native-migration.md
3a20a898 2026-03-17 Pavel Safronov | 1 | # React Native Migration |
| 2 | ||
| 3 | This repository now includes an Expo-based mobile app in `mobile/`. | |
| 4 | ||
| 5 | ## Current State | |
| 6 | ||
| 7 | - Expo TypeScript project scaffolded in `mobile/` | |
| 8 | - Initial screen implemented: room create/join flow | |
| 9 | - Reused room hash logic in `mobile/src/core/room.ts` | |
| 10 | - Mirrored runtime constants in `mobile/src/public_settings.ts` | |
| 11 | - Firebase session init added in `mobile/src/platform/firebase.ts` | |
| 12 | - Room screen now includes a Firebase connection action | |
| 13 | ||
| 14 | ## Simplicity-First Strategy | |
| 15 | ||
| 16 | - Keep web app in `src/` as production baseline | |
| 17 | - Keep React Native app in `mobile/` during migration | |
| 18 | - Migrate feature-by-feature without introducing a shared package yet | |
| 19 | - Revisit shared package extraction only after multiple duplicated modules exist | |
| 20 | ||
| 21 | ## Run Mobile App | |
| 22 | ||
| 23 | ```bash | |
| 24 | cd mobile | |
| 25 | npm install | |
| 26 | npm run start | |
| 27 | ``` | |
| 28 | ||
| 29 | ## What Is Migrated So Far | |
| 30 | ||
| 31 | - Room id generation | |
| 32 | - Room hash build and parse logic | |
| 33 | - Initial app shell and basic state handling | |
| 34 | - Firebase app init and anonymous sign-in | |
| 35 | ||
| 36 | ## Next Steps | |
| 37 | ||
| 38 | 1. Port crypto module with React Native-compatible Web Crypto support | |
| 39 | 2. Add Firebase initialization and anonymous auth for mobile | |
| 40 | 3. Port friends sync logic from web feature modules | |
| 41 | 4. Add geolocation tracking with foreground updates first | |
| 42 | 5. Add background geolocation and platform permission setup |