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
AuthProviderimmediately. - Subscriptions initialize only for an authenticated user and only when
flags.enableSubscriptionsis true. - Notifications initialize and register after authentication.
- Analytics initializes Firebase when analytics or crash reporting flags are true.
EXPO_PUBLIC_DEMO_MODE=trueoverrides all four services to mock behavior.
amisi.config.json changes every build that includes that file. It does not automatically select a different adapter per EAS environment.
Authentication
Setauth.adapter to mock or firebase:
amisi.config.json
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
Setsubscriptions.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
Setnotifications.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 inamisi.config.json. Current startup uses:
- Firebase Analytics and Crashlytics when
enableAnalyticsorenableCrashReportingis true. - Mock analytics in demo mode.
- Mock fallback only when both Firebase flags are false and
enableMockAnalyticsFallbackis true.
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
- Update
amisi.config.jsonand required environment values. - Add or update provider-native files and plugin configuration.
- Rebuild when changing a native provider or Expo plugin.
- Test with a development or preview build before release.