Building a headless storefront on Magento GraphQL with PWA Studio

PWA Studio and Venia UI give a React storefront a starting point on Magento Open Source, but the GraphQL coverage and ongoing upkeep decide whether it is worth building.

On this page

When a headless Magento storefront with PWA Studio fits your team

A headless Magento storefront with PWA Studio fits a team that wants a React front end on Magento Open Source and has the engineering capacity to own that front end after launch. PWA Studio is a separate toolkit from Magento itself, and it is the usual starting point for a React storefront on the platform. Venia UI is the reference storefront that ships with PWA Studio, and it shows how a React application talks to Magento through GraphQL. The front end does not read the database or call the Magento admin directly. It sends GraphQL queries and mutations to the Magento instance, so the work is as much about the GraphQL schema coverage of your store as it is about React components.

The license basis is the first thing to confirm with your legal or procurement team. The magento/magento2 repository states that Magento Open Source source files are licensed under the Open Software License 3.0 (OSL-3.0), with the Academic Free License 3.0 (AFL 3.0) also included in the distribution. You should check the license files of PWA Studio and of any packages you add separately, since the toolkit is not the same code base as the core platform. Read the magento/magento2 repository for the core licensing statement, then confirm the terms of each component you plan to ship.

The most important check is version compatibility. PWA Studio is versioned separately from Magento, so a React storefront built against one Magento release line may not match the GraphQL schema of another. Before you commit, list the Magento Open Source release you will run, the PWA Studio version you intend to use, and the Node and package versions that version requires, then confirm the pairing with the vendor documentation. If your store is already on an older 2.4.x line that is near end of regular support, plan the platform upgrade and the front end work together, because each change can alter the GraphQL fields your storefront depends on.

Storefront front-end options compared for Magento Open Source

This table compares three ways to build the storefront on Magento Open Source: PWA Studio with Venia UI, a custom headless front end on the GraphQL API, and the server-rendered Luma or Blank themes. Read each row as a decision factor, and check the GraphQL coverage row against the operations your storefront needs before choosing. The main takeaway is that the more control you take over the front end, the more GraphQL coverage, React skills and upkeep you take on yourself.

FactorPWA Studio with Venia UIHeadless on GraphQL directlyLuma or Blank themes
Control over the storefrontHigh within the React component model, with Venia as a reference storefront you extendHighest, since your team owns routing, rendering, state and every componentLower, limited to theme layouts, templates and extension points Magento provides
Dependence on GraphQL coverageHigh, because Venia features map to the GraphQL schema shipped with your releaseHighest, because every screen calls the API directly, so gaps must be solved in your code or a custom moduleNone for rendering, since pages are generated by Magento on the server
React and JavaScript skills neededStrong React and GraphQL skills, plus familiarity with the PWA Studio build toolingStrong React or similar framework skills, plus GraphQL client and caching designPHP, Magento theme layout XML and template knowledge, with limited JavaScript
Upkeep burdenOngoing merges from PWA Studio and Venia releases into your fork or extensionsHighest, since you maintain the full front-end codebase across Magento upgradesLowest in front-end code, though theme and extension compatibility still need checks at each upgrade
Upgrade coupling to MagentoTied to the PWA Studio version that matches your Magento release, so confirm compatibility before each upgradeCoupled through the GraphQL schema, so schema changes between 2.4.x releases can break queriesCoupled through theme and template APIs, which Magento upgrades and extensions can affect
Confirm before choosingWhich Venia features your store needs and whether they are in the installed schemaWhich mutations and queries exist for your catalog, cart and customer flows in your exact versionWhether Luma or Blank covers your design needs without custom templates

Setup sequence for a PWA Studio storefront

