Overview
Groundwork is a Shopify Hydrogen starter built on React Router 7 and Vite that deploys to Oxygen or Vercel, with the pieces most starters skip already filled in: a real test suite, CI enforcement, formatting and lint rules that actually block a bad commit, and documentation that explains why the code is structured the way it is as well as what it does. This page is the front door. Read it first if you're deciding whether Groundwork fits a project, or if you're coming back to remember what's in the box.
Afterwards you'll know what ships (the stack, the scripts, the project structure), how to get it running locally, and where each deeper doc lives. It's for a developer evaluating Groundwork for a client engagement, or an agency lead scoping a build. It isn't a beginner tutorial, and it assumes you already know your way around a React Router / SSR codebase.
You'll need: Node ^22 or ^24 and npm 10+. Nothing else. Groundwork runs against Mock.shop by default, so you can clone it and look at real code without a Shopify store or API keys.
Related: Architecture for the deeper technical walkthrough this page summarizes, Testing for how the enforced coverage thresholds work, and Theme Contract if you're mainly evaluating the theming layer.
Source: docs/GROUNDWORK.md
A documented, tested foundation for building custom Shopify Hydrogen storefronts. This is the base template SignalBound uses (and sells) as the starting point for new headless storefront builds.
It's built on Hydrogen 2026-10 (React Router 7, React 19, Vite 8), deploys to Oxygen or Vercel, and fills in the missing pieces: a real test suite, CI, formatting/lint enforcement, and docs that explain why things are structured the way they are as well as what they are.
What's included
- Hydrogen 2026-10 + React Router 7: the standard Shopify headless storefront stack, with Hydrogen as a library the app composes (see docs/ARCHITECTURE.md).
- TypeScript, strict mode, with generated types for the Storefront and Customer Account APIs.
- ESLint + Prettier, configured and enforced: both run on commit, and lint runs again in CI.
- Vitest + Testing Library: a real unit/component test setup, with an enforced coverage threshold on
app/lib/. See docs/TESTING.md. - Playwright e2e tests: browse-to-cart, search, and account-login flows run against Mock.shop. See docs/TESTING.md.
- Accessibility: a skip-to-content link, focus-trapped/restored modal dialogs (cart, search, mobile menu), keyboard-navigable product option radiogroups, and automated WCAG 2.1 AA regression coverage via axe-core on every push. See docs/TESTING.md and docs/THEME_CONTRACT.md.
- Husky + lint-staged: lint/format on commit, typecheck/test on push, so broken or unformatted code can't land.
- GitHub Actions CI: lint, typecheck, test, e2e, and build run on every push and pull request.
- Oxygen or Vercel: the same app deploys to Shopify's Oxygen or to Vercel, and CI tests both builds. See docs/DEPLOYMENT.md.
- Mock.shop by default: it runs out of the box against Shopify's Mock.shop test data, so you can evaluate or develop against this template without connecting a real store.
Requirements
- Node.js
^22.12or^24(.nvmrcpins the version CI uses). Node 26 isn't listed: Shopify's Hydrogen 2026-10 template declares^22.12 || ^24. - npm 10+ (npm 11 ships with Node 24)
Getting started
npm install
npm run dev
The dev server runs against Mock.shop by default, so you don't need a Shopify store or API keys to get started.
To connect a real Shopify store instead, run:
npx shopify hydrogen link
npx shopify hydrogen env pull
This populates .env with your storefront's credentials. See .env.example for the variables the app expects.
Customer login (Customer Account API) needs an HTTPS origin, so run npm run dev:https when you work on account pages; it serves the app over trusted local HTTPS. Over plain npm run dev, or on Mock.shop, /account reports that customer accounts aren't configured.
Scripts
| Command | Description |
|---|---|
npm run dev | Start the local dev server (Vite + MiniOxygen). |
npm run dev:https | The dev server over local HTTPS, for customer login. |
npm run build | Build for production (react-router build). |
npm run build:vercel | Build for Vercel on your machine (Vercel runs build). |
npm run preview | Build, then preview the production build locally. |
npm run deploy | Deploy to Oxygen (shopify hydrogen deploy). |
npm run lint | Lint the codebase with ESLint. |
npm run format | Format the codebase with Prettier. |
npm run format:check | Check formatting without writing changes (used in CI). |
npm run typecheck | Run the TypeScript compiler in check-only mode. |
npm run test | Run the unit test suite once. |
npm run test:watch | Run the unit test suite in watch mode. |
npm run test:coverage | Run tests with a coverage report. |
npm run test:e2e | Run the Playwright end-to-end suite. |
npm run test:e2e:ui | Run the Playwright suite in interactive UI mode. |
npm run test:e2e:vercel | Run the Playwright suite against the Vercel build. |
npm run codegen | Regenerate GraphQL and route types (after query changes). |
Project structure
app/
components/ Reusable UI components
graphql/ Customer Account API GraphQL documents
lib/ Framework-agnostic helpers (session, cart, search, etc.)
routes/ File-based routes (React Router)
styles/ Global CSS
docs/ Architecture notes and guides
test/ Shared test setup
See docs/ARCHITECTURE.md for a deeper walkthrough of how the pieces fit together.
Documentation
- docs/ARCHITECTURE.md: how the app is put together and why.
- docs/DEPLOYMENT.md: deploying to Oxygen or Vercel, and how the two differ.
- docs/TESTING.md: how to write and run tests in this template, including the axe-core accessibility suite.
- docs/THEME_CONTRACT.md: the token contract a theme must satisfy, including required contrast ratios.
- docs/guides/search: implementing search.
- docs/guides/predictiveSearch: implementing predictive search.
- docs/guides/notifyBackInStock.md: wiring up "notify me when back in stock" to a real backend.
- docs/BACKLOG.md: known gaps that must be closed before shipping v1.
- CONTRIBUTING.md: conventions and workflow for contributing to the template itself.
Setting up the Customer Account API (/account)
Follow steps 1 and 2 of the Customer Account API guide to set up a public domain for local development.
License
See LICENSE.