Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Zalando Engineering 4 min read Case study mediumAdept

Context Based Experience in Zalando

Zalando built a context-aware "experience" mechanism so selective-distribution brands can get distinct presentation (e.g. white packshot backgrounds, hidden sale flags, restricted catalog visibility) only when a customer shows explicit intent, such as searching for the brand or opening its product page. An experience is a JSON bundle of policies (theme, product flags) plus selection metadata (e.g. brand codes), with fallback experiences for conflicts. Resolution happens in two steps: during root entity resolution the Rendering Engine queries the GraphQL Fashion Store API, the domain backend (e.g. Catalog) picks the matching experience, and the result is stored in request state. Child micro-frontends then pass that resolved experience on their own queries so other backends, like Product, apply the right policies consistently.

Related posts

  • How we use GraphQL at Europe's largest fashion e-commerce company

    Zalando Engineering easyNovice

    Zalando 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.

  • More Editorial Content, please.

    Zalando Engineering mediumAdept

    Zalando replaced a legacy, engineering-heavy landing page tool with a system built on the headless CMS Contentful, integrated into its Interface Framework via a Contentful proxy service behind the Fashion Store GraphQL aggregator, with modules mapped to renderers shared across web and app. Pages are composed from reorderable module entries, and other teams can contribute new modules, as the Sustainability team did with a certificate module that enriches Contentful-stored IDs with data from the same service used on product detail pages. Time-to-go-live fell from 2 days to 4 hours, the 2-week lead time was removed, and published landing pages rose 82% year over year.

  • Micro Frontends: from Fragments to Renderers (Part 1)

    Zalando Engineering easyNovice

    Zalando replaced its Mosaic micro-frontend architecture, built on team-owned page Fragments, with Interface Framework, a unified platform where pages are trees of typed Entities (Product, Collection, Outfit) mapped via declarative rendering rules to React Renderers that declare data needs in GraphQL. A Node.js/browser Rendering Engine resolves and renders the Entity tree chosen by the recommendation system, with built-in monitoring, batched A/B testing, deployment previews against production, and performance gates such as Lighthouse CI, bundle size limits and Web Vitals reporting. Moving teams into a monorepo with a shared stack lowered the entry barrier and improved UX consistency, at the cost of blurred ownership. A hybrid mode serving Fragments and Renderers together eased migration, and about 90% of traffic now runs on IF.

  • How we built a custom permissions DSL at Figma

    Figma mediumAdept

    Figma replaced a sprawling Ruby `has_access?` permissions function with a custom, JSON-serializable permissions DSL and a cross-platform policy engine, inspired by AWS IAM policies. Each policy declares a resource type, an allow/deny effect, granular permissions and boolean conditions written as ExpressionDef triples that reference data fields such as `file.deleted_at`. Because policies are pure data, the same rules run in both the Ruby/Sinatra backend and the TypeScript LiveGraph realtime layer, and data dependencies can be extracted statically. That separation decouples policy logic from data loading, letting rules be written and debugged independently and reducing database load from permission checks, which had been about 20% of total load.

  • Micro Frontends: Deep Dive into Rendering Engine (Part 2)

    Zalando Engineering mediumAdept

    Zalando's Interface Framework replaces Mosaic HTML fragments with Renderers: declarative TypeScript modules that state their data needs as GraphQL queries and render a single Entity type as a React component. A Node.js Rendering Engine maps Entities to Renderers through rendering rules, recursively and asynchronously resolves the entity tree, and streams server-rendered HTML that is later progressively hydrated on the client. A custom React reconciler lets the same Renderers emit JSON layouts for the iOS and Android apps. The engine also handles batched, cached data fetching (DataLoader, Perron circuit breakers), persisted queries, code splitting, Web Vitals collection and Mosaic backward compatibility.

The quest for software engineering knowledge.

Look:
Layout: