Skip to main content

@amisi-mobile-starter/config

@amisi-mobile-starter/config is the workspace boundary for environment access and amisi.config.json normalization.

App configuration

amisiConfig contains appIdentity, branding, auth, subscriptions, notifications, security, and theme.ui. Auth supports mock | firebase; subscriptions support mock | revenuecat; notifications support mock | onesignal | expo plus optional options. Security defaults to 60 seconds for foreground inactivity, 60 seconds in the background, and enabled biometrics. Theme UI reads these exact paths:
  • theme.ui.light.colors and theme.ui.dark.colors
  • theme.ui.radius
  • theme.ui.shadow
  • theme.ui.controls
  • theme.ui.styling.adapter
uiStylingAdapter is nativewind | uniwind. Invalid or missing values fall back to nativewind.

Environment

EXPO_PUBLIC_API_URL defaults to https://api.example.com. EXPO_PUBLIC_APP_ENV is development | preview | production and defaults to development. Boolean strings for analytics, debug mode, and demo mode are transformed to booleans. The exported helpers are getEnv, isProduction, isDevelopment, isPreview, getApiUrl, isDebugMode, isAnalyticsEnabled, and isDemoMode.

Feature flags

isFeatureEnabled returns false for numeric flags. getFeatureValue preserves the selected flag’s type. overrideFlag changes the cached object; resetFlags clears the cache used by the next getFlags() call. The already exported flags reference is not reassigned.

Build variants

BuildVariant contains name, apiUrl, enableLogging, enableSourceMaps, minifyCode, bundleId, appName, versionSuffix, sentryEnabled, analyticsEnabled, and strictMode. Selection follows EXPO_PUBLIC_APP_ENV.