packages/feed/docs/planning/mobile/07-status.md
| Phase | Status | Details |
|---|---|---|
| Phase 0: PoC | ✅ Complete | Privy verified on Android emulator + Pixel 10 |
| Phase 1a: Web refactors | ✅ Complete | ~190 fetch calls, 3 API routes, shared code moves |
| Phase 1b: Mobile app | ✅ Complete | 39 pages, 41 HTML output, 32MB static export |
| Phase 2: Capacitor integration | ✅ Code complete | AppUrlListener, OAuth config, CORS, deep link files |
| Phase 3: Native features | ✅ Code complete | Haptics, push, status bar, deep links, app icon |
| Phase 4: App Store prep | ❌ Not started | Screenshots, descriptions, signing, legal |
| Phase 5: Submit | ❌ Not started | TestFlight, Play Store, review |
apiUrl() utility (apps/web/src/utils/api-url.ts)useSSE.ts, SSEManager.ts)app/ directory/api/onchain, /api/nft/mint/execute, /api/profiles/resolve/[identifier])apps/mobile/ with Next.js static export (output: 'export')apps/web/src/@web/ alias for web page imports without route discoverygenerateStaticParamscapacitor.config.ts with dev/prod mode supportpackage.jsonAppUrlListener component for Privy OAuth deep linkscustomOAuthRedirectUrl passed to Privy via Providers propisNativePlatform, getPlatform, isIOS, isAndroid)apple-app-site-association + assetlinks.json (placeholder IDs)--keyboard-height)@capacitor/assets generate script| Item | Needs | Who |
|---|---|---|
npx cap add ios | macOS + Xcode | Anyone with a Mac |
bun run generate:assets | Run after cap add | Same |
| Privy dashboard: Capacitor allowed origins | Dashboard login | Admin |
| Privy dashboard: OAuth redirect URL | Dashboard login | Admin |
Vercel: CORS_ALLOWED_ORIGINS env var | Vercel dashboard | Admin |
apple-app-site-association TEAM_ID | Apple Developer account | Admin |
assetlinks.json SHA256 | Android signing keystore | Admin |
iOS Info.plist + Android AndroidManifest.xml | After cap add generates native projects | Dev |
| Firebase project for FCM push delivery | Firebase console | Admin |
| Push sending service | Backend worker or OneSignal | Backend dev |
| Item | Type | Owner |
|---|---|---|
| Prediction markets — gambling classification? | Legal research | Legal |
| Stripe IAP — use Apple IAP or remove purchases? | Business decision | Product |
| Item | Needs | Owner |
|---|---|---|
| Screenshots (iPhone + Android) | Device captures | Design |
| Store descriptions + keywords | Copywriting | Marketing |
| Privacy policy | Legal document | Legal |
| Code signing (iOS + Android) | Developer accounts | Admin |
| TestFlight / Play Store internal testing | Build + submit | Dev |
| Risk | Status | Notes |
|---|---|---|
| Privy in WebView | ✅ Verified | Tested on emulator + real device |
| CORS blocks API calls | ✅ Fixed in code | Deploy to Vercel pending |
| Fetch calls use relative URLs | ✅ All updated | ~190 calls across ~150 files |
| Server actions in static export | ✅ Converted | 3 API routes created |
Shared code imports @/app/ | ✅ Moved | 6 imports resolved |
| Apple rejects as web wrapper | ⚠️ Medium risk | Native plugins provide mitigation |
| Apple rejects for prediction markets | ⚠️ Unknown risk | Legal research needed |
| Cookie auth cross-origin | ⚠️ Low risk | Bearer token fallback exists |
| SSE on mobile | ⚠️ Low risk | Reconnection logic exists, needs testing |
| Stripe in WebView | ⚠️ Unknown | Needs testing + IAP decision |
# 1. Install dependencies
bun install
# 2. Initialize the Android project (only needed once)
cd apps/mobile && npx cap add android
# 3. Generate app icons and splash screens
bun run generate:assets
# 4. Build the mobile Next.js app and sync to Android project
bun run mobile:build
The android/ directory will appear in apps/mobile/android/ on your host
machine via the bind mount — open it directly in Android Studio.
# --- Inside devcontainer ---
# Start the mobile dev server (port 3077 is forwarded to your host automatically)
cd apps/mobile && bun run dev
# --- On your host machine ---
# Forward device's localhost to host's localhost:3077
# (for physical device connected via USB)
~/Android/Sdk/platform-tools/adb reverse tcp:3077 tcp:3077
# For emulator, use 10.0.2.2 instead of localhost in the config below
Set CAPACITOR_SERVER_URL in your .env (or export it):
# Physical device (via adb reverse)
CAPACITOR_SERVER_URL=http://localhost:3077
# Android emulator (accesses host via 10.0.2.2)
CAPACITOR_SERVER_URL=http://10.0.2.2:3077
Then rebuild and sync:
# Inside devcontainer
cd apps/mobile && bun run mobile:build
# Open android/ in Android Studio and run the app
Port forwarding chain (physical device):
Android device (localhost:3077)
→ adb reverse →
Host machine (localhost:3077, forwarded from devcontainer)
→ devcontainer port forward →
Devcontainer (localhost:3077 = Next.js mobile dev server)
cd apps/mobile
# Set env vars
NEXT_PUBLIC_API_URL=https://play.feed.market \
NEXT_PUBLIC_PRIVY_APP_ID=<privy-app-id> \
bun run build
# Sync to native projects
npx cap sync
# Generate all icon/splash sizes
bun run generate:assets
# Open in IDE
npx cap open android # or npx cap open ios
cd /path/to/bab
bun test packages/testing/unit/mobile/ --preload ./packages/testing/unit/preload.ts
# 46 tests, 3 test files