Built for Magento 2
A production-ready, open-source headless storefront for Magento 2 - Luma parity, Hyva-beating speed, built on Astro 5 + React 19 + Tailwind v4.
A production-ready, open-source headless storefront for Magento 2 - Luma parity, Hyva-beating speed, built on Astro 5 + React 19 + Tailwind v4. One command boots the full stack in Docker. TTFB under 150 ms. Zero client JS by default. Strict CSP. 2026 Google SEO covered out of ...
Key Features:
Additional Services
Built-in from day one. No add-ons, no upsell, no licence keys to renew.
A production-ready, open-source headless storefront for Magento 2 - Luma parity, Hyva-beating speed, built on Astro 5 + React 19 + Tailwind v4.
Adobe Magento Extension Quality Program — passes with zero severity-10 violations.
Vanilla JS, no jQuery dependency. Drop-in compatible with both default Luma and Hyva themes.
Lifetime updates with every Magento release. No subscription, no licence keys, no upsells.
mage2react is an open-source headless React storefront for Magento 2 that ships Luma feature parity on Astro 5, React 19, and Tailwind CSS v4.
The stack pairs Magento GraphQL as the data layer with Astro SSR and React 19 islands, so home, category, product detail, search, cart, customer account, and multi-step checkout render as small HTML pages with zero client JS by default. Local TTFB stays under 150 ms on the home route, and a single docker compose up boots Magento, MySQL, OpenSearch, Redis, and the Astro frontend together. mage2react targets Magento 2.4.4–2.4.9 with PHP 8.1–8.4 and works alongside Adobe Commerce installs.
React and Astro adapters for 38 first-party Panth Magento extensions drop in through a single <PanthSlot> tag, so banners, testimonials, FAQs, product tabs, smart badges, and mega menus reuse the same backend modules already shipped with Hyvä storefronts. The 2026 Google SEO checklist is covered: JSON-LD @graph, canonical, hreflang, OpenGraph, dynamic sitemap.xml, and strict CSP. PWA Studio teams gain a lighter alternative without Apollo or Webpack.
mage2react is a headless React storefront for Magento 2 with Luma feature parity and 38 Panth module adapters.
<PanthSlot> tag.@graph, canonical, OpenGraph, dynamic sitemap.xml.docker compose up boots Magento 2.4.x, MySQL, OpenSearch, Redis, and Astro.A production-ready, open-source headless storefront for Magento 2 — Luma parity, Hyva-beating speed, built on Astro 5 + React 19 + Tailwind v4. One command boots the full stack in Docker. TTFB under 150 ms. Zero client JS by default. Strict CSP. 2026 Google SEO covered out of the box. Ships with React/Astro adapters for 38 Panth Magento extensions so banners, testimonials, FAQs, product tabs, smart badges, mega-menus, and dozens more drop into the storefront via a single
<PanthSlot>tag.
Stop fighting Luma. Stop building PWA Studio. mage2react is a drop-in replacement that serves your whole storefront — home, category, PDP, search, cart, customer account, multi-step checkout — as tiny HTML pages with React islands only where needed. All data via Magento GraphQL. All security hardened by default.
/{url_key}.html) via urlResolver<details> based)noindex, search autocomplete in headercreateEmptyCart, addProductsToCart)/api/graphql proxy + SSR)reorderItems() — works for every product type<title> + <meta description> per page<link rel="canonical"> (strips ?page=1, sort, pageSize)@graph root: Organization, WebSite + SearchAction, BreadcrumbList, Product (with aggregateRating, priceValidUntil, itemCondition, brand), ItemList, CollectionPage, WebPage, SearchResultsPage, FAQPage, Articlesitemap.xml with <image:image> per productrobots.txt with Host: directive and surgical disallowsopensearch.xml for browser search integration<link rel="prev"> / rel="next" paginationmax-snippet, max-image-preview:large, max-video-preview:-1<h1> per page<html lang> from storeConfig.localenofollow on placeholder linksX-Mage2React-Proxied header that's stripped before egress)/api/graphql proxy (token injected server-side)X-Frame-Options: DENY, X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-originPermissions-Policy disabling camera / mic / payment / sensorsCOOP / CORP: same-origincheckOrigin: true)client:idle / client:visible) — zero JS default<link rel="preload"> for LCP image with fetchpriority="high"width + height + loading on every <img> (no CLS)useId, mount-gated client statenoUncheckedIndexedAccessgraphql-request (tiny) — no Apollonanostores + @nanostores/react (~5 KB gz)Measured locally (curl --resolve to bypass macOS mDNS):
| Route | TTFB | Payload |
|---|---|---|
| Home | ~125 ms | 56 KB |
| Category | ~445 ms | 40 KB |
| Product | ~113 ms | 48 KB |
| Sitemap | ~85 ms | 37 KB |
| Core Web Vital | Target | How |
|---|---|---|
| LCP | ≤ 2.0 s | Hero image preload, system fonts, no render-blocking JS |
| CLS | ≤ 0.05 | Explicit width/height, aspect-ratio boxes, system font stack |
| INP | ≤ 150 ms | Zero client JS default, client:idle / client:visible hydration |
mage2react installs and adapts 38 first-party Panth Magento extensions (by mage2kishan). Each shipped Magento extension gets a matching Panth_<Name>React companion that wires it into the React storefront — proper <sequence> dependency, typed GraphQL queries, and drop-in Astro/React components.
| # | Composer package | Magento module | React companion | Storefront? |
|---|---|---|---|---|
| SEO & Marketing | ||||
| 1 | mage2kishan/module-advanced-seo |
Panth_AdvancedSeo |
Panth_AdvancedSeoReact |
|
| 2 | mage2kishan/module-pagebuilder-ai |
Panth_PagebuilderAi |
Panth_PagebuilderAiReact |
admin-only |
| 3 | mage2kishan/module-corewebvitals |
Panth_Corewebvitals |
Panth_CorewebvitalsReact |
|
| 4 | mage2kishan/module-smart-badge |
Panth_SmartBadge |
Panth_SmartBadgeReact |
|
| 5 | mage2kishan/module-testimonials |
Panth_Testimonials |
Panth_TestimonialsReact |
|
| Checkout & Cart | ||||
| 6 | mage2kishan/module-advancedcart |
Panth_Advancedcart |
Panth_AdvancedcartReact |
|
| 7 | mage2kishan/module-checkout-extended |
Panth_CheckoutExtended |
Panth_CheckoutExtendedReact |
|
| 8 | mage2kishan/module-checkout-success |
Panth_CheckoutSuccess |
Panth_CheckoutSuccessReact |
|
| 9 | mage2kishan/module-custom-options |
Panth_CustomOptions |
Panth_CustomOptionsReact |
|
| 10 | mage2kishan/module-extra-fee |
Panth_ExtraFee |
Panth_ExtraFeeReact |
|
| 11 | mage2kishan/module-zipcode-validation |
Panth_ZipcodeValidation |
Panth_ZipcodeValidationReact |
|
| Order Management | ||||
| 12 | mage2kishan/module-order-attachments |
Panth_OrderAttachments |
Panth_OrderAttachmentsReact |
|
| 13 | mage2kishan/module-order-cleanup |
Panth_OrderCleanup |
Panth_OrderCleanupReact |
admin-only |
| 14 | mage2kishan/module-ordered-items |
Panth_OrderedItems |
Panth_OrderedItemsReact |
admin-only |
| Theme & UI | ||||
| 15 | mage2kishan/module-banner-slider |
Panth_BannerSlider |
Panth_BannerSliderReact |
|
| 16 | mage2kishan/module-mega-menu |
Panth_MegaMenu |
Panth_MegaMenuReact |
|
| 17 | mage2kishan/module-footer |
Panth_Footer |
Panth_FooterReact |
|
| 18 | mage2kishan/module-not-found-page |
Panth_NotFoundPage |
Panth_NotFoundPageReact |
|
| 19 | mage2kishan/module-notification-bar |
Panth_NotificationBar |
Panth_NotificationBarReact |
|
| 20 | mage2kishan/module-theme-customizer |
Panth_ThemeCustomizer |
Panth_ThemeCustomizerReact |
|
| Product Display | ||||
| 21 | mage2kishan/module-product-slider |
Panth_ProductSlider |
Panth_ProductSliderReact |
|
| 22 | mage2kishan/module-productgallery |
Panth_Productgallery |
Panth_ProductgalleryReact |
|
| 23 | mage2kishan/module-producttabs |
Panth_Producttabs |
Panth_ProducttabsReact |
|
| 24 | mage2kishan/module-quickview |
Panth_Quickview |
Panth_QuickviewReact |
|
| 25 | mage2kishan/module-search-autocomplete |
Panth_SearchAutocomplete |
Panth_SearchAutocompleteReact |
|
| 26 | mage2kishan/module-imageoptimizer |
Panth_Imageoptimizer |
Panth_ImageoptimizerReact |
|
| Customer Engagement | ||||
| 27 | mage2kishan/module-advanced-contact-us |
Panth_AdvancedContactUs |
Panth_AdvancedContactUsReact |
|
| 28 | mage2kishan/module-dynamic-forms |
Panth_DynamicForms |
Panth_DynamicFormsReact |
|
| 29 | mage2kishan/module-faq |
Panth_Faq |
Panth_FaqReact |
|
| 30 | mage2kishan/module-live-activity |
Panth_LiveActivity |
Panth_LiveActivityReact |
|
| 31 | mage2kishan/module-low-stock-notification |
Panth_LowStockNotification |
Panth_LowStockNotificationReact |
|
| 32 | mage2kishan/module-price-drop-alert |
Panth_PriceDropAlert |
Panth_PriceDropAlertReact |
|
| 33 | mage2kishan/module-product-attachments |
Panth_ProductAttachments |
Panth_ProductAttachmentsReact |
|
| 34 | mage2kishan/module-whatsapp |
Panth_Whatsapp |
Panth_WhatsappReact |
|
| Admin & Performance | ||||
| 35 | mage2kishan/module-cachemanager |
Panth_Cachemanager |
Panth_CachemanagerReact |
admin-only |
| 36 | mage2kishan/module-core |
Panth_Core |
Panth_CoreReact |
admin-only |
| 37 | mage2kishan/module-malware-scanner |
Panth_MalwareScanner |
Panth_MalwareScannerReact |
admin-only |
| 38 | mage2kishan/module-performance-optimizer |
Panth_PerformanceOptimizer |
Panth_PerformanceOptimizerReact |
(perf hints) |
One-liner to install all 38:
docker exec <project>_php composer require --update-no-dev --no-interaction \
mage2kishan/module-advanced-seo mage2kishan/module-pagebuilder-ai \
mage2kishan/module-corewebvitals mage2kishan/module-smart-badge \
mage2kishan/module-testimonials mage2kishan/module-advancedcart \
mage2kishan/module-checkout-extended mage2kishan/module-checkout-success \
mage2kishan/module-custom-options mage2kishan/module-extra-fee \
mage2kishan/module-zipcode-validation mage2kishan/module-order-attachments \
mage2kishan/module-order-cleanup mage2kishan/module-ordered-items \
mage2kishan/module-banner-slider mage2kishan/module-mega-menu \
mage2kishan/module-footer mage2kishan/module-not-found-page \
mage2kishan/module-notification-bar mage2kishan/module-theme-customizer \
mage2kishan/module-product-slider mage2kishan/module-productgallery \
mage2kishan/module-producttabs mage2kishan/module-quickview \
mage2kishan/module-search-autocomplete mage2kishan/module-imageoptimizer \
mage2kishan/module-advanced-contact-us mage2kishan/module-dynamic-forms \
mage2kishan/module-faq mage2kishan/module-live-activity \
mage2kishan/module-low-stock-notification mage2kishan/module-price-drop-alert \
mage2kishan/module-product-attachments mage2kishan/module-whatsapp \
mage2kishan/module-cachemanager mage2kishan/module-core \
mage2kishan/module-malware-scanner mage2kishan/module-performance-optimizer
The full resolved dependency set is captured in src/composer.json (tracked in this repo) and the lockfile at src/composer.lock.
Drop Panth-module-backed widgets into any Astro page, CMS template, category description, or product description by identifier:
---
import PanthSlot from "~/components/panth/PanthSlot.astro";
---
<!-- Banner slider identified by its `panth_banner_slider.identifier` -->
<PanthSlot identifier="banner-slider:home-hero" />
<!-- 6 featured testimonials -->
<PanthSlot identifier="testimonials:6" />
<!-- FAQ block for a specific admin category -->
<PanthSlot identifier="faq:general" />
<!-- A dynamic form by admin url_key -->
<PanthSlot identifier="form:custom-contact" />
<!-- Core Magento CMS block -->
<PanthSlot identifier="cms-block:home-bottom" />
<!-- Product carousel for a specific slider slug -->
<PanthSlot identifier="product-slider:bestsellers" />
<!-- Announcement bar -->
<PanthSlot identifier="notification-bar" />
<!-- Live-activity badge on a PDP -->
<PanthSlot identifier="live-activity:WJ12" />
<!-- Product attachments on a PDP -->
<PanthSlot identifier="attachments:WJ12" />
Unknown identifiers render nothing. All widgets read from Magento GraphQL via Zod-guarded safeParse — if the underlying Panth module is missing or disabled, the slot silently renders empty.
mage2react/
├── .env.example
├── docker-compose.yml
├── Dockerfile
├── nginx.conf
├── SETUP.md
│
├── src/
│ ├── composer.json # tracked: exact extension set
│ ├── composer.lock # tracked
│ └── app/code/Panth/ # 39 custom modules
│ ├── React/ # the core Panth_React module
│ ├── AdvancedSeoReact/
│ ├── BannerSliderReact/
│ ├── CheckoutExtendedReact/
│ ├── FaqReact/
│ ├── ... # 38 companion modules
│ └── WhatsappReact/
│
└── frontend/
├── Dockerfile
├── astro.config.mjs
├── tsconfig.json
├── public/ # manifest, sw.js, logo, favicon
└── src/
├── middleware.ts # CSP + security + cart bootstrap
├── layouts/Base.astro
├── components/
│ ├── panth/ # all Panth companions
│ │ ├── PanthSlot.astro
│ │ ├── banner-slider/
│ │ ├── testimonials/
│ │ ├── faq/
│ │ ├── dynamic-forms/
│ │ ├── smart-badge/
│ │ ├── mega-menu/
│ │ ├── product-slider/
│ │ ├── productgallery/
│ │ ├── producttabs/
│ │ ├── quickview/
│ │ ├── search-autocomplete/
│ │ ├── notification-bar/
│ │ ├── theme-customizer/
│ │ ├── whatsapp/
│ │ ├── live-activity/
│ │ ├── low-stock-notification/
│ │ ├── price-drop-alert/
│ │ ├── product-attachments/
│ │ ├── order-attachments/
│ │ ├── advanced-contact-us/
│ │ ├── advancedcart/
│ │ ├── checkout-extended/
│ │ ├── checkout-success/
│ │ ├── custom-options/
│ │ ├── extra-fee/
│ │ ├── zipcode-validation/
│ │ ├── advanced-seo/
│ │ ├── cwv/
│ │ └── not-found/
│ ├── catalog/
│ ├── cart/
│ ├── checkout/
│ ├── compare/
│ ├── customer/
│ ├── product/
│ ├── seo/
│ ├── a11y/
│ ├── system/
│ ├── cms/
│ └── ProductCard.astro
├── pages/
│ ├── index.astro
│ ├── [...slug].astro
│ ├── search.astro
│ ├── compare.astro
│ ├── contact.astro
│ ├── faq.astro
│ ├── testimonials.astro
│ ├── offline.astro
│ ├── 404.astro
│ ├── checkout/
│ ├── customer/
│ ├── sales/order/
│ ├── wishlist/index.astro
│ ├── api/ # graphql proxy, cart, wishlist, reviews, panth/*
│ ├── sitemap.xml.ts
│ ├── robots.txt.ts
│ └── opensearch.xml.ts
├── lib/ # graphql, queries-*, stores, sanitize, jsonld
└── styles/global.css
default-src 'self', script-src 'self' 'unsafe-inline' (inline-only), object-src 'none', frame-ancestors 'none', upgrade-insecure-requests./api/graphql proxy injects auth; the token never touches JS.X-Mage2React-* headers.Every 2026 Google best practice is baked in (see full list in the SEO coverage section of SETUP.md). Highlights:
@graph — Organization, WebSite+SearchAction, BreadcrumbList, Product (with aggregateRating, priceValidUntil, itemCondition, brand), ItemList, CollectionPage, WebPage, SearchResultsPage, FAQPage, ArticleHost:<link rel="prev"/next> for paged views, canonical strips ?page=1, ?sort, ?pageSize<h1> per page, <main>/<nav aria-label>/<article>Lives at src/app/code/Panth/React/. Provides:
Magento\GraphQl\Controller\GraphQl (allow list from admin config)GET /panthreact/health → {"ok":true,"version":"1.0.0"}view/frontend/web/images/{logo,favicon}.svg<content> container so direct hits to Magento's frontend don't leak broken Luma markupEvery one of the 38 Panth_<Name>React companions depends on this module via <sequence>.
See SETUP.md for cache flush, reindex, static content deploy, production build.
| Symptom | Fix |
|---|---|
Browser hangs ~5 s on first .local request |
macOS mDNS. First DNS lookup only; browser caches after. Use .test TLD to avoid entirely. |
| Site renders Luma theme instead of React | Check Traefik priority — _web must be 1, _api 100. |
| "Proceed to Checkout" doesn't navigate | Browser cached stale bundle. Hard-refresh (⇧R). |
| "Couldn't add to cart" on every product | Stale cart cookie. Cart-store auto-recreates; hard-refresh. |
| Category page shows 0 products | Top-level Luma categories aren't anchor. We aggregate descendants. |
| CSP blocks an image | Add its origin to img-src in src/middleware.ts. |
| Panth widget renders nothing | Check module is enabled + demo data present. Run the seed SQL from /tmp/panth-seed.sql during setup. |
| Requirement | Supported |
|---|---|
| Magento Open Source | 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8 |
| Adobe Commerce | 2.4.4 – 2.4.8 |
| PHP (Magento side) | 8.1, 8.2, 8.3, 8.4 |
| Node.js (frontend) | 22 LTS |
| Browsers | Evergreen (Chrome, Edge, Safari, Firefox) |
| Docker | Docker Desktop, OrbStack, Colima, Rancher Desktop |
git clone https://github.com/mage2sk/mage2react.git
cd mage2react
You need a running dev_network with Traefik (TLS), MySQL 8, Redis 7, OpenSearch, Mailpit. See SETUP.md for a minimal example stack.
cp .env.example .env
# edit .env — set PROJECT_NAME, PROJECT_DOMAIN, DB creds, Redis DB numbers
echo "127.0.0.1 <your-domain>" | sudo tee -a /etc/hosts
mkcert -install && mkcert <your-domain>
# register certs in Traefik dynamic config, restart Traefik
See SETUP.md for full bin/magento setup:install invocation with all flags. Once Magento is installed:
# Pull in all 38 Panth extensions (list in next section)
docker exec <project>_php composer require --update-no-dev --no-interaction $(grep 'mage2kishan/' composer-panth-requires.txt | xargs)
docker exec <project>_php bash -c 'bin/magento module:enable --all && bin/magento setup:upgrade'
docker exec <project>_php php bin/magento deploy:mode:set production
docker compose up -d
Open https://<your-domain>.
After bin/magento module:enable Panth_React, visit Stores → Configuration → Panth → React Storefront:
| Setting | Default | Description |
|---|---|---|
| Enable | Yes | Master toggle for the headless integration |
| Site URL | https://<your-domain> |
Public origin of the Astro frontend |
| CORS Allowed Origins | https://<your-domain> |
Newline-separated allow list for GraphQL CORS |
Environment variables (.env):
| Key | Purpose |
|---|---|
PROJECT_NAME |
Short lowercase identifier — used in container names, Traefik routers |
PROJECT_DOMAIN |
Public-facing hostname |
PHP_VERSION |
Magento PHP version (8.1 – 8.4) |
DB_* |
Magento DB credentials |
REDIS_*, OPENSEARCH_* |
Shared infra hostnames / ports |
FRONTEND_PORT |
Astro dev port (default 4321) |
MAGENTO_INTERNAL_HOST |
Container-to-container hostname for GraphQL |
MIT — see LICENSE. Use it commercially, modify it, fork it, ship it.
┌───────────────────── https://<your-domain> ─────────────────────┐
│ Traefik (TLS) │
│ │ │
│ ┌───────────────────────┼───────────────────────┐ │
│ │ priority 100: │ priority 1: │ │
│ │ /graphql, /rest, │ everything else │ │
│ │ /admin, /media, │ │ │
│ │ /static, /pub, │ │ │
│ │ /errors, /setup, │ │ │
│ │ /downloadable, │ │ │
│ │ /customer/section │ │ │
│ ▼ │ ▼ │
│ ┌───────────────────┐ │ ┌────────────────────┐ │
│ │ <project>_nginx │ │ │ <project>_frontend │ │
│ │ + php-fpm │ │ │ Astro 5 (Node) │ │
│ │ Magento 2.4.x │ │ │ React 19 + TW v4 │ │
│ └───────────────────┘ │ └────────────────────┘ │
│ │ │ │ │
│ └───── shared dev_network ─────────────────┘ │
│ │
│ shared MySQL 8.0 · Redis 7 · OpenSearch · Mailpit │
└─────────────────────────────────────────────────────────────────┘
src/pages/[...slug].astro)./api/graphql, a same-origin proxy that injects Authorization: Bearer <token> from the HttpOnly customer cookie.See SETUP.md for full extension patterns (new pages, GraphQL queries, React islands, hydration hints).
| Module Category | Headless |
|---|---|
| Best For | Mid-Market |
Talk to Kishan directly — written quote, scope and timeline within 24 hours. No sales call.
mage2react — Headless Magento 2 Storefront (Astro + React)