Routes
The storefront is a Next.js App Router app. Every URL is prefixed with the locale (/{locale}: en,de, …); nginx sends a bare / to the visitor's preferred locale. Routes are generated fromapps/theme/src/app/. Route files can't be overridden through src/custom/; their components can.
Pages
| Path | Renders | Notes |
|---|---|---|
/{locale} | server | apps/theme/src/app/[locale]/(home)/page.tsx |
/{locale}/{slug} | server | apps/theme/src/app/[locale]/[slug]/page.tsx |
/{locale}/account | client | apps/theme/src/app/[locale]/account/page.tsx |
/{locale}/account/downloads | client | apps/theme/src/app/[locale]/account/downloads/page.tsx |
/{locale}/account/invoices | client | apps/theme/src/app/[locale]/account/invoices/page.tsx |
/{locale}/account/orders | client | apps/theme/src/app/[locale]/account/orders/page.tsx |
/{locale}/account/privacy | server | apps/theme/src/app/[locale]/account/privacy/page.tsx |
/{locale}/account/product-alerts | server | apps/theme/src/app/[locale]/account/product-alerts/page.tsx |
/{locale}/account/returns | client | apps/theme/src/app/[locale]/account/returns/page.tsx |
/{locale}/account/reviews | client | apps/theme/src/app/[locale]/account/reviews/page.tsx |
/{locale}/account/rewards | server | apps/theme/src/app/[locale]/account/rewards/page.tsx |
/{locale}/account/shipments | client | apps/theme/src/app/[locale]/account/shipments/page.tsx |
/{locale}/account/subscriptions | server | apps/theme/src/app/[locale]/account/subscriptions/page.tsx |
/{locale}/account/support | client | apps/theme/src/app/[locale]/account/support/page.tsx |
/{locale}/account/wishlist | server | apps/theme/src/app/[locale]/account/wishlist/page.tsx |
/{locale}/auth/social/complete | client | Landing page after the social-login bridge has set the apps/theme/src/app/[locale]/auth/social/complete/page.tsx |
/{locale}/auth/social/error | client | Shown when the social-login bridge could not complete (misconfiguration, unverified identity, or a failed token exchange). Deliberately generic — it never leaks which step failed to the user. apps/theme/src/app/[locale]/auth/social/error/page.tsx |
/{locale}/best-sellers | server | apps/theme/src/app/[locale]/best-sellers/page.tsx |
/{locale}/blog | server | apps/theme/src/app/[locale]/blog/page.tsx |
/{locale}/blog/{slug} | server | apps/theme/src/app/[locale]/blog/[slug]/page.tsx |
/{locale}/blog/tag/{key} | server | apps/theme/src/app/[locale]/blog/tag/[key]/page.tsx |
/{locale}/brands | server | apps/theme/src/app/[locale]/brands/page.tsx |
/{locale}/cart | client | apps/theme/src/app/[locale]/cart/page.tsx |
/{locale}/cart/recover | client | Abandoned-cart recovery landing page. The reminder email (Magenx_AbandonedCheckout) links here with a SIGNED, EXPIRING token as Reminders for a signed-in customer's cart carry no token at all (Magento does not mint a guest mask for them): those links just land here and pass through to /cart, where Restoring REPLACES whichever cart this browser is holding, so when there is already something in it the shopper is asked first. Silently swapping would throw away a cart they built after the email went out — and on a shared device, hand them someone else's. apps/theme/src/app/[locale]/cart/recover/page.tsx |
/{locale}/category/{...slug} | server | apps/theme/src/app/[locale]/category/[...slug]/page.tsx |
/{locale}/checkout | client | apps/theme/src/app/[locale]/checkout/page.tsx |
/{locale}/confirm-email | server | apps/theme/src/app/[locale]/confirm-email/page.tsx |
/{locale}/contact | server | apps/theme/src/app/[locale]/contact/page.tsx |
/{locale}/cookies | server | apps/theme/src/app/[locale]/cookies/page.tsx |
/{locale}/deals | server | apps/theme/src/app/[locale]/deals/page.tsx |
/{locale}/guest/order | client | apps/theme/src/app/[locale]/guest/order/page.tsx |
/{locale}/order/mollie-return | client | Mollie hosted-payment return handler. Checkout places the order with Flow:
Routing uses the booleans, never apps/theme/src/app/[locale]/order/mollie-return/page.tsx |
/{locale}/order/paypal-return | client | PayPal Express Checkout return handler. PayPal redirects shoppers back here after they approve (or cancel) payment. The URL contains Flow (approval):
Flow (cancel / missing PayerID): Show a canceled message with a link back to /checkout so the shopper can try a different payment method. apps/theme/src/app/[locale]/order/paypal-return/page.tsx |
/{locale}/order/stripe-return | client | Stripe payment return handler. For redirect-based payment methods (iDEAL, EPS, Bancontact, Giropay, SOFORT, Przelewy24, …) Stripe redirects the shopper back to this page after the bank authentication step. The URL contains Flow:
IMPORTANT: configure the return URL in the Magento Stripe module admin to point to this page, e.g. https://<storefront>/order/stripe-return apps/theme/src/app/[locale]/order/stripe-return/page.tsx |
/{locale}/order/success | client | apps/theme/src/app/[locale]/order/success/page.tsx |
/{locale}/product/{slug} | server | apps/theme/src/app/[locale]/product/[slug]/page.tsx |
/{locale}/reset-password | client | apps/theme/src/app/[locale]/reset-password/page.tsx |
/{locale}/search | server | apps/theme/src/app/[locale]/search/page.tsx |
/{locale}/withdrawal | server | apps/theme/src/app/[locale]/withdrawal/page.tsx |
API routes
Server-only route handlers. Most are thin: the agentic-commerce routes (/api/ucp/**, /api/acp/**) re-export handlers from @magenxcommerce/engine/agentic.
| Path | Methods | Notes |
|---|---|---|
/{locale}/auth/session | POST, DELETE | apps/theme/src/app/[locale]/auth/session/route.ts |
/api/acp/checkout_sessions | POST | POST /api/acp/checkout_sessions — ACP "Create Checkout Session". The handler lives in the engine (@magenxcommerce/engine/agentic/acp/checkout_sessions/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/acp/checkout_sessions/route.ts |
/api/acp/checkout_sessions/{id} | GET, POST | GET /api/acp/checkout_sessions/{id} — ACP "Get Checkout Session". The handler lives in the engine (@magenxcommerce/engine/agentic/acp/checkout_sessions/[id]/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/acp/checkout_sessions/[id]/route.ts |
/api/acp/checkout_sessions/{id}/cancel | POST | POST /api/acp/checkout_sessions/{id}/cancel — ACP "Cancel Checkout Session". The handler lives in the engine (@magenxcommerce/engine/agentic/acp/checkout_sessions/[id]/cancel/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/acp/checkout_sessions/[id]/cancel/route.ts |
/api/acp/checkout_sessions/{id}/complete | POST | POST /api/acp/checkout_sessions/{id}/complete — ACP "Complete Checkout Session". The handler lives in the engine (@magenxcommerce/engine/agentic/acp/checkout_sessions/[id]/complete/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/acp/checkout_sessions/[id]/complete/route.ts |
/api/acp/discovery | GET | GET /.well-known/acp.json (rewritten to /api/acp/discovery) — the ACP discovery document. The handler lives in the engine (@magenxcommerce/engine/agentic/acp/discovery/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/acp/discovery/route.ts |
/api/assistant | POST | POST /api/assistant — one shopper message in, a Server-Sent Events stream out. The harness lives in the engine (@magenxcommerce/engine/assistant/handler), reached through the @/lib/assistant shim so configuration runs first. The shop-specific pieces (cookie, Turnstile, client key) are in ./_lib/options. apps/theme/src/app/api/assistant/route.ts |
/api/assistant/confirm | POST | POST /api/assistant/confirm — the shopper confirms or declines an action the assistant proposed. The only route that changes anything in Magento; see @magenxcommerce/engine/assistant/confirm for the checks it runs. apps/theme/src/app/api/assistant/confirm/route.ts |
/api/auth/{...nextauth} | — | apps/theme/src/app/api/auth/[...nextauth]/route.ts |
/api/auth/magento-session | GET | apps/theme/src/app/api/auth/magento-session/route.ts |
/api/best-sellers | GET | Best-seller rankings for the browser: the store-wide list (no ── Why a route handler and not the GraphQL proxy ── These used to run Only the page's own tab ids are served: apps/theme/src/app/api/best-sellers/route.ts |
/api/brand-products | GET | apps/theme/src/app/api/brand-products/route.ts |
/api/cart/recover | POST | POST /api/cart/recover — redeem an abandoned-cart reminder token. The reminder email (Magenx_AbandonedCheckout) links to /[locale]/cart/recover with a signed token, NOT with the cart id. A masked cart id is a bearer credential — see the warning on This route is the only place the two are joined: it verifies the HMAC and the expiry with a secret shared with Magento, and hands the browser the masked id only then. The secret must never reach the client bundle, which is why this is a route handler and not a client-side check. apps/theme/src/app/api/cart/recover/route.ts |
/api/deals | GET | Deals for the browser: the store-wide list (no apps/theme/src/app/api/deals/route.ts |
/api/download/{id} | GET | GET /api/download/[id] — Magenx_ProductAttachments file/link download. The PDP never learns a real file path or external URL — it only carries an opaque attachment id (see ProductAttachmentChips / fragments.ts). This route resolves that id server-to-server via the apps/theme/src/app/api/download/[id]/route.ts |
/api/downloads/{hash} | GET | GET /api/downloads/[hash] — a purchased downloadable product's file. Magento's own download route,
The public vhost never routes apps/theme/src/app/api/downloads/[hash]/route.ts |
/api/graphql | GET, POST | /api/graphql — the storefront's GraphQL proxy to Magento and its security chokepoint. The policy lives in the _lib modules; this file is only the POST pipeline that composes them, in order:
GET is a separate, much narrower path (see GET below and _lib/persisted-get): guest-cacheable reads named by hash only, forwarded with no customer token, with a Cache-Control that nginx's Adding a client-run operation? Add it to _lib/allowed-operations.ts. Adding an abuse-prone public mutation? Also add it to TURNSTILE_PROTECTED_OPERATIONS in _lib/turnstile.ts, mapped to its form's widget apps/theme/src/app/api/graphql/route.ts |
/api/product-blog-posts | GET | apps/theme/src/app/api/product-blog-posts/route.ts |
/api/product-links | GET | apps/theme/src/app/api/product-links/route.ts |
/api/revalidate | POST | apps/theme/src/app/api/revalidate/route.ts |
/api/ucp/carts | POST | POST /api/ucp/carts — UCP "Create Cart" ( The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/carts/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/carts/route.ts |
/api/ucp/carts/{id} | GET, PUT | GET /api/ucp/carts/{id} — UCP "Get Cart" The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/carts/[id]/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/carts/[id]/route.ts |
/api/ucp/carts/{id}/cancel | POST | POST /api/ucp/carts/{id}/cancel — UCP "Cancel Cart". The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/carts/[id]/cancel/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/carts/[id]/cancel/route.ts |
/api/ucp/catalog/lookup | POST | POST /api/ucp/catalog/lookup — UCP "Lookup Catalog (batch)" ( The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/catalog/lookup/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/catalog/lookup/route.ts |
/api/ucp/catalog/product | POST | POST /api/ucp/catalog/product — UCP "Get Product" ( The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/catalog/product/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/catalog/product/route.ts |
/api/ucp/catalog/search | POST | POST /api/ucp/catalog/search — UCP "Search Catalog" ( The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/catalog/search/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/catalog/search/route.ts |
/api/ucp/checkout-sessions | POST | POST /api/ucp/checkout-sessions — UCP "Create Checkout". The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/checkout-sessions/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/checkout-sessions/route.ts |
/api/ucp/checkout-sessions/{id} | GET, PUT | GET /api/ucp/checkout-sessions/{id} — UCP "Get Checkout" The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/checkout-sessions/[id]/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/checkout-sessions/[id]/route.ts |
/api/ucp/checkout-sessions/{id}/cancel | POST | POST /api/ucp/checkout-sessions/{id}/cancel — UCP "Cancel Checkout". The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/checkout-sessions/[id]/cancel/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/checkout-sessions/[id]/cancel/route.ts |
/api/ucp/checkout-sessions/{id}/complete | POST | POST /api/ucp/checkout-sessions/{id}/complete — UCP "Complete Checkout". The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/checkout-sessions/[id]/complete/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/checkout-sessions/[id]/complete/route.ts |
/api/ucp/mcp | POST | POST /api/ucp/mcp — the UCP capabilities (checkout, catalog, cart, order) The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/mcp/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/mcp/route.ts |
/api/ucp/orders/{id} | GET | GET /api/ucp/orders/{id} — UCP "Get Order" ( The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/orders/[id]/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/orders/[id]/route.ts |
/api/ucp/profile | GET | GET /.well-known/ucp (rewritten to /api/ucp/profile) — the UCP business profile. The handler lives in the engine (@magenxcommerce/engine/agentic/ucp/profile/route.ts); this file only routes the URL to it. See src/lib/agentic.ts. apps/theme/src/app/api/ucp/profile/route.ts |
/llms.txt | GET | Dynamic Mirrors the Served at NB: no apps/theme/src/app/llms.txt/route.ts |