Quick start
Requirements
Section titled “Requirements”- Node.js 26.5 or later (below 27).
- A Magento 2.4.8 backend with GraphQL reachable from your machine. The companion modules your storefront uses must be installed there.
Run the storefront
Section titled “Run the storefront”-
Install dependencies from the repository root:
Terminal window npm install -
Point the storefront at your Magento. Create
apps/theme/.env.local:Terminal window MAGENTO_GRAPHQL_ENDPOINT=https://magento.example.com/graphqlNEXT_PUBLIC_SITE_URL=http://localhost:3000 -
Take a snapshot of your Magento store views:
Terminal window npm run sync:storesThis writes
apps/theme/src/generated/stores.json. Commit it when it changes. -
Start the dev server:
Terminal window npm run devIt builds the engine package first, then starts Next.js on
http://localhost:3000.
Useful scripts
Section titled “Useful scripts”The full list, with the test setup and the PR gate, is in Testing and quality gates.
| Script | Does |
|---|---|
npm run dev | Engine build, then the Next.js dev server. |
npm run build | Production build of the theme. |
npm test | Unit tests (Vitest). Build the engine first. |
npm run lint / npm run type-check | ESLint and TypeScript over engine and theme. |
npm run sync:stores | Refresh the store-view snapshot from Magento. |
npm run check:overrides | Check src/custom/ overrides against upstream changes. |
npm run bundle-budget | Fail when client bundles grow past their budget. |