FleetbaseFleetbase

Configuration

Complete reference for the Storefront App — every environment variable, every storefront.config.ts field, and what each one controls.

Configuration

The Storefront App is configured by a combination of:

  1. Environment variables in .env, read at build time via react-native-config (and inlined into the web build by Webpack).
  2. storefront.config.ts at the project root, which delegates to config/default.js — the customization surface for tabs, theming, layout, and feature flags.
  3. app.json — the React Native registry name (appName).
  4. Native configInfo.plist (iOS) and AndroidManifest.xml / build.gradle (Android), most of which read from your .env.

How storefront.config.ts Works

storefront.config.ts is a one-line delegate:

import { createStorefrontConfig } from './config/default';
export default createStorefrontConfig();

createStorefrontConfig(overrides) deep-merges your overrides on top of the env-driven defaults in config/default.js. Most teams don't edit storefront.config.ts at all and instead drive everything through .env. Edit it if you need to inject computed values or share config across builds.

Required Environment Variables

Without these, the app cannot start:

VarPurpose
APP_NAMEDisplay name shown in the JS layer (also used by iOS via xcconfig and Android via the manifest)
APP_IDENTIFIERiOS bundle ID / Android applicationId
FLEETBASE_HOSTYour Fleetbase API base URL
FLEETBASE_KEYFleetbase API secret key — Console → Developers
STOREFRONT_KEYstore_* (single store) or network_* (network) — Console → Storefront → Settings → API
GOOGLE_MAPS_API_KEYMaps SDK for iOS, Android, and (for web) JavaScript API

Backend & Real-Time

VarDefaultPurpose
FLEETBASE_HOSTFleetbase API host
FLEETBASE_KEYFleetbase API secret
STOREFRONT_KEYStorefront key (store_* or network_*)
SOCKETCLUSTER_HOSTReal-time host for live order/driver updates
SOCKETCLUSTER_PORTSocket port (commonly 8000)
SOCKETCLUSTER_SECUREtrue for wss, false for ws

Payments

VarDefaultPurpose
PAYMENT_GATEWAYstripeOne of stripe, qpay, paypal
STRIPE_KEYStripe publishable key
STRIPE_PAYMENT_UIsheetsheet (Stripe PaymentSheet) or field (CardField)
STRIPE_ENABLE_APPLE_PAYfalseShow Apple Pay in PaymentSheet on iOS
STRIPE_ENABLE_GOOGLE_PAYfalseShow Google Pay in PaymentSheet on Android
TIP_INCREMENT50Tip stepper increment in minor currency units (50 = $0.50 in USD)

See Integrations → Payments for QPay and PayPal specifics.

Authentication

VarDefaultPurpose
APPLE_LOGIN_ENABLEDfalseShow "Sign in with Apple" button
GOOGLE_LOGIN_ENABLEDfalseShow "Sign in with Google" button
FACEBOOK_LOGIN_ENABLEDfalseShow "Continue with Facebook" button
FACEBOOK_APP_IDFacebook app ID (also injected into Info.plist and AndroidManifest.xml at build time)
FACEBOOK_CLIENT_TOKENFacebook client token

Phone + SMS 2FA and email/password are always available — no flags needed.

Tabs & Navigation

VarDefaultPurpose
STORE_NAVIGATOR_TABSStoreHomeTab,StoreSearchTab,StoreMapTab,StoreCartTab,StoreProfileTabComma-separated tab list. Add StoreFoodTruckTab for food-truck mode
STORE_NAVIGATOR_DEFAULT_TABStoreHomeTabInitial tab on launch
STORE_NAVIGATOR_TAB_BAR_BGblurblur for iOS BlurView, or any theme key (e.g. primary, custom) for a solid color
CUSTOM_TAB_BAR_BG_COLOROverride tab bar background
CUSTOM_TAB_BAR_ACTIVE_COLOROverride active tab tint
CUSTOM_TAB_BAR_INACTIVE_COLOROverride inactive tab tint
STORE_FOOD_TRUCK_TAB_ICONOverride icon for the food-truck tab

Per-locale tab labels follow the pattern STORE_<TAB>_TAB_LABEL_<LOCALE> — e.g. STORE_HOME_TAB_LABEL_EN, STORE_HOME_TAB_LABEL_MN, STORE_SEARCH_TAB_LABEL_EN, etc.

Map

VarDefaultPurpose
DEFAULT_MAP_TYPEstandardstandard, satellite, or hybrid
DEFAULT_COORDINATESInitial map center as lat,lng
DEFAULT_SERVICE_AREAFleetbase Service Area public_id (e.g. sa_xDPX9Dy) — bounds the map
MAP_DISPLAY_DRIVERSfalseRender drivers on the map view
DISABLE_GEOCODING_SCREENfalseSkip text-based geocoding and go straight to the map pin picker

Localization

VarDefaultPurpose
DEFAULT_LOCALEenInitial locale
AVAILABLE_LOCALESen,mnComma-separated locales offered in the language picker. Each must have a JSON file in /translations/

Storefront Layout

These control the look of the home and product screens:

VarDefaultPurpose
STORE_CATEGORIES_DISPLAYgridgrid or pills
PRODUCT_CARD_STYLEborderedbordered, outlined, or visio
PRIORITIZE_PICKUPfalseDefault the order type to pickup over delivery
STORE_HEADER_SHOW_GRADIENT1Show gradient overlay on the store header
STORE_HEADER_SHOW_LOCATION_PICKER1Show location picker in the header
STORE_HEADER_SHOW_TITLE1Show store title in the header
STORE_HEADER_SHOW_DESCRIPTION1Show store description in the header
STORE_HEADER_SHOW_LOGO1Show store logo in the header
STORE_HEADER_LOGO_HEIGHT45Logo height in pixels
STORE_HEADER_LOGO_WIDTH45Logo width in pixels
STORE_HEADER_FLEX_DIRECTIONcolumnrow or column
STORE_HEADER_ALIGN_ITEMScenterFlexbox alignment
STORE_HEADER_JUSTIFY_CONTENTflex-endFlexbox justification
STORE_HEADER_SPACING$1Space between header items (Tamagui token)
STORE_HEADER_PADDING_TOP0Header padding
STORE_HEADER_PADDING_BOTTOM0
STORE_HEADER_PADDING_LEFT0
STORE_HEADER_PADDING_RIGHT0

Theming Inputs

See Theming for a deeper walkthrough.

VarDefaultPurpose
APP_THEMEblueBase hue. Combined with system light/dark to form a Tamagui theme key (e.g. lightBlue, darkTruevegan)
CUSTOM_COLORSInject custom theme tokens. Format: key:#hex,key2:#hex
CUSTOM_COLORS_LIGHTLight-mode-only token overrides
CUSTOM_COLORS_DARKDark-mode-only token overrides
BOOTSCREEN_BACKGROUND_COLORSingle hex (#FFFFFF) or two-stop gradient (#ff3a44,#f67d04)
LOGIN_BG_IMAGEstorefront_photo_1One of storefront_photo_1, storefront_photo_2
BOOTSCREEN_BG_IMAGESame set as above
VarDefaultPurpose
TOS_URLTerms of Service URL surfaced in the app
PRIVACY_URLPrivacy Policy URL

Deep Linking

VarDefaultPurpose
APP_LINK_PREFIXCustom URL scheme used for deep links (e.g. storefront://). Navigation linking is enabled automatically when set

Android Versioning

VarDefaultPurpose
ANDROID_VERSION_CODEAndroid versionCode — must increment for every Play Store upload
ANDROID_VERSION_NAMEAndroid versionName (e.g. 1.2.0)

app.json

Trivial — sets only the React Native registry name:

{
  "name": "StorefrontApp",
  "displayName": "StorefrontApp"
}

If you rename your app's React Native registry entry, update both keys here.

Native Display Names

The user-visible app name on the home screen is not controlled by app.json:

  • iOS: ios/StorefrontApp/Info.plistCFBundleDisplayName (set to $(APP_NAME) from xcconfig)
  • Android: android/app/src/main/res/values/strings.xml<string name="app_name">

See Build & Release for the full rename procedure.

Configuration | Fleetbase