Implementing Server-Driven UI Architecture on the Shop App
Shopify's Shop App moved its Store Screen from client-driven to server-driven UI so the backend decides which sections (Best Sellers, Collections, All Products) and layouts (Grid, Shelf) each merchant's store renders. Doing this decouples UI fixes and experiments from the weekly mobile release cadence. Server side, a template processing layer, per-section data loaders, a GraphQL layer exposing typed ProductsSection/CollectionsSection with configurable layouts, and an orchestrator work together. On the client, a React component tree dispatches each section to grid or shelf components. Older clients that receive unknown layout types fall back to a per-section default layout defined on the client.
Related posts
- Leveraging Shopify’s API to Build the Latest Marketplace Kit
Shopify Engineering mediumAdeptMarketplace Kit 2.0 decouples its sample code from the Shopify CLI's generated Node app and splits it into a full-stack Express/React admin app and a Next.js buyer app, both open-sourced. The admin app uses App Bridge's authenticatedFetch to attach JWT session tokens, which the server decodes with Shopify's Node API inside the Apollo Server context to load the store's access token. Running apollo-server-express instead of apollo-server lets one Express instance serve REST and GraphQL together and reuse Node middleware for rate limiting and auth, at the cost of slightly more boilerplate and no performance penalty. Custom GraphQL and REST client wrappers add project-specific User-Agent headers, and REST is kept for simple calls like product listing counts where a GraphQL query adds nothing.
- Shopify’s platform is the Web platform
Shopify Engineering mediumAdeptRemix is now Shopify's recommended framework for building Admin apps, backed by a rewritten, final version of App Bridge that makes cross-origin iframes behave like a normal web environment. App Bridge uses postMessage() to restore what browsers strip from iframes: it syncs history.pushState() URL changes to the top-level page, supplies OpenID Connect ID tokens in place of unavailable cookies, and exposes Admin integrations such as sidebar navigation through standard Custom Elements. It is loaded from a CDN script tag so fixes reach every app without redeploys. The Remix template bundles @shopify/shopify-app-remix for OAuth, ID token and HMAC handling, plus Prisma for storage and session persistence.
- How we use GraphQL at Europe's largest fashion e-commerce company
Zalando Engineering easyNoviceZalando replaced a sprawl of per-page and per-platform Backend-for-Frontend services with a single unified GraphQL API owned via a shared monorepo across 12+ domain teams. The BFFs had duplicated effort, fragmented security and observability, and produced inconsistent data across web and app. The graph is built on Entities such as Product and Campaign and runs on their own GraphQL engine, graphql-jit, under a strict no-business-logic rule. Since 2018 it has grown to serve over 80% of web and 50% of app use cases, with adoption driven by documentation, training and schema consultation, and god-component risk handled through contribution principles, circuit breakers, timeouts, retries and per-platform bulkhead deployments.
- Remixing Shopify's Admin: How We Made It 30% Faster and AI-Ready
Shopify Engineering mediumAdeptShopify migrated its Admin (67 million daily page views, 101 teams, ~350 PRs merged daily, 3M+ lines of TypeScript) to Remix in SPA mode with Vite. The result is a 30% improvement in perceived load times. Statically globbed, typed route manifests replaced a runtime getRoutes function and give Search and Sidekick a single source of truth for all 1,017 routes. Remix loaders remove the code-then-data waterfall by fetching a 3.2kb loader in parallel with a 914kb component bundle, and idle-time prefetching of loaders warms an Apollo cache persisted in IndexedDB. Adding Remix actions and zod schemas lets the Sidekick AI fill and submit forms without loading UI JavaScript.
- Improving Shopify App’s Performance
Shopify Engineering mediumAdeptShopify cut its React Native mobile app's P75 launch time by 44% and screen load times by 59% over 2023, against targets of 2s launch and 500ms critical-screen loads. The fixes fell into three themes. The first was deferring work until it is needed: FlashList-based LazyScrollView and ListSource render only visible content, inlineRequires in the Metro config alone gave a 17% launch gain, and slow native modules were fixed. The second was eliminating unnecessary work: freezing back-stack screens cut navigation time by up to 70%, Restyle allocations were trimmed, and default state batching improved screen loads by about 15%. The third was maximizing cache use by fixing a GraphQL cache bug and pre-warming caches so up to 90% of merchants see cached data first.