Next.jsReact电商启动器

panini-cake — Next.js 电商模板

作者 stefanogali

基于 Next.js Commerce 的免费电商启动模板,使用 TypeScript 与 Tailwind CSS,通过 Shopify Storefront API 获取商品与页面数据。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-03查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

基于 Vercel Next.js Commerce 启动模板改造的电商前端

02

使用 Shopify Storefront API 作为商品与内容数据源

03

采用 Next.js App Router、React Server Components 与 Suspense

04

使用 Server Actions 处理数据变更,并支持 Edge Runtime

05

使用 Tailwind CSS 编写样式,并通过 Next.js Metadata 做 SEO 配置

06

支持通过 Shopify metafields 在 about 与 contact 页面添加自定义字段

模板详细介绍

panini-cake 是一个面向电商场景的免费启动模板,技术栈为 Next.js、TypeScript 与 Tailwind CSS,数据层接入 Shopify Storefront API。项目基于 Vercel 的 Next.js Commerce 启动模板改造,采用 App Router,并使用 React Server Components、Suspense、Server Actions 以及 Next.js 的 Metadata 能力。

模板默认包含首页、about 与 contact 页面,商品、菜单和页面内容在 Shopify 后台维护。首页的精选商品来自 Shopify 商品集合,通过环境变量 FEATURED_PRODUCT_SLUG 指定;导航菜单通过 MAIN_MENU_NAME 指定。模板还支持通过 ACF: Metafields Custom Fields 应用在 about 与 contact 页面读取自定义字段。

使用前需要自行准备 Shopify 开发商店、安装 Headless 应用并生成 Storefront API 访问令牌,同时配置 .env 中的公司名、站点名、Twitter 账号、商店域名、访问令牌与 revalidation secret 等变量。仓库采用 MIT 许可,但演示图片、字体、图标等第三方素材以及 Shopify、托管等外部服务需单独核对许可与费用。

Next.js电商启动器

适合你的项目吗?

适用场景

  • 为 Shopify 商店搭建自定义前端展示层
  • 在 Next.js App Router 项目中练习 Server Components 与 Server Actions
  • 作为电商类项目的起点,按需替换商品集合与页面内容
  • 在本地连接 Shopify 开发商店进行模板二次开发

适合人群

  • 已有 Shopify 商店并希望使用 Next.js 自建前端的开发者
  • 需要免费 MIT 许可电商启动模板的前端团队
  • 熟悉 TypeScript 与 Tailwind CSS、希望快速进入业务开发的工程师

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    克隆仓库后执行 npm install 安装依赖

  2. 2

    在 Shopify Partner 创建免费开发商店,安装 Headless 应用并生成 Storefront API 访问令牌

  3. 3

    复制 .env.example 为 .env,填写 COMPANY_NAME、SITE_NAME、SHOPIFY_STORE_DOMAIN、SHOPIFY_STOREFRONT_ACCESS_TOKEN、SHOPIFY_REVALIDATION_SECRET 等变量

  4. 4

    在 Shopify 后台添加商品与集合,并让 FEATURED_PRODUCT_SLUG 与 MAIN_MENU_NAME 指向实际名称

  5. 5

    执行 npm run dev 启动本地开发,模板默认只包含 about 与 contact 页面,其余页面需自行添加

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 使用模板需注册 Shopify Partner 免费账户并创建开发商店,属于外部服务依赖,非代码许可限制。
  • 需在 Shopify 应用商店安装 Headless 应用并生成 Storefront API 令牌,模板依赖该外部服务才能运行。
  • 运行前必须配置 Shopify Storefront API 访问令牌等环境变量,缺少则无法获取商品与页面数据。
  • 自定义字段功能依赖第三方 Shopify 应用 ACF: Metafields Custom Fields,需另行安装。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

create a free account, you will then be able to create a free development store

README 原文

install the Headless app to build using the Storefront API

README 原文

SHOPIFY_STOREFRONT_ACCESS_TOKEN="XXXXXXXXXXXXXXXXX"

README 原文

add ACF: Metafields Custom Fields

README 原文
https://github.com/stefanogali/panini-cake/blob/main/LICENSEhttps://github.com/stefanogali/panini-cake/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 92 / 100
技术栈
Next.js · React
网站类型
电商 · 启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-07-20
截图检查日期
2026-10-03

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: 869aa4c1d15f4910455dc823995783bd5c81c9c52cd030caf783cc6840cb6010

2026-10-03T00:40:17.409Z

来源文件 / 仓库
# [Next.js + Headless Shopify E-Commerce Template](https://panini-cake.vercel.app/)

This is a Next.Js + Typescript + Tailwindcss + headless Shopify free starter template.
This project is based on [Next.js Commerce starter template](https://github.com/vercel/commerce).

The live project can be found at [https://panini-cake.vercel.app/](https://panini-cake.vercel.app/)

![Hero Image](/public/template/screenshot.png?raw=true 'Panini Cake Shop hero')

A Next.js 14 and App Router-ready ecommerce template featuring:

- Shopify Storefront API
- Next.js App Router
- Optimized for SEO using Next.js's Metadata
- React Server Components (RSCs) and Suspense
- Server Actions for mutations
- Edge Runtime
- New fetching and caching paradigms
- Dynamic OG images
- Styling with Tailwind CSS

## Instructions for running locally

Please fork or clone the repo

```bash
https://github.com/stefanogali/panini-cake
```

then install the dependencies with

```bash
npm install
```

You will need to use the environment variables [defined in `.env.example`](.env.example) to run this template. It's recommended you use [Vercel Environment Variables](https://vercel.com/docs/concepts/projects/environment-variables) for this, but a `.env` file is all that is necessary.

```bash
COMPANY_NAME="Your company"
TWITTER_CREATOR="@your company"
TWITTER_SITE="Your site"
SITE_NAME="your site name"
SHOPIFY_REVALIDATION_SECRET="XXXXXXXXXXXXXXXXX"
SHOPIFY_STOREFRONT_ACCESS_TOKEN="XXXXXXXXXXXXXXXXX"
SHOPIFY_STORE_DOMAIN="YOUR_SHOP.myshopify.com"

FEATURED_PRODUCT_SLUG="special-cakes"
MAIN_MENU_NAME="main-menu"
```

Got to the [Shopify Partner website](https://www.shopify.com/uk/partners) and create a free account, you will then be able to create a free development store.

Once you are done, go to settings and find the apps section, then head to the [Shopify app store](https://apps.shopify.com/) and install the Headless app to build using the Storefront API.

From the Headless app you will need to generate the secret token and access token, which will then be used in your env variables.
You can refer to [this guide](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/getting-started)

```bash
SHOPIFY_REVALIDATION_SECRET="XXXXXXXXXXXXXXXXX"
SHOPIFY_STOREFRONT_ACCESS_TOKEN="XXXXXXXXXXXXXXXXX"
```

Once replaced, you can run

```bash
npm run dev
```

and the app should be running on your local with no errors.

Add the products on your shopify admin dashboard, and create your pages (this template only has _about_ and _contact_ pages at the moment, but you can add yours).

For the Featured Products you will need to create new entries under your product collections on Shopify admin. Do not forger to change your FEATURED_PRODUCT_SLUG .env variable.

The current menu name is _main-menu_, but you can give any name in your Shopify admin and change the .env variable accordingly.

## Metafields

This template also supports custom fields if you wish to add your own extra sections for pages and products, directly editable from your Shopify dashboard.

Go to the [Shopify app store](https://apps.shopify.com/) and add ACF: Metafields Custom Fields. Start creating your custom metafields.
Currently this theme supports metafields on the _about_ and _contacts_ pages, you can specify what you want to retrieve in the metafields array inside those pages.
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。