Documentation Index
Fetch the complete documentation index at: https://docs.mobile-starter.amisi.ai/llms.txt
Use this file to discover all available pages before exploring further.
@amisi/config
@amisi/config centralizes environment variables, feature flags, and build variants.
Rule
No package reads process.env directly.
Import env, flags, and buildVariant from @amisi/config.
Environment (env)
Environment variables are validated via a Zod schema.
import { env } from '@amisi/config';
const apiUrl = env.EXPO_PUBLIC_API_URL;
Helpers:
import {
isDevelopment,
isPreview,
isProduction,
getApiUrl,
} from '@amisi/config';
if (isDevelopment()) {
// dev only
}
const apiUrl = getApiUrl();
Feature flags (flags)
Flags are environment-specific defaults with simple helpers.
import { flags, isFeatureEnabled, getFeatureValue } from '@amisi/config';
if (flags.enableSubscriptions) {
// show paywall entry points
}
if (isFeatureEnabled('enableDebugMenu')) {
// show debug UI
}
const timeoutMs = getFeatureValue('apiTimeout');
Build variants (buildVariant)
Build variants provide stable app-level configuration (app name, bundle id, logging, etc.).
import { buildVariant } from '@amisi/config';
const baseUrl = buildVariant.apiUrl;
const appName = buildVariant.appName;
Common helpers:
import {
getAppName,
getBundleId,
isLoggingEnabled,
isSentryEnabled,
} from '@amisi/config';
const name = getAppName();
const bundleId = getBundleId();
const canLog = isLoggingEnabled();
const canSendCrashes = isSentryEnabled();