Build a production-ready React Native mobile app for iOS and Android that integrates with the existing Ajo backend and Soroban smart contract flows. The mobile app should support core savings-group workflows, real-time updates, and secure wallet-aware authentication.
- Deliver a native mobile client for iOS and Android from a single React Native codebase.
- Reuse existing backend APIs and business rules where possible.
- Provide an excellent mobile-first UX for core user journeys.
- Support offline-friendly behavior for read paths and safe retry for write operations.
- Maintain security parity with the web app (auth, token handling, data protection).
- Authentication and session management.
- Groups listing, details, membership, and contribution actions.
- Transaction history and contribution timeline/calendar view.
- Notifications center and unread state.
- Basic profile/settings.
- Deep links for group invites.
- Analytics and crash monitoring.
- Full chat parity if backend/mobile push strategy is not finalized.
- Advanced onboarding experiments.
- Non-essential admin features.
- Platform support: iOS (latest 2 major versions), Android (API 26+).
- Performance:
- Cold start target: under 3.0s on mid-tier Android.
- Primary screen transitions: under 300ms perceived latency.
- Accessibility:
- Screen reader labels on all controls.
- Keyboard and switch-access navigability where applicable.
- Reliability:
- App must gracefully handle intermittent network.
- Retry strategy with exponential backoff for transient failures.
- React Native with Expo (managed workflow) for rapid cross-platform delivery.
- TypeScript for strict typing.
- React Navigation for routing.
- TanStack Query for server state and cache.
- Zustand for lightweight client state.
- Axios for networking.
- date-fns for date and timezone-safe formatting.
- react-native-mmkv or secure storage combo for token/session storage.
- Expo Notifications / FCM / APNs for push notifications.
- Sentry for crash/error monitoring.
- Presentation Layer: screens/components with platform-adaptive UI.
- Domain Layer: hooks/use-cases for feature logic.
- Data Layer: API clients, DTO mapping, cache/persistence adapters.
- Platform Layer: push notifications, deep links, secure storage, biometrics (optional).
- Screen action triggers domain hook.
- Hook calls API/contract service via TanStack Query mutation or query.
- API responses are normalized into mobile domain models.
- Query cache updates UI immediately and persists critical snapshots for offline display.
Create a new top-level mobile workspace:
mobile/
app/
src/
components/
screens/
navigation/
hooks/
services/
store/
utils/
types/
constants/
assets/
app.json
package.json
tsconfig.json
- Reuse existing backend endpoints for auth, groups, contributions, transactions, and notifications.
- Define a mobile API client with:
- request/response typing,
- auth interceptor,
- retry and timeout policies,
- consistent error mapping to user-friendly states.
- Add API compatibility checks in CI using mocked responses from backend contracts.
- Use wallet-linked login flow consistent with current backend expectations.
- Store access/refresh tokens in secure storage (never AsyncStorage for secrets alone).
- Implement silent token refresh and session invalidation.
- Protect sensitive screens behind auth guards.
- Add jailbreak/root detection as a hardening follow-up task.
- Read-through cache for groups, transactions, and profile data.
- Queue write intents (contribute/join) only when safe and idempotent.
- Surface sync state to user: Pending, Synced, Failed.
- Use deterministic idempotency keys for mutation retries.
- Add monthly contribution calendar view in mobile detail screen.
- Color coding:
- paid,
- pending,
- late,
- missed.
- Day detail sheet with amount, member context, and transaction status.
- Export/subscribe calendar follow-up via backend-generated ICS endpoint if needed.
- Push categories:
- contribution due reminders,
- successful contribution confirmations,
- payout events,
- group activity highlights.
- Optional socket polling fallback if persistent websocket is not stable on backgrounded apps.
- Add Sentry (errors, stack traces, release health).
- Add analytics events for key funnel steps:
- app_open,
- login_success,
- contribution_initiated,
- contribution_success,
- invite_opened.
- Add feature flags for staged rollout.
- Hooks, reducers/store, date helpers, API mappers.
- Critical screens and state transitions (loading, error, empty, success).
- Auth flow, group join, contribution flow, transaction list refresh.
- Use Detox/Appium for smoke paths on iOS and Android CI runners.
- Performance baseline test on low/medium devices.
- Accessibility audit pass for major screens.
- Add mobile CI pipeline:
- lint,
- type-check,
- unit/component tests,
- build validation for iOS/Android.
- Use EAS Build for signed artifacts.
- Rollout strategy:
- internal QA,
- closed beta,
- phased production rollout.
- Bootstrap mobile app workspace.
- Configure navigation, theming, env management, secure storage.
- Set up CI and crash reporting.
- Auth/session flow.
- Group listing and detail screens.
- Join and contribution mutations.
- Transaction history and contribution calendar.
- Push notification integration.
- Deep link invites.
- E2E coverage, performance tuning, accessibility fixes.
- Beta release and feedback loop.
- Wallet interaction differences on mobile:
- Mitigation: abstraction layer and early POC with target wallet providers.
- Network instability and transaction reliability:
- Mitigation: idempotent retries and explicit sync states.
- Scope creep from web parity pressure:
- Mitigation: MVP scope lock and feature flagging.
- Mobile app builds and runs on iOS and Android.
- User can authenticate, view groups, join group, contribute, and view transaction history.
- Calendar/timeline for contribution activity is available and readable.
- Notifications arrive for at least contribution and payout events.
- Core flows have automated tests and pass CI.
- Crash monitoring and analytics are active in non-local environments.
- Working branch for this issue:
feature/mobile-app-react-native-397