Configuration
Every environment setting the Storefront App reads — keys, payments, sign-in, region, maps, realtime and release values — and where branding lives instead.
Configuration
The app is configured in two places:
.envholds keys, hosts and switches: what differs between environments and builds. It is compiled into the native apps at build time, so a change needs a rebuild.- The brand file,
brand/storefront.brand.ts, holds how the app looks and what it opens on: colors, fonts, components, tabs and home screen. See Branding and Home Screens & Tabs.
Keep .env out of git. In a release pipeline, write it from your secrets before the build.
Required
| Key | What it is |
|---|---|
STOREFRONT_KEY | The store key (store_…) or network key (network_…), from Storefront → Settings → API |
FLEETBASE_KEY | A Fleetbase API key, from Developers → API Keys |
FLEETBASE_HOST | Your Fleetbase API: https://api.fleetbase.io on Fleetbase Cloud, or your own server |
GOOGLE_MAPS_API_KEY | Google Maps on Android, and address search |
APP_NAME | The app's name under its icon |
APP_IDENTIFIER | The Android application id (the iOS bundle id is set in Xcode; see Build & Release) |
Payments
| Key | Default | What it does |
|---|---|---|
PAYMENT_GATEWAY | stripe | stripe or qpay |
STRIPE_KEY | — | Stripe publishable key |
STRIPE_PAYMENT_UI | sheet | sheet (Stripe's payment sheet) or field (a card field in the checkout) |
STRIPE_ENABLE_APPLE_PAY, STRIPE_ENABLE_GOOGLE_PAY | false | Wallet buttons in the payment sheet |
TIP_INCREMENT | 50 | Tip step, in the currency's smallest unit |
PRIORITIZE_PICKUP | false | Start checkout on pickup instead of delivery |
The gateway's credentials are set in the Console. See Payments & Integrations.
Sign-in
| Key | Default | What it does |
|---|---|---|
APPLE_LOGIN_ENABLED | false | Sign in with Apple (iOS) |
GOOGLE_LOGIN_ENABLED | false | Sign in with Google (iOS and Android) |
GOOGLE_CLIENT_ID | — | The web OAuth client id, without .apps.googleusercontent.com |
GOOGLE_IOS_CLIENT_ID | — | The iOS OAuth client id, without .apps.googleusercontent.com |
Phone number and texted code is always available. See Sign-in.
Language and region
| Key | Default | What it does |
|---|---|---|
DEFAULT_LOCALE | en | The language the app starts in. A customer's own choice is remembered on their device |
AVAILABLE_LOCALES | en,mn,uk | The languages offered in the language switcher |
DEFAULT_COUNTRY | device region | The country the phone field starts on, as an ISO code, e.g. MN for +976 |
DEFAULT_COORDINATES | — | lat,lng used until the customer's location is known |
Maps and addresses
| Key | Default | What it does |
|---|---|---|
DEFAULT_MAP_TYPE | standard | standard, satellite, hybrid or terrain, on every map in the app |
DISABLE_GEOCODING_SCREEN | false | Add addresses with the map pin only. The address screen always offers Choose on the map; this skips address search altogether, for regions where it is weak |
Realtime
Live order status, driver positions and chat come over SocketCluster. On Fleetbase Cloud the defaults are right; set these when self-hosting.
| Key | Default | What it does |
|---|---|---|
SOCKETCLUSTER_HOST | socket.fleetbase.io | Your socket server |
SOCKETCLUSTER_PORT | 8000 | Its port |
SOCKETCLUSTER_SECURE | true | wss (true) or ws (false) |
SOCKETCLUSTER_PATH | /socketcluster/ | Its path |
Links
| Key | What it does |
|---|---|
TOS_URL, PRIVACY_URL | Terms and privacy policy, linked from the account screen and sign-in |
APP_LINK_PREFIX | The URL scheme for deep links, e.g. myshop for myshop:// |
Release values
| Key | What it does |
|---|---|
ANDROID_VERSION_CODE | Android versionCode; must go up for every Google Play upload |
ANDROID_VERSION_NAME | Android versionName, e.g. 1.3.0 |
ANDROID_STOREFRONT_APP_UPLOAD_STORE_FILE, …_STORE_PASSWORD, …_KEY_ALIAS, …_KEY_PASSWORD | The Android upload keystore. Without them a release build is signed with the debug key (fine for testing, not for Google Play) |
These can also be environment variables in CI rather than .env entries. See Build & Release.
Switching stores in development
In a debug build, values in a git-ignored env.dev.json at the repository root replace the .env values, so you can point the app at another store or Network without rebuilding:
{ "STOREFRONT_KEY": "network_…", "FLEETBASE_KEY": "flb_…" }Restart Metro after creating or deleting the file; edits to it apply on reload. Release builds ignore it, and native-only values (such as the Google Maps key on Android) still come from the build.
Older branding keys
Earlier versions set the look through .env. These keys still work, and the brand file overrides them, so existing builds keep their look until they move to a brand file:
| Key | Brand file equivalent |
|---|---|
APP_THEME, CUSTOM_COLORS, CUSTOM_COLORS_LIGHT, CUSTOM_COLORS_DARK | colors |
STORE_HEADER_* | components.storeHeader |
PRODUCT_CARD_STYLE, STORE_CATEGORIES_DISPLAY | components.productCard, components.storeCategories |
STORE_NAVIGATOR_TABS, STORE_NAVIGATOR_DEFAULT_TAB, STORE_NAVIGATOR_TAB_BAR_BG | navigation.store |
HOME_SCREEN, NETWORK_FOOD_TRUCKS_TAB | navigation.home, navigation.network.foodTrucks |
LOGIN_BG_IMAGE, BOOTSCREEN_BG_IMAGE, BOOTSCREEN_BACKGROUND_COLOR | assets, boot |
STORE_<TAB>_TAB_LABEL_<LOCALE>, STORE_<TAB>_TAB_ICON | navigation.tabs and brand/translations |
New builds should use the brand file: it is typed, validated and covers far more. See Branding.