Magento 2 PWA Studio: Project Setup Walkthrough

Magento 2 PWA Studio: Project Setup Walkthrough

June 3, 2026 · By Magento Company
Magento 2 PWA Studio: Project Setup Walkthrough

PWA Studio is Adobe’s official toolkit for building headless storefronts on Magento’s GraphQL API. This walkthrough takes you from nothing to a running Venia-based storefront pointed at your Magento backend, with the configuration details the quick-start glosses over.

Prerequisites

  • Node.js 18+ and Yarn
  • A Magento 2.4 backend with the PWA metapackage installed (magento/pwa on Commerce; GraphQL coverage is built into 2.4 core)
  • HTTPS locally or a reachable backend URL - the storefront talks GraphQL over the network even in dev

Scaffolding

yarn create @magento/pwa

The wizard asks for your backend URL and scaffolds a project on the Venia reference theme with Peregrine hooks, the UPWARD spec, and a buildpack CLI. Key generated files:

  • .env - backend URL, image optimising origin, and dev server settings
  • upward.yml - the UPWARD spec: how requests route to Magento, templates and the GraphQL proxy
  • src/ - the React application

Configuration That Matters

.env essentials:

MAGENTO_BACKEND_URL=https://your-magento.test/
IMAGE_OPTIMIZING_ORIGIN=auto

If your backend uses a self-signed cert in dev, NODE_TLS_REJECT_UNAUTHORIZED=0 unblocks the local loop - never in production. Check upward.yml for the backend URL wiring: UPWARD sits between the browser and Magento, proxying GraphQL and serving the app shell.

Run and Verify

yarn watch

The dev server compiles Venia, starts UPWARD, and hot-reloads. Verify in order: homepage renders categories (GraphQL categories query works), a product page loads (product queries), add to cart (mutations and cart sessions). Each stage failing points at a different layer - CORS, URL keys, or store code configuration.

Customisation Model

PWA Studio’s power is extensibility: the @magento/pwa-buildpack target system lets your project and third-party modules intercept and wrap Venia components without forking them. Learn targets and talons (Peregrine hooks) before editing Venia source directly - direct edits are technical debt against upstream updates.

Build and Deploy

yarn build
yarn stage:venia   # or serve build/ via UPWARD on your platform

Production needs: a Node host running UPWARD (or the Adobe Commerce Cloud PWA tooling), TLS, and a caching layer in front - UPWARD supports response caching; pair it with Fastly or your CDN for static assets. Watch the robots.txt and sitemap story - PWA Studio’s SEO plumbing (SSR via UPWARD, meta via venia-ui) needs verification per template, not assumption.

The scaffold gets you a storefront in an afternoon. The real project - theming, feature parity with your current store, SEO hardening - is measured in weeks. Start with the walkthrough, prove GraphQL flows end-to-end, and plan feature parity explicitly before committing to the replatform.

Headless PWA Frontend