Headless storefront template based on Next.js App Router and the Shopify Storefront API
nextjs-commerce — Next.js Ecommerce Template
By mdresch
A headless storefront template built on Next.js App Router and the Shopify Storefront API, enabling quick creation of new storefronts via a GitHub Template Repository, with built-in products, collections, cart, checkout redirect, Shopify pages, blog, contact form, and book preview features.
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.
Supports core store features such as products, collections, cart, and checkout redirect
Shopify pages served via /<handle> paths; blog supports index and article pages
Book-type products can display a "Preview sample pages" preview modal
Homepage offers 3 variants switchable via LANDING_VARIANT
Footer automatically appends default items such as About, Contact, Privacy, Blog when the Shopify menu lacks links
Template Details
This repository is a Shopify headless storefront template built with Next.js App Router and the Shopify Storefront API. The README states it can be used as a GitHub Template Repository to quickly create new storefronts (such as digital books, templates, apps, etc.) without manually copying code.
The template includes these core storefront features: products, collections, cart, and checkout redirect; Shopify pages served via /<handle> paths (e.g., /about, /contact); /contact displays a simple mailto form using CONTACT_EMAIL; blog accessible via /blogs/<blogHandle> and /blogs/<blogHandle>/<articleHandle>; for book-type products, a "Preview sample pages" modal can be displayed; when the Shopify footer menu lacks common links, the footer appends default links such as About, Contact, Privacy, Blog; the homepage offers 3 variants switchable via LANDING_VARIANT.
Usage requirements include: a recent Node.js LTS version, pnpm, and a Shopify Storefront API access token with content scopes (blog/article) enabled. Environment variables require at least SHOPIFY_STORE_DOMAIN and SHOPIFY_STOREFRONT_ACCESS_TOKEN; optional variables include SITE_NAME, COMPANY_NAME, SHOPIFY_REVALIDATION_SECRET, CONTACT_EMAIL, LANDING_VARIANT, and NEXT_PUBLIC_BLOG_PATH. The README also provides local run commands (pnpm install, pnpm dev), a developer-only /health check page, and a configuration checklist for new stores in the Shopify admin, covering homepage collections, menus, pages, blog, and optional book preview settings. Production deployment requires setting the same environment variables on the hosting platform (e.g., Vercel).
Is it right for your project?
Use Cases
- Quickly create a new Shopify headless storefront via a GitHub Template Repository
- Build a storefront for selling digital books, templates, or apps
- Provide a storefront interface including products, collections, cart, and checkout redirect for a Shopify store
- Integrate a blog, contact form, and custom pages into a store
- Provide sample page preview functionality for book-type products
Suitable For
- Developers who want to build a Shopify headless storefront using Next.js App Router
- Projects that need to quickly create a new storefront from a template
- Merchants selling digital books, templates, or apps who need product preview functionality
- Scenarios that need to integrate Shopify pages, blog, and contact form into the storefront
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Requires a recent Node.js LTS version and pnpm
- 2
Requires a Shopify Storefront API access token with content scopes (blog/article) enabled
- 3
Copy .env.example to .env and fill in at least SHOPIFY_STORE_DOMAIN and SHOPIFY_STOREFRONT_ACCESS_TOKEN
- 4
Create the collections required for the homepage in the Shopify admin: hidden-homepage-featured-items (at least 3 products) and hidden-homepage-carousel (several products)
- 5
Create menu handles next-js-frontend-header-menu and next-js-frontend-footer-menu in the Shopify admin, as well as pages such as about and contact, and a blog (e.g., handle adpa)
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's 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
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses; they cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur additional charges.
- A Shopify Storefront API access token is required, and content scopes (blog/article) must be enabled to use features such as the blog.
- The SHOPIFY_STORE_DOMAIN environment variable must be configured, pointing to your Shopify store domain.
- The SHOPIFY_STOREFRONT_ACCESS_TOKEN environment variable must be configured, which is the Shopify Storefront API access token.
- The template depends on specific collections pre-created in the Shopify admin; collections such as hidden-homepage-featured-items must be created manually.
- The template reads specific menu handles from Shopify; corresponding menus must be created in the admin for navigation to display correctly.
- Pages such as about and contact must be created in the Shopify admin for the template to provide content at the corresponding paths.
- The blog feature depends on creating a blog (e.g., handle adpa) and publishing articles in the Shopify admin.
- Production deployment requires configuring the same environment variables on the hosting platform (e.g., Vercel).
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
- **Shopify Storefront API access token** with content scope (blogs/articles) enabled
Original README
- **`SHOPIFY_STORE_DOMAIN`**
Original README
- **`SHOPIFY_STOREFRONT_ACCESS_TOKEN`**
Original README
Create these Shopify collections (the template expects them):
Original README
The template reads these menu handles from Shopify:
Original README
Create Shopify Pages with handles like:
Original README
Create a Shopify blog (e.g. handle `adpa`) and publish posts:
Original README
https://github.com/mdresch/nextjs-commerce/blob/main/license.mdhttps://github.com/mdresch/nextjs-commerce/blob/main/README.mdDeploy to your hosting (e.g. Vercel) and set the same environment variables there.
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-14. 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
- More documented · 80 / 100
- Technologies
- Next.js · React
- Website type
- E-commerce
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
- 2026-08-07
- Screenshot last checked
- 2026-10-14
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.
Review declaration: codex-user-requested-batch-review-20261015 · 2026-10-15
Inspect the recorded source material
SHA-256: 292f2246a7a634662539d7052d722e33740be9d8e053a6bfa0d2347e847d98b4
2026-10-14T19:44:41.848Z
Source file / repository## Shopify headless storefront template (Next.js App Router) This repo is a **Shopify headless storefront template** built with Next.js App Router and the Shopify Storefront API. Use it as a **GitHub Template Repository** to quickly spin up new storefronts (digital books, templates, apps, etc.) without copying code manually. ### What’s included - **Core storefront**: products, collections, cart, checkout redirect - **Shopify Pages**: pages are served at `/<handle>` (e.g. `/about`, `/contact`) - **Contact page form**: `/contact` shows a simple “mailto” form (see `CONTACT_EMAIL`) - **Blog**: `/blogs/<blogHandle>` and `/blogs/<blogHandle>/<articleHandle>` - **Book preview**: for book products, show a “Preview sample pages” modal - **Footer defaults**: appends common links (About, Contact, Privacy, Blog) when missing from the Shopify footer menu - **Landing variants**: 3 home page variants switchable via `LANDING_VARIANT` ### Use this repo as a template (recommended) 1. On GitHub, go to **Settings → General → Template repository** and enable it. 2. Click **Use this template → Create a new repository**. 3. In the new repo, set environment variables and point it to the new Shopify store. ### Requirements - **Node.js**: recent LTS - **pnpm** - **Shopify Storefront API access token** with content scope (blogs/articles) enabled ### Environment variables Copy `.env.example` to `.env` and fill in at least: - **`SHOPIFY_STORE_DOMAIN`** - **`SHOPIFY_STOREFRONT_ACCESS_TOKEN`** Optional: - **`SITE_NAME`**, **`COMPANY_NAME`** - **`SHOPIFY_REVALIDATION_SECRET`**: used by `POST /api/revalidate` (Shopify webhooks) - **`CONTACT_EMAIL`**: recipient for the `/contact` mailto form - **`LANDING_VARIANT`**: `professional` | `traditional` | `surprise` (default: `professional`) - **`NEXT_PUBLIC_BLOG_PATH`**: blog link target used in the footer + landing CTAs (default: `/blogs/adpa`) > Do not commit `.env`. ### Run locally ```bash pnpm install pnpm dev ``` Open `http://localhost:3000`. ### Setup / Health check page (developer-only) This template includes a simple health check page at: - `GET /health` It is **not** linked in the storefront UI. Use it to verify env vars, menus, homepage collections, and blog access. ### New store checklist (Shopify admin) #### 1) Collections used by the homepage Create these Shopify collections (the template expects them): - `hidden-homepage-featured-items` (at least 3 products) - `hidden-homepage-carousel` (several products) #### 2) Menus used by the theme The template reads these menu handles from Shopify: - Header: `next-js-frontend-header-menu` - Footer: `next-js-frontend-footer-menu` The footer will also append these paths if they’re missing: - `/about` - `/contact` - `/data-sharing-opt-out` - `NEXT_PUBLIC_BLOG_PATH` (defaults to `/blogs/adpa`) #### 3) Pages Create Shopify Pages with handles like: - `about` → `/about` - `contact` → `/contact` #### 4) Blog Create a Shopify blog (e.g. handle `adpa`) and publish posts: - Blog index: `/blogs/<blogHandle>` - Blog post: `/blogs/<blogHandle>/<postHandle>` #### 5) Book preview pages (optional) To show the preview button: - Mark a product as a book with **Product type** `Book`/`Books` or tag `book`. - Add sample-page images to product media and put **`[preview]`** in the image **alt text** to make them preview-only (excluded from the main gallery). ### Production Deploy to your hosting (e.g. Vercel) and set the same environment variables there.
Explore similar templates
Compare previews and descriptions within the same stack and category.

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

commerceplate
A free Shopify e-commerce starter template built with Next.js 16, Tailwind CSS 4, and TypeScript, using the Shopify Storefront API (GraphQL).
Next.js · E-commerce

ecommerce-template
A Next.js App Router ecommerce template built with TypeScript, Tailwind CSS, Radix UI, and TanStack Query.
Next.js · E-commerce

boundless-nextjs-ecommerce-template
A free Next.js and TypeScript e-commerce frontend starter kit from Boundless Commerce.
Next.js · E-commerce

mobile-medusa
Mobile Medusa is an Expo-based React Native mobile e-commerce starter template that connects to a Medusa backend and aligns its pages and user flows with the Medusa Next.js Starter.
Next.js · E-commerce

template-ecommerce-webapp-nextjs
An official Contentful-maintained Next.js ecommerce starter template that fetches content via the Contentful GraphQL API and uses graphql-codegen to generate a type-safe SDK.
Next.js · E-commerce
