A headless Shopify storefront frontend built with Next.js, React, and TypeScript
react-query-shopify — Next.js Ecommerce Template
By jasonandrewth
A Next.js and React Query starter for a headless Shopify storefront that fetches product data via the Storefront GraphQL API and generates types with GraphQL Codegen.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 3
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Manages data requests to the Shopify Storefront GraphQL API via React Query
Provides a GraphQL Codegen type generation script outputting to src/generated/graphql.ts
Uses Tailwind for page styling
The repository uses the MIT license, allowing free use, modification, commercial use, and distribution
Template Details
This is a frontend starter template for headless Shopify e-commerce scenarios, built with TypeScript, Next.js, React, and React Query. Data comes from the Shopify Storefront GraphQL API, and the styling layer uses Tailwind. The repository provides a way to start the development server (npm run dev or yarn dev), with preview by default on local port 3000.
The template includes a GraphQL type generation workflow: running npm run graphql:codegen or yarn graphql:codegen will generate types based on the codegen.yml configuration, combining React Query and GraphQL Codegen, with output at src/generated/graphql.ts. The README notes that the generated output is based on the older react-query and requires manually changing imports to @tanstack/react-query to work properly.
Connecting to a real store requires configuring two variables in a .env file at the project root: NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN and NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN. The repository uses the MIT license, allowing free use, modification, commercial use, and distribution of this version of the code, but third-party assets such as demo images, fonts, and icons, as well as external services like domains and hosting, require separate verification of licensing and costs.
Is it right for your project?
Use Cases
- Building a custom headless frontend interface for a Shopify store
- Learning how Next.js and React Query work with a GraphQL API for data fetching
- Practicing a GraphQL Codegen workflow for generating TypeScript types in a project
- Using as starter code for secondary development of e-commerce Next.js projects
Suitable For
- Developers familiar with React and Next.js who want to build their own Shopify storefront
- Frontend projects that need to use the Shopify Storefront GraphQL API
- Teams or individuals looking to introduce GraphQL Codegen and React Query
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Run npm run dev or yarn dev to start the development server, accessible by default at http://localhost:3000
- 2
Create a .env file at the project root and configure NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN and NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN
- 3
Run npm run graphql:codegen or yarn graphql:codegen to generate types, with output at src/generated/graphql.ts
- 4
The generated types reference the older react-query by default; manually change imports to @tanstack/react-query
- 5
Third-party assets such as demo images, fonts, and icons require separate verification under their respective licenses
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in the public repository; the free scope is the code of this version and does not mean external services or third-party assets are free.
Must comply with when using
- Free use, modification, commercial use, and distribution of this version of the code are permitted.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Using this template requires registering your own Shopify store and obtaining a Storefront API access token, then configuring NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN and NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN in .env before real product data can be fetched; a Shopify account and API calls may incur platform fees.
- The types generated by GraphQL Codegen reference the older react-query by default and require manually changing imports to @tanstack/react-query to work properly, which is a code adjustment that must be completed before use.
- Demo images, fonts, icons, and other third-party assets require verification under their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur separate charges.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN=yourshopifytoken
Original README
https://github.com/jasonandrewth/react-query-shopify/blob/main/LICENCE.txthttps://github.com/jasonandrewth/react-query-shopify/blob/main/README.mdTo make it work simply update the import to `from "@tanstack/react-query"`
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- Partly documented · 73 / 100
- Technologies
- Next.js · React
- Website type
- E-commerce · Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2022-11-29
- Screenshot last checked
- 2026-10-02
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Automatically checked against source and license rules; no manual editorial review.
Inspect the recorded source material
SHA-256: b0a61930c4ba2949bd199a0ead84ed87752f7e94b2e4158fae13e315fcc9889a
2026-10-02T07:42:23.750Z
Source file / repository# 🛍 Next Shopify Storefront A **headless shopify storefront** built with [TypeScript](https://www.typescriptlang.org/), [Next.js](https://nextjs.org/), [React.js](https://reactjs.org/), [React Query](https://react-query.tanstack.com/), [Shopify Storefront GraphQL API](https://shopify.dev/api/storefront) and [Tailwind](https://tailwindcss.com/). ## Getting Started First, run the development server: ```bash npm run dev # or yarn dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. ## Type generation ```bash npm run graphql:codegen # or yarn graphql:codegen ``` This will generate types with react-query and GraphQL Codegen as specified in the `codegen.yml` Check out this [blog post](https://nhost.io/blog/how-to-use-graphql-code-generator-with-react-query) for an intro to this stack. Curently when types are generated they are stored in src/generated/graphql.ts but with the old version of reaxt-query. To make it work simply update the import to `from "@tanstack/react-query"` ``` //.env file in project root NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN=yourshopifytoken NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN=yourshop.myshopify.com ``` ## Deploy on Vercel The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Explore similar templates
Compare previews and descriptions within the same stack and category.

Next.js SaaS Starter
The official Next.js SaaS starter template, integrating email/password authentication, Stripe Checkout subscriptions, a dashboard with user/team CRUD, basic Owner/Member RBAC, and activity logging.
Next.js · SaaS

Next.js Commerce
Vercel's officially maintained Next.js App Router ecommerce starter with deep Shopify integration, offering a complete product catalog, cart, and checkout flow. Core logic is modular for swapping backends, and community provider versions exist for BigCommerce, Medusa, and Saleor.
Next.js · E-commerce

Next-js-Boilerplate
A developer-first Next.js 16 starter with Tailwind CSS 4 and TypeScript, supporting both App Router and Page Router.
Next.js · Starter

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

next-forge
next-forge is a Turborepo-based Next.js template maintained by Vercel, positioned as a starting point for SaaS products.
Next.js · Starter

SaaS-Boilerplate
SaaS-Boilerplate is an open-source SaaS starter template built with Next.js App Router, React 19, TypeScript, Tailwind CSS, and Shadcn UI.
Next.js · SaaS