This sequence takes a team from a confirmed Magento Open Source stack to a React storefront that reads and writes through GraphQL, with CSP and CORS settings, Venia UI customizations and a regression suite that runs against each Magento patch. Each step ends with a check that shows whether the next step can start.

  1. Confirm the supported version and stack

    The platform engineering lead selects the Magento Open Source release line first, then checks the matching system requirements page for the exact PHP, MySQL or MariaDB, OpenSearch, Redis or Valkey, RabbitMQ, Composer and nginx combination. Adobe supports only the listed combinations, so the team should record the chosen versions in a short compatibility sheet and confirm with the PWA Studio project documentation which Magento release the front end version targets. Check: a staging host installs Magento on the recorded versions, bin/magento --version reports the expected release, and the sheet is signed off by the platform owner. If a version falls outside the listed combinations, stop and resolve it before continuing.

  2. Enable and test the GraphQL endpoint

    The backend engineer confirms that the GraphQL endpoint answers on the staging store and that the schema is served without errors. The team then runs an introspection-free query for store configuration and a public product search to confirm that the store view and catalog data resolve correctly. Anonymous access should be limited to what the storefront needs, and any introspection setting should match the team's security policy for non-production and production environments. Check: a GraphQL request for store config and a product query return HTTP 200 with valid JSON, and the same requests fail cleanly when a malformed query is sent.

  3. Map storefront flows to GraphQL operations

    The solution architect lists each storefront journey, such as browse, search, product detail, cart, checkout, account login and order history, and maps each one to the GraphQL queries and mutations that the chosen Magento version exposes. Coverage differs between releases and between Open Source and Adobe Commerce, so the team should check the schema for each operation rather than assume it exists. Where a flow has no supported operation, the team records a gap, decides whether to use a supported workaround or a custom module, and assigns an owner. Check: a traceability table lists every flow with its operation names, the schema check output is attached, and each gap has a decision and an owner.

  4. Scaffold PWA Studio and connect it to the backend

    The front-end engineer generates the PWA Studio project, points its environment configuration at the staging GraphQL endpoint and store view codes, and starts the development server. The team confirms that the default Venia UI pages load with live catalog data before any changes are made. This baseline matters because later customizations can then be compared against a known-good build. Check: the development build renders the home page and a category page with data from the staging catalog, and the browser console shows no failed GraphQL requests.

  5. Customize Venia UI components

    The front-end team changes Venia UI components through the project's supported extension points, keeping overrides small and documented so that upstream updates can be merged. Each customization is tied to a flow from the traceability table, and changes that touch shared components are reviewed for their effect on other pages. The team should keep a list of every overridden component with the reason, because that list drives the maintenance load after launch. Check: the unit and component tests pass, a production build completes, and the override list matches the diff against the upstream project.

  6. Configure Content Security Policy and CORS

    The security engineer defines the allowed origins for the storefront, the API endpoint, payment provider scripts and any analytics or CDN hosts, then sets Content Security Policy and cross-origin rules in the Magento configuration and the web server layer. Adobe documents CSP support in Magento Open Source from 2.3.5, and from 2.4.7 CSP runs in restrict mode on storefront and admin payment pages, so payment scripts must be listed before go-live. Check: a browser test on each key page reports no CSP violations in the console, a preflight request from the storefront origin succeeds, and a request from an unlisted origin is rejected.

  7. Build the regression suite and run it on each patch

    The QA lead writes end-to-end tests for every flow in the traceability table, covering login, search, cart changes, checkout steps and account pages, and runs them against staging after each Magento patch and each front-end release. Adobe recommends upgrading every patch cycle for security and PCI compliance, so the suite should run as part of the patch process, not as a one-time launch check. Results are compared against the previous baseline, and failures are logged with the Magento and PWA Studio versions involved. Check: the suite passes on the current staging build, and a deliberate schema change in a test environment is caught by a failing test with a clear message.

Which GraphQL coverage to verify before committing

A PWA Studio storefront is only as complete as the GraphQL schema on the Magento Open Source version you install, so verify coverage before you commit to a front-end design. Confirm that the queries your storefront needs exist on that exact release: product and category queries for the catalog, cart and customer queries for session state, customer account and order history, and the mutations that add items, set addresses, apply shipping and complete checkout. Do not assume that a query visible in a demo store is present in your build. Read the schema from the live installation with an introspection query or the GraphQL explorer, and record each gap against the screens in your design.

Note one version-specific item now. According to the Magento Open Source 2.4.9 release notes, the clearCart mutation, which was previously limited to Adobe Commerce, is available in Open Source from 2.4.9. If your target is an earlier 2.4.x line, plan a workaround or confirm the release you will run before you rely on it. The release notes also list 580 resolved core code issues for that version, so check whether any fixes touch the queries your storefront depends on.

Treat every gap as a scoping decision, not a front-end workaround. A missing field or mutation usually means a custom module that adds a resolver, schema extension and tests, and that module then needs to survive future patch and minor upgrades. Ask your partner or internal team to list each gap, estimate the module work separately, and state which gaps block launch. Headless checkout and payment flows have their own coverage questions, which are covered in the sibling topic on headless checkout and payments, so review that topic alongside this audit.

Security and operational controls for a headless front end

A headless storefront moves rendering into a React client, but the Magento Open Source store behind it still holds the catalog, customer data and payment flows. The controls below sit at the boundary between the two, and each one needs an owner before the front end goes live.

Content Security Policy for the storefront

Magento Open Source supports Content Security Policy headers from 2.3.5, and from 2.4.7 the policy runs in restrict mode by default on storefront and admin payment pages. A PWA Studio front end adds its own scripts and API origins, so the policy must allow the GraphQL endpoint and every payment or analytics script the React app loads. Test the policy against the real checkout path before launch, not only the catalog pages.

CSP documentation

Customer and admin token handling

The React storefront holds customer tokens in the browser, so token lifetime, storage and revocation decide how much damage a stolen session can do. Confirm the token expiration settings for customers and admins, decide where the front end stores tokens, and document how a departing staff member's admin access is revoked. Keep admin credentials out of the storefront bundle entirely.

CORS and GraphQL endpoint exposure

Decide which origins may call the GraphQL endpoint from a browser and restrict cross-origin access to those origins only. Review which queries and mutations are reachable without a token, because a headless front end often exposes more of the schema to anonymous visitors than a classic theme did. Confirm that the web server and any API gateway forward only the paths the storefront needs.

Swagger documentation off production

The built-in Swagger documentation describes the REST endpoints of your exact install, including custom module APIs. Keep it disabled on production and staging systems that face the internet, and treat any copy of the generated API description as internal material. Developers who need to explore the API should use a local or isolated environment built from the same code.

Varnish in front of self-managed installs

Adobe documents Varnish as the full-page cache accelerator for self-managed installations. A PWA Studio storefront still depends on Magento for many responses, so cache rules must separate public catalog data from personalized cart and customer responses. Confirm which responses are cacheable, how cache purges run after catalog changes, and who owns the Varnish configuration.

Listed for 2.4.8-p5
Varnish 8
Varnish cache guide

Patch cadence tied to PCI DSS scope

Adobe's upgrade guide recommends upgrading every patch cycle to stay secure and PCI compliant. The React bundle, PWA Studio packages and Node runtime are additional components with their own release cycles, so the patch calendar must cover both the Magento core and the front end. Agree with your QSA which components sit in scope and who signs off each release.

Questions buyers ask before building a PWA Studio storefront

What drives the cost of a PWA Studio storefront?

The cost is driven by how much of the storefront you change from the reference front end, how many Magento GraphQL operations your custom pages need, and how much custom Magento-side work sits behind them. Expect cost in three places: discovery and architecture, front-end build and testing, and the back-end modules, extensions and integrations that the storefront depends on. Ask for a quote that lists each component separately, names the Magento version and PHP, OpenSearch and Redis or Valkey versions it targets, and states which items are one-time and which recur. DeployOpen does not publish a price list, so the quote follows from a written scope.

How long does a headless storefront take to build?

Duration depends on scope rather than on a fixed template. The main variables are the number of custom pages and flows (catalog, cart, checkout, account), how many GraphQL gaps must be filled with custom modules, the number of third-party services to connect, and how many environments and test cycles your release process requires. Ask any partner for a phased plan with milestones and acceptance criteria, and for the assumptions behind each phase. No duration is stated on this page because none has been supplied for this topic.

What does the client team need to provide?

A headless build needs decisions and access more than it needs code from your side. You will need a named product owner who can sign off catalog, pricing and content rules, an owner for the Magento instance and its hosting, access to the staging environment and to the systems the storefront calls, and a designated security or compliance reviewer for the authentication and payment flows. Your team should also agree on who approves releases to production and who answers when an upstream Magento release changes a GraphQL response.

Can an internal team build a PWA Studio storefront alone?

An internal team can build one if it already has strong React, GraphQL and Magento back-end skills and time to learn the PWA Studio toolkit, its build tooling and its update cadence. The usual gap is not the first launch but the second and third years: keeping pace with Magento patch releases, reviewing GraphQL schema changes, and holding test coverage on a front end that customers use every day. Assess the skills, the on-call capacity and the budget for upkeep before deciding, and compare that against a partner's written scope that covers the same deliverables.

How should we compare an in-house build with a partner?

Compare both options against the same written scope. List the pages, integrations, security controls and handover items, then ask each option to price and staff every line, including project management, testing, documentation and knowledge transfer. Include the costs of an internal team that is not yet hired or trained. Ask a partner how they handle GraphQL coverage gaps, how they test against the Magento versions you run, what they hand over, and how long the warranty or support window lasts. Weigh the answers against your risk appetite, not only against the first-year invoice.

What does ongoing upkeep of a PWA Studio storefront involve?

Upkeep is recurring work. It includes applying Magento patch releases, updating PWA Studio and its dependencies, checking GraphQL responses after each Magento upgrade, running regression tests on checkout and account flows, and monitoring performance and errors on the front end. Adobe's upgrade guide names customizations, extension count, third-party integrations and coding practices as the drivers of upgrade effort, so the more custom work you add, the more each upgrade costs. Ask for an upkeep plan that states the release cadence, the test scope and who is paid to do each task. Check the Magento lifecycle dates before choosing a version, because the storefront must move with the platform.

Which Magento version should a new headless storefront target?

Target a release line that is still in standard support for the full expected life of the storefront. Adobe's lifecycle policy gives each 2.4.x release three years of standard support from general availability, with end of regular support on May 31, 2028 for 2.4.8 and May 31, 2029 for 2.4.9. Magento Open Source 2.4.9 was released in May 2026 and supports PHP 8.5 and Symfony 7.4 LTS. Confirm the required versions of PHP, MySQL or MariaDB, OpenSearch, Redis or Valkey, RabbitMQ, Composer and nginx against Adobe's system requirements before you lock the architecture.

How the storefront, GraphQL endpoint and Magento backend connect

A shopper's browser loads the PWA Studio React app, which renders Venia UI components and sends GraphQL queries to the Magento endpoint. Public storefront requests pass through a cache layer, while admin and integration access reach the backend on a separate path behind the trust boundary. Inside Magento, the application relies on OpenSearch for catalog search, Redis or Valkey for cache and sessions, and RabbitMQ for queued work. Check which paths the cache may serve and which must bypass it.

Request path from shopper browser to Magento backend, with the public and privileged trust boundary.

Official sources to check before you commit

Before you fix the storefront architecture, read the Magento Open Source 2.4.9 release notes first, because they state the core changes that affect a headless build, including official support for PHP 8.5 and Symfony 7.4 LTS and the clearCart GraphQL mutation, which was previously Adobe Commerce only. Check the GraphQL mutations and queries your PWA Studio storefront depends on against that document and against the version you plan to run, rather than assuming coverage carries over from older releases. Record the exact release you will launch on, since the GraphQL surface changes between lines.

Next, read the system requirements for the exact release you select. For a headless build, the decisions that depend on them are the Node.js and build toolchain used for PWA Studio, the Redis or Valkey version behind caching, and the Varnish or edge layer that sits in front of the GraphQL endpoint. Adobe supports only the listed combinations, so confirm each component version against the requirements page for your release before you approve the architecture and the hosting plan. Ask your partner to show which combinations they have tested together.

Then read the lifecycle policy to set the long-term maintenance budget. It gives each 2.4.x release three years of standard support from general availability, and the end-of-support dates for each line decide when your React storefront, its GraphQL dependencies and its build tooling must move. Finally, read the upgrade guide, which recommends upgrading every patch cycle and names customizations, extension count, third-party integrations and coding practices as drivers of effort. Use it to estimate what a headless storefront adds to each upgrade, and confirm with the vendor whether the PWA Studio release line has its own support window and whether it tracks the Magento release line.

How DeployOpen works on this

DeployOpen scopes a headless Magento storefront in writing before any build starts, so the PWA Studio front end, the GraphQL coverage it needs and the hosting boundary are agreed up front. We then build, test and document the storefront inside your own infrastructure and hand over a system your team can operate.

How we scope

  • Inventory every storefront flow your PWA Studio front end needs, then check each one against the GraphQL coverage of your exact Magento Open Source version.
  • Record which flows need custom GraphQL resolvers or custom modules, since those add build and upgrade effort.
  • Agree the target Magento Open Source release line, PHP, MySQL or MariaDB, OpenSearch, Redis or Valkey and Varnish combinations in writing before build starts.
  • Define the written scope, deliverables and timeline as a fixed-scope engagement, with ongoing support offered separately as a retainer.

How we build

  • Set up the PWA Studio project and Venia UI customizations in version control, with a build pipeline that runs in your infrastructure.
  • Build custom GraphQL queries and mutations against your store, and test each one against the live catalog, cart and customer data.
  • Review the storefront's Content Security Policy and token handling, and test them with the same care as the Magento admin.
  • Run security testing of the storefront and APIs before launch, and deliver findings with fixes and a retest.

How we hand over

  • Deliver the source, build scripts and configuration with a written record of every custom GraphQL schema change and module.
  • Document the Node.js, PWA Studio and Magento version dependencies so your team can plan each upgrade cycle.
  • Walk your engineers through the runbook for deploying the front end, rotating API credentials and clearing caches.
  • Hand over the list of extension and GraphQL dependencies that will need retesting at each Magento patch.

How we support

  • Offer a retainer to apply Magento patches, retest the headless storefront after each release and track deprecated GraphQL fields.
  • Plan storefront upgrades alongside each Adobe patch cycle, using the Upgrade Compatibility Tool results to estimate the work.
  • Run continuous security testing of the storefront and its APIs on the retainer, with each finding reported with a fix and a retest.
  • Keep the documentation current so your internal team can run the storefront without depending on a single engineer.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.