Skip to content

Next.js Commerce

A Next.js storefront template for online shops, built to connect to Shopify. Archived and deprecated.vercel/commerce

Stars
14.3k
Forks
5.5k
Licence
MIT
Language
TypeScript
Last update
17 days ago
Type
App

This repository is archived and no longer maintained.

What it is

Next.js Commerce is a starter template for building an online store with Next.js, a React framework. It uses server-rendered pages and React Server Components so product pages load quickly. The version here is connected to Shopify, and the README says other commerce platforms can swap in their own data layer. The repository is archived, and the README says development has moved to vercel/shop.

  • Run a local Next.js storefront connected to a Shopify store using the README's environment variable setup
  • Study how React Server Components, Server Actions, and useOptimistic are used in a real commerce app
  • Fork the repository and replace the lib/shopify layer to connect a different commerce provider, as the README suggests

Great for

  • Developers who want a starting point for a Shopify storefront built with Next.js
  • Teams evaluating a headless storefront architecture
  • Developers comparing commerce-platform templates
  • Developers who want to study a Next.js App Router ecommerce example

Not ideal for

  • Anyone wanting a ready-to-use store without coding, since this is a developer template
  • Teams starting new projects, since the README says the template is deprecated and archived and points to vercel/shop
  • Non-Shopify merchants who want an out-of-the-box setup, since the included provider is Shopify

How to get it

  1. 1

    Clone and build from source

    You'll need: Node.js · pnpm · A Shopify store and its environment variables (see .env.example) · Vercel CLI (optional, used for env setup)

    Install Vercel CLI

    npm i -g vercel

    Install dependencies

    pnpm install

    Start the dev server

    pnpm dev
  2. 2

    Run it

    • Copy the environment variables defined in .env.example, or pull them with vercel env pull after linking the project
    • Run pnpm install to install dependencies
    • Run pnpm dev to start the app
    • Open http://localhost:3000 in your browser
  3. 3

    Get the most out of it

    • Use Vercel Environment Variables instead of a committed .env file, as the README recommends, and never commit .env because it exposes store secrets
    • Follow the linked Vercel Shopify integration guide to configure Shopify as a headless CMS
    • Look at the Orama integration for typeahead and vector-based search, per the README
    • Look at the React Bricks integration if you want visual editing of pages and footer content
    • Check the provider list for forks from other commerce platforms such as BigCommerce or Saleor

Downloads

Strengths

  • Built on the Next.js App Router with React Server Components and Server Actions
  • Released under the MIT license, so it can be reused and modified
  • Several commerce providers have published their own versions based on it, per the README

Trade-offs

  • The repository is archived and the template is deprecated, so it will not receive new development here
  • Running it requires a Shopify store and its credentials in environment variables
  • The README is short on setup detail and points to external guides for Shopify configuration

How it compares

ProjectStarsTypeLevelUpdatedBest for
commerce (this)14.3kAppintermediate17 days agoDevelopers who want a starting point for a Shopify storefront built with Next.js
cal.diy49.6kAppadvanced4 days agoIndividuals who want to self-host their own booking page
ai-website-cloner-template38.4kAppintermediate17 days agoDevelopers who want a working Next.js starting point for a site they already own
bagisto28.3kAppintermediate4 days agoDevelopers building a custom online store on Laravel
NativeBase20.4kLibraryintermediate9 months agoTeams maintaining an existing app already built on NativeBase
taxonomy19.3kAppadvanced7 months agoDevelopers learning the Next.js App Router and server components

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.