Skip to main content
The starter keeps provider SDKs behind package adapters. Runtime selection is not uniform: product adapters come from amisi.config.json, while analytics and feature availability come from packages/config/src/flags.ts.

Runtime behavior

At startup, apps/mobile/app/_layout.tsx composes services as follows:
  • Auth initializes through AuthProvider immediately.
  • Subscriptions initialize only for an authenticated user and only when flags.enableSubscriptions is true.
  • Notifications initialize and register after authentication.
  • Analytics initializes Firebase when analytics or crash reporting flags are true.
  • EXPO_PUBLIC_DEMO_MODE=true overrides all four services to mock behavior.
Changing amisi.config.json changes every build that includes that file. It does not automatically select a different adapter per EAS environment.

Authentication

Set auth.adapter to mock or firebase:
amisi.config.json
The Firebase adapter currently implements email/password sign-in and sign-up, custom-token sign-in, Google and Apple ID-token sign-in, password reset, email verification, action-code application, user reload, ID tokens, session observation, and sign-out. It uses React Native Firebase and is unavailable on web. Optional adapter options include tenantId and an Auth Emulator host and port. The visible Configurator Theme form can write these options. app/_layout.tsx also injects email-verification action-code settings from the Firebase environment variables. The mock adapter simulates email/password, custom-token, Google, and Apple sessions in memory. It is not real authentication.

Subscriptions

Set subscriptions.adapter to mock or revenuecat:
amisi.config.json
app/_layout.tsx passes the shared or platform-specific RevenueCat SDK keys from @amisi-mobile-starter/config. RevenueCat requires apiKey, or the appropriate iosApiKey/androidApiKey; a shared key takes precedence. The adapter is unavailable on web. The provider mounts only when enableSubscriptions is true. Current flags disable it in development and enable it in preview and production. Demo mode still resolves a mock configuration, but the feature flag determines whether the provider mounts. The mock adapter simulates product and entitlement behavior. It does not contact a store or process payment.

Notifications

Set notifications.adapter to mock, expo, or onesignal:
amisi.config.json
For OneSignal, startup merges the environment app ID into adapter options. If it is absent, initialization fails after login unless notifications.options.appId already contains a value. app.config.js sets the OneSignal plugin to development mode for development builds and production mode for preview and production builds. Although enablePushNotifications differs by environment, the current root layout does not consult it before notification initialization. Adapter selection, authentication, and demo mode control the active behavior.

Analytics and crash reporting

Analytics is not selected in amisi.config.json. Current startup uses:
  • Firebase Analytics and Crashlytics when enableAnalytics or enableCrashReporting is true.
  • Mock analytics in demo mode.
  • Mock fallback only when both Firebase flags are false and enableMockAnalyticsFallback is true.
All three current environment flag sets enable Firebase analytics and crash reporting. EXPO_PUBLIC_ANALYTICS_ENABLED is parsed and exposed by @amisi-mobile-starter/config, but it does not currently alter those flags. Change packages/config/src/flags.ts if you intentionally need different analytics behavior. The Firebase adapter requires a native build and React Native Firebase configuration. It can initialize from native Firebase files, or from complete Firebase app options assembled in _layout.tsx. The mock adapter is a no-op event sink.

Feature flags

packages/config/src/flags.ts selects a fixed object from EXPO_PUBLIC_APP_ENV. Relevant current differences are: enableDemoMode comes from EXPO_PUBLIC_DEMO_MODE in every environment.

Apply and test changes

  1. Update amisi.config.json and required environment values.
  2. Add or update provider-native files and plugin configuration.
  3. Rebuild when changing a native provider or Expo plugin.
  4. Test with a development or preview build before release.
Expo Go is not sufficient for the included React Native Firebase, RevenueCat, and OneSignal native integrations.

Provider documentation

Next steps