Configuration
A shop has two kinds of settings:
apps/<shop>/magenx.config.ts: everything about the shop itself (store, features, brand, navigation, CMS blocks, SEO, layout). It is committed with the shop.- Environment variables: endpoints, keys and switches that differ per deployment.
magenx.config.ts
Section titled “magenx.config.ts”| Section | Holds |
|---|---|
store | Store code, base URL, currency, page sizes, sort options. |
tax | Price display: including or excluding tax. |
shipping | Delivery estimate and return days shown on the product page. |
analytics | Google Tag Manager container. |
features | Feature flags (below). |
cms | Identifiers of Magento CMS blocks used on the home page, header, footer and category pages. |
navigation | Header and footer links. |
payment | Which payment provider modules (Stripe, Mollie) are installed in Magento. |
brand, seo, layout | Name, logo, icons, metadata, grid columns. |
Feature flags
Section titled “Feature flags”Set in features. A flag for a companion-module feature must stay false on a Magento without that module.
| Flag | Turns on |
|---|---|
wishlist | Server-backed wishlist. |
reviewsEnabled | Product reviews. |
relatedProducts, crossSells | Related products on the product page, cross-sells in the cart. |
recentlyViewed | Recently viewed products. |
breadcrumbs | Breadcrumbs on catalog pages. |
blog | The blog. |
productAttachments | Downloadable attachments on the product page. |
checkoutFields | Order comment and delivery date/time on checkout. |
freeShipping | The free-shipping progress indicator. |
vatValidation | VAT number fields and reverse-charge notices. |
Environment variables
Section titled “Environment variables”The most common ones. All of them are in the environment reference. “Build” variables are baked into the bundle by next build: changing one needs a rebuild, not a restart.
| Variable | When | Purpose |
|---|---|---|
MAGENTO_GRAPHQL_ENDPOINT | Runtime | Internal Magento GraphQL URL, for example http://nginx/graphql. |
MAGENTO_GRAPHQL_BUILD_ENDPOINT | Build | GraphQL URL used only while next build prerenders. Point it at the deployed site’s own /api/graphql. Never reuse the runtime value. |
NEXT_PUBLIC_SITE_URL | Build | Canonical storefront URL. |
NEXT_PUBLIC_GTM_ID | Build | Google Tag Manager container. Unset disables analytics. |
NEXT_PUBLIC_TURNSTILE_SITE_KEY | Build | Renders the Turnstile widget. |
TURNSTILE_ENABLE, TURNSTILE_SECRET_KEY, TURNSTILE_HOSTNAMES | Runtime | Server-side Turnstile enforcement. |
NEXT_PUBLIC_SOCIAL_LOGIN_ENABLED | Build | Shows “Continue with Google”. |
AUTH_SECRET, AUTH_GOOGLE_ID, AUTH_GOOGLE_SECRET, MAGENX_SOCIAL_LOGIN_SECRET | Runtime | Google sign-in and its bridge to Magento. |
CACHE_WARM_ON_BOOT | Runtime | Re-renders pages the build could not fill. 0 disables. |
STORE_DRIFT_CHECK | Runtime | Logs when Magento’s store views differ from the build’s snapshot. 0 disables. |
OTEL_EXPORTER_OTLP_ENDPOINT | Runtime | Enables OpenTelemetry export. |
UCP_ENABLE | Runtime | Enables the UCP agentic-checkout API. |
Store views
Section titled “Store views”The storefront’s locale table comes from Magento, not from hand-edited config:
- At build,
npm run sync:stores(also run before every build) asks Magento for its store views and writesapps/theme/src/generated/stores.json. - In the config, each store view becomes one URL locale:
de_DEbecomes/de. The website’s default store view becomes the default locale.storeViewsinmagenx.config.tscan exclude a view or rename its locale. - At boot, the running storefront compares the snapshot with Magento and logs
[store-drift]when they differ.
A new locale also needs a messages file (apps/theme/src/i18n/messages/<locale>.json) and the locale lists in the nginx config of magenxcommerce-docker. A test fails until the messages file exists.
Payment methods
Section titled “Payment methods”The storefront has no payment-method switch. The payment step shows exactly what Magento returns for the cart, so you enable methods in Stores > Configuration > Sales > Payment Methods. Stripe, Mollie, PayPal Express and the offline methods can all be on at once.
payment in magenx.config.ts only says which provider modules are installed in Magento. It never enables a method:
| Setting | Set it to true when |
|---|---|
payment.stripe.enabled | The Stripe module (stripe/module-payments) is installed. |
payment.mollie.enabled | Mollie Payments for Magento 2 (mollie/magento2) is installed. |
payment.mollie.components | Mollie card details should be entered on the checkout page (Mollie Components) rather than on Mollie’s hosted page. |
Leave a flag false on a Magento without that module: its GraphQL fields would make Magento reject the request. PayPal Express needs no flag: it uses Magento’s own PayPal module. How each provider works at checkout is on Payments.
Turnstile
Section titled “Turnstile”Turnstile has two halves that must come from the same Cloudflare widget:
- the public site key, a build variable;
- the secret key, the enable flag and the allowed hostnames, runtime variables.
The /api/graphql proxy verifies each token with Cloudflare and checks its action and hostname. A token solved on the newsletter form can’t be replayed against sign-in.