diff --git a/README.md b/README.md index f3a4956..dfd7503 100644 --- a/README.md +++ b/README.md @@ -404,9 +404,14 @@ frontend-mobile/ ### EAS Build Profiles -- **development**: Local development with dev client -- **preview**: Internal testing (APK/IPA) -- **production**: App Store/Google Play submission +| Profile | Platform | Build Type | Use Case | +|---------|----------|------------|----------| +| `development` | iOS | Simulator | Local testing on Mac | +| `development` | Android | APK | Local testing on device | +| `preview` | Android | APK | Internal testing & sharing | +| `production` | Android | AAB | Google Play Store submission | + +**Note:** iOS builds require Apple Developer account ($99/year) and are configured separately. ### Environment Configuration @@ -424,6 +429,100 @@ const ENV = { }; ``` +## 🚀 Production Deployment (Mobile) + +### Distribution Flow + +``` +Development → EAS Build → App Store / Google Play → User Device +``` + +The mobile app is a **native application** that runs directly on the device. No Docker or server needed - users download it from the app stores. + +### Step 1: Setup Expo Account + +```bash +# Install EAS CLI +npm install -g eas-cli + +# Create account at https://expo.dev + +# Login +eas login +``` + +### Step 2: Initialize EAS Project + +```bash +cd frontend-mobile +eas init +``` + +This generates a `projectId` - add it to `app.json`: +```json +"extra": { + "eas": { + "projectId": "your-project-id" + } +} +``` + +### Step 3: Configure Credentials + +**Android (Google Play):** +1. Create developer account ($25 one-time fee) +2. Create project in Google Cloud Console +3. Enable Play Developer API +4. Download `google-service-account.json` +5. Place in `frontend-mobile/` directory + +**iOS (App Store):** +1. Join Apple Developer Program ($99/year) +2. Create App ID in Apple Developer portal +3. Generate certificates and provisioning profiles +4. Update `eas.json` with your credentials + +### Step 4: Build for Production + +```bash +# Android (Google Play) +eas build --profile production --platform android + +# iOS (App Store) +eas build --profile production --platform ios +``` + +### Step 5: Submit to Stores + +```bash +# Submit to Google Play +eas submit --profile production --platform android + +# Submit to App Store +eas submit --profile production --platform ios +``` + +### OTA Updates (Without App Store Review) + +Push updates directly to users without going through store review: + +```bash +# Install expo-updates +npx expo install expo-updates + +# Send update +eas update --branch production --message "Fix: improved search" +``` + +### Useful Commands + +| Command | Description | +|---------|-------------| +| `eas build:list` | View previous builds | +| `eas build:cancel ` | Cancel a build | +| `eas submit:list` | View previous submissions | +| `eas update` | Send OTA update | + ## 🐛 Troubleshooting ### Redis Connection Issues