|
| 1 | +# Ruffl mobile app |
| 2 | + |
| 3 | +Ruffl is an Expo/React Native mobile app for iOS and Android. The codebase is TypeScript with Expo Router, which keeps navigation and business-facing screens consistent across both platforms. |
| 4 | + |
| 5 | +## Why this stack |
| 6 | + |
| 7 | +- One maintainable codebase for iOS and Android |
| 8 | +- Fast physical-device testing through Expo Go during early development |
| 9 | +- A clear path to production development builds when native notification, monitoring, and upload integrations are enabled |
| 10 | +- Strict TypeScript plus separately testable domain helpers |
| 11 | +- Secure device storage for the bearer token through Expo SecureStore |
| 12 | + |
| 13 | +## Install packages |
| 14 | + |
| 15 | +Requirements: |
| 16 | + |
| 17 | +- Node.js 20.19 or newer; Node 22 LTS is recommended |
| 18 | +- npm |
| 19 | +- Expo Go on an Android or iOS phone for the quickest local test |
| 20 | + |
| 21 | +```powershell |
| 22 | +npm install |
| 23 | +``` |
| 24 | + |
| 25 | +## Test the app on a physical phone |
| 26 | + |
| 27 | +1. Start `Ruffl-Backend` with `npm run dev`. |
| 28 | +2. Find the development computer's LAN IPv4 address with `ipconfig`. |
| 29 | +3. Copy `.env.example` to `.env`. |
| 30 | +4. Replace `localhost` in `EXPO_PUBLIC_API_URL` with that LAN address, for example `http://192.168.1.20:3000`. |
| 31 | +5. Make sure the phone and computer are on the same network. |
| 32 | +6. Start Expo: |
| 33 | + |
| 34 | +```powershell |
| 35 | +npm start |
| 36 | +``` |
| 37 | + |
| 38 | +7. Scan the QR code with Expo Go. |
| 39 | +8. Tap **Commissioner** or **Maker** on the demo sign-in panel. |
| 40 | + |
| 41 | +For local Expo Go testing this project intentionally targets Expo SDK 54. The current Expo documentation identifies SDK 54 as the compatible physical-device path during the SDK 57 transition. |
| 42 | + |
| 43 | +## Test with an emulator |
| 44 | + |
| 45 | +Start the backend and Expo, then: |
| 46 | + |
| 47 | +```powershell |
| 48 | +npm run android |
| 49 | +``` |
| 50 | + |
| 51 | +Android Emulator commonly reaches the host at `http://10.0.2.2:3000`; set that as `EXPO_PUBLIC_API_URL`. iOS Simulator can normally use `http://localhost:3000`: |
| 52 | + |
| 53 | +```powershell |
| 54 | +npm run ios |
| 55 | +``` |
| 56 | + |
| 57 | +The iOS Simulator requires macOS/Xcode. Android Studio is required for the Android emulator. |
| 58 | + |
| 59 | +## Automated validation |
| 60 | + |
| 61 | +```powershell |
| 62 | +npm run typecheck |
| 63 | +npm run lint |
| 64 | +npm test |
| 65 | +``` |
| 66 | + |
| 67 | +Tests cover price/deposit/payout calculations, progress percentage, and user-facing lifecycle labels. API permission and lifecycle tests live in `Ruffl-Backend`. |
| 68 | + |
| 69 | +## Available product flows |
| 70 | + |
| 71 | +- Commissioner and maker signup/login with one-tap local demo accounts |
| 72 | +- Role-aware home summaries and activity |
| 73 | +- Maker search, queue status, pricing, profiles, reviews, and waitlist joining |
| 74 | +- Structured commission requests and price negotiation |
| 75 | +- Explicitly simulated deposit and milestone releases |
| 76 | +- Ordered milestone updates and approvals |
| 77 | +- Shipping, receipt confirmation, review, and dispute entry points |
| 78 | +- One inbox over commission/direct/dispute/support conversation types |
| 79 | +- Maker-local price/payout calculator |
| 80 | +- Warning and suspension-aware session handling |
| 81 | + |
| 82 | +## Production development builds |
| 83 | + |
| 84 | +Expo Go is appropriate for the current integration-light development phase. Before app-store testing, install the Expo development client and create development builds: |
| 85 | + |
| 86 | +```powershell |
| 87 | +npx expo install expo-dev-client |
| 88 | +npx eas-cli@latest build:configure |
| 89 | +npx eas-cli@latest build --profile development --platform android |
| 90 | +npx eas-cli@latest build --profile development --platform ios |
| 91 | +``` |
| 92 | + |
| 93 | +EAS requires an Expo account. A macOS build machine is not required when using EAS cloud builds, but Apple Developer and Google Play accounts are required for store distribution. |
| 94 | + |
| 95 | +## Known boundary |
| 96 | + |
| 97 | +Media picking/upload UI, native Expo Push registration, and Sentry initialization need the real service credentials and production development builds. The backend already defines the relevant data and upload-slot boundaries. All money actions are deliberately labelled simulated because there is no payment processor. |
| 98 | + |
| 99 | +As of 26 July 2026, `npm audit --omit=dev` reports high-severity advisories in transitive Expo/React Native build-tool dependencies (`brace-expansion` and `postcss`) with no compatible fix published for the SDK 54 tree. The backend and admin production dependency audits are clean. Do not run `npm audit fix --force` blindly because it can move native packages outside Expo's supported version set; reassess the advisories when moving from Expo Go to a production development build. |
0 commit comments