A modern Shopping Cart built with ESMate, Next.js, React.js, ShadCN, ESLint, Prettier, GraphQL, and Shopify Hydrogen.
Building an online store usually means wrestling with complicated code for days? I wanted to change that.
So I created Next.js Shopify Storefront—basically, it's a starter kit that lets you build a Shopify store incredibly fast. Think of it as a foundation that's already solid, so you can focus on what makes your store unique instead of reinventing the wheel.
Here's what I'm talking about: it uses Next.js and React.js for the framework, TailwindCSS and ShadCN to make things look great, and connects directly to Shopify's backend through their GraphQL API. The shopping cart? Built with Shopify Hydrogen React.
But the part I'm most proud of is the developer experience. Everything's configured—ESMate, ESLint, Prettier, GraphQL Codegen—so the code stays clean and safe automatically.
It's not revolutionary. It's just taking what works and packaging it so you can skip the tedious setup and start building something meaningful.
If you like this project, hit the STAR button to bookmark it ⭐️
You can visit here to see the demo: https://next-shopify-storefront.vercel.app/
Clone the source code into your computer.
git clone https://github.com/VienDinhCom/next-shopify-storefront.gitThis project was developed with Node 24 and PNPM 10.
Install the project's dependencies.
pnpm installFirst, you need to set the below environment variables in the .env file or your deployment platforms.
NEXT_PUBLIC_SHOPIFY_STORE_DOMAINNEXT_PUBLIC_SHOPIFY_STOREFRONT_API_TOKENNEXT_PUBLIC_SHOPIFY_STOREFRONT_API_VERSION
You can follow the Shopify Storefront GraphQL API documentation to get Storefront API information.
Develop the project in development mode.
pnpm run devBuild the project in production mode.
pnpm run buildStart the project in production mode.
pnpm run startAnalyze the code to find problems with eslint and prettier.
pnpm run checkAutomatically fix problems.
pnpm run fixTo speed up your productivity, you can install these extensions:
- Shopify Data Faker • A Shopify development tool for generating dummy store data.
- Bootstrap Shopify Theme • A free Shopify Theme built with Bootstrap, BEM, Liquid, Sass, ESNext, Theme Tools, ... and Webpack.
- Next Shopify Storefront (v3) • A Shopping Cart built with TailwindCSS, HeadlessUI, Next.js, React.js, Shopify Hydrogen,... and Shopify Storefront GraphQL API.
- Next Shopify Storefront (v2) • A Shopping Cart built with TypeScript, Emotion, Next.js, React.js, React Query, Shopify Storefront GraphQL API, ... and Material UI.
- Next Shopify Storefront (v1) • A Shopping Cart built with TypeScript, NextJS, React, Redux, Apollo Client, Shopify Storefront GraphQL API, ... and Material UI.