Next.jsReact电商博客

nextjs-ecommerce-shop-demo — Next.js 电商模板

作者 sajanv88

基于 Next.js 16 和 nuvui 组件库的电商店铺模板,包含商品浏览、购物袋、多币种显示与 SEO 配置,商品数据为本地示例。

看看你的网站会是什么样

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

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

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

全部页面与视图 3

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

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

值得关注的模板亮点

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

01

使用 nuvui 组件库构建完整店铺界面,包括大型菜单、抽屉、轮播、尺码选择器和吐司等

02

购物袋状态保存在浏览器中,跨标签页同步,并显示免运费进度

03

支持 USD、EUR、GBP、CAD、AUD、JPY 六种货币显示切换,选择会被记住

04

提供每页 SEO 元数据、站点地图、robots.txt 以及商品、集合、面包屑和 FAQ 的结构化数据

05

包含严格内容安全策略、输入验证、键盘操作支持和减少动态效果适配

06

附带 Dockerfile、Helm chart 和 GitHub Actions 工作流,支持自托管部署

模板详细介绍

该模板是一个面向 Next.js 的电商店铺前端演示,使用 nuvui 组件库构建界面,采用设计令牌进行主题化,并支持深色模式。页面覆盖首页、带筛选与排序的集合页、含图库与尺码选择的商品页、搜索、购物袋(抽屉与独立页面)、品牌故事页以及含 FAQ 的政策页。购物袋状态保存在浏览器中并跨标签页同步,支持显示免运费进度。价格可在 USD、EUR、GBP、CAD、AUD、JPY 六种货币间切换,选择会被记住,但 README 说明演示仅按固定汇率换算用于展示,实际始终以 USD 计价。SEO 方面提供每页标题、描述、规范链接、分享图片、含图片的站点地图、robots.txt、真实 404 以及商品、集合、面包屑和 FAQ 的结构化数据。安全与可访问性包括严格的内容安全策略、输入验证、键盘友好的菜单与抽屉、可见焦点和减少动态效果支持。商品数据位于 src/lib/catalog 下的本地文件,README 指出接入 Shopify、无头 CMS 或自有 API 需要重写该目录中的少数函数。结账按钮组件预留了接入 Shopify 结账链接或 Stripe Checkout 会话的位置。模板还附带 Dockerfile、Helm chart 和 GitHub Actions 工作流用于自托管。商品名称、描述和图片来自 Vercel 公共演示商店,使用前需确认版权或替换为自己的素材。

Next.jsReact电商博客

适合你的项目吗?

适用场景

  • 需要快速搭建一个具有编辑风格视觉的电商前端演示或原型
  • 希望以 nuvui 组件库为基础定制品牌主题的 Next.js 项目
  • 需要本地商品数据驱动、后续可替换为 Shopify 或自有 API 的店铺前端
  • 计划部署到 Vercel 并配置自定义域名与规范链接的电商站点

适合人群

  • 熟悉 Next.js 和 pnpm 的前端开发者
  • 希望使用组件库与设计令牌快速定制店铺外观的团队
  • 需要演示多币种显示和购物袋交互的电商项目

上手与定制指南

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

  1. 1

    需要 Node.js 24 或更新版本以及 pnpm,安装后运行 pnpm dev 启动本地开发服务器

  2. 2

    部署到 Vercel 时需将根目录设置为 apps/ecommerce-shop-demo,Node.js 版本保持 24.x

  3. 3

    连接自定义域名后需设置 SITE_URL 环境变量并重新部署,以更新规范链接、站点地图和结构化数据

  4. 4

    商品数据位于 src/lib/catalog 下的本地文件,接入真实后端需重写该目录中的读取函数

  5. 5

    演示商品图片和文案来自 Vercel 公共演示商店,商用前需确认版权或替换为自有素材

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
  • 演示中的多币种仅按固定汇率换算用于展示,实际始终以 USD 计价;真实多币种定价需从商业平台获取汇率。
  • 结账按钮仅为预留位置,需自行接入 Shopify 结账链接或 Stripe Checkout 会话,模板本身不含真实结账流程。
  • 政策页面为模板文案,在接收真实订单前应经过审阅。
  • 星级评分和用户评价为示例内容,并非真实评价。
  • 演示商品名称、描述和图片来自 Vercel 公共演示商店,商用前需确认使用权或替换为自有素材。
  • MIT 许可证仅覆盖代码,演示图片和商品文案不在许可范围内。
  • 商品图片经 Vercel 图片优化处理,会计入所选用量计划;大目录时需留意用量。
  • 预览部署中 Vercel Toolbar 脚本因 CSP nonce 被浏览器拦截并产生 CSP 错误,可在设置中关闭工具栏。
  • 连接自定义域名后需设置 SITE_URL 环境变量并重新部署,以更新规范链接、站点地图和结构化数据。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

- **Currencies:** `src/lib/currency.ts`. The demo converts at fixed rates for display only and always charges in USD. For real multi-currency pricing, take the rates from your commerce platform.

README 原文

- **Checkout:** `src/components/cart/checkout-button.tsx` is where a Shopify checkout link or a Stripe Checkout session goes.

README 原文

- **Policies:** `src/lib/policies.ts`. This is template copy, so have it reviewed before you take real orders.

README 原文

The star ratings and testimonials are sample content. They're deliberately kept out of the structured data, so search engines never see made-up reviews.

README 原文

The demo catalog's product names, descriptions and studio shots come from Vercel's public demo store at [template.vercel.shop](https://template.vercel.shop), and the on-model photos are cropped versions of its images. Make sure you have the rights to use them before you put the store in front of customers, or swap in your own: drop them into `public/products/<handle>/` and update the paths in `products.ts`.

README 原文

The license covers the code. The demo photos and product copy aren't part of it; see [About the photos](#about-the-photos).

README 原文

- **Image optimization.** Product photos go through Vercel's image optimization, which counts toward your plan's usage. A demo store sits comfortably inside the free allowance, but keep an eye on it if you load in a large catalog.

README 原文

- **The Vercel Toolbar on previews.** The store sends a strict, nonce-based Content Security Policy, and the toolbar's script doesn't carry the nonce, so the browser blocks it on preview deployments and logs a CSP error. If you want a clean console on previews, turn the toolbar off under **Settings → General → Vercel Toolbar**. Production isn't affected.

README 原文

1. Go to **Settings → Environment Variables** and add `SITE_URL` with your full address, such as `https://shop.example.com`, for the Production environment.

README 原文
https://github.com/sajanv88/nextjs-ecommerce-shop-demo/blob/main/LICENSEhttps://github.com/sajanv88/nextjs-ecommerce-shop-demo/blob/main/README.md

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

项目核对记录与介绍依据

模板资料

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

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

这个项目需要核对什么

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

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

审核声明: codex-user-requested-batch-review-20261021 · 2026-10-21

查看当时使用的来源资料

SHA-256: fde3d9f933ac7e5643ed666b5a50029b32acc9cb7dfa461e9bc26deb4125b872

2026-10-19T08:39:38.070Z

来源文件 / 仓库
# DemoShop Nuvi

A quiet, editorial storefront for Next.js. Think warm ivory pages, a serif headline face, big photography and a bag that slides in from the side. It's built with **Next.js 16** and **[nuvui](https://nuvui.nuvraxis.com)**, and every piece of interface you see, from the mega menu to the size picker, is a nuvui component themed with design tokens. Dark mode comes along for free.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsajanv88%2Fnextjs-ecommerce-shop-demo&root-directory=apps%2Fecommerce-shop-demo&project-name=demoshop-nuvi&repository-name=demoshop-nuvi)
[![License: MIT](https://img.shields.io/badge/license-MIT-b89a5e.svg)](LICENSE)

> ✨ **Built with [nuvui](https://nuvui.nuvraxis.com).** Every button, menu, drawer and carousel in this store comes from nuvui, an open-source React component library with polished, accessible components that you theme with design tokens. If you like how this template looks and feels, you'll love building with it. **[Explore nuvui →](https://nuvui.nuvraxis.com)**

## What you get

- **A full shop.** Home page, collections with filters and sorting, product pages with a photo gallery and sizes, search, a bag (as a drawer and as a page), an "our story" page and policy pages with an FAQ.
- **A bag that just works.** It lives in the browser, stays in sync across tabs, and shows how close the shopper is to free shipping.
- **Prices in six currencies.** Shoppers can switch between USD, EUR, GBP, CAD, AUD and JPY from the header, and every price on the page rolls over to the new one. The choice is remembered on the next visit.
- **SEO that's done properly.** Titles, descriptions and canonical URLs on every page, share images, a sitemap with images, `robots.txt`, real 404s, and structured data for products, collections, breadcrumbs and the FAQ.
- **Fast by default.** Photos are served as AVIF or WebP, the first screen is preloaded, and pages stream in behind skeletons, so clicking around feels instant.
- **Secure and accessible.** A strict Content Security Policy, validated input everywhere, keyboard-friendly menus and drawers, visible focus, and reduced-motion support.

## Built on nuvui

This template is a showcase for **[nuvui](https://nuvui.nuvraxis.com)**, and it's the reason the store came together so quickly. The whole storefront, from the mega menu, sheets, carousels and accordions to the size picker, toasts and animated prices, uses nuvui components out of the box. The luxury look is a single theme file of design tokens, so there's no fighting component styles.

- **Polished components** for real products: navigation, forms, overlays, data display and more
- **Accessible by default**, with keyboard support, focus management and ARIA wired up for you
- **Themeable with tokens**, so light and dark modes and your brand colors live in one place
- **Made for Next.js**, working nicely with Server Components and a strict Content Security Policy

👉 **Browse the components, docs and ready-made blocks at [nuvui.nuvraxis.com](https://nuvui.nuvraxis.com).**

## Run it on your machine

You'll need **Node.js 24 or newer** (the repo pins 26 in `.node-version`) and **pnpm**. If you don't have pnpm yet, `corepack enable` sets up the right version for you.

```sh
pnpm install
pnpm dev
```

Then open [http://localhost:3000](http://localhost:3000).

Before you push anything, run the same checks CI runs:

```sh
pnpm typecheck && pnpm lint && pnpm build
```

## Deploy it to Vercel

### The quick way

Click **Deploy with Vercel** above. Vercel copies the repo into your GitHub account, points the project at the right folder and deploys it. You don't need to fill anything in. A couple of minutes later you have a live store.

### Importing it yourself

If you've already forked or cloned the repo:

1. In Vercel, choose **Add New → Project** and import your repository.
2. Set **Root Directory** to `apps/ecommerce-shop-demo`. This is the one setting that matters, because the store lives in a monorepo.
3. Leave the framework, build command and install command on their defaults. Vercel spots Next.js, pnpm and Turborepo by itself.
4. Keep **Node.js Version** on **24.x** (the default) under **Settings → Build and Deployment**.
5. Click **Deploy**.

### When you add your own domain

Out of the box, the store uses your Vercel production address (`your-project.vercel.app`) for canonical URLs, the sitemap and structured data. Once you connect a custom domain:

1. Go to **Settings → Environment Variables** and add `SITE_URL` with your full address, such as `https://shop.example.com`, for the Production environment.
2. **Redeploy.** Many pages are prerendered at build time, so a new value only shows up after a fresh build.

Preview deployments keep pointing their canonical URLs at production, which is what you want: search engines won't index your previews as separate sites.

### Good to know

- **The Vercel Toolbar on previews.** The store sends a strict, nonce-based Content Security Policy, and the toolbar's script doesn't carry the nonce, so the browser blocks it on preview deployments and logs a CSP error. If you want a clean console on previews, turn the toolbar off under **Settings → General → Vercel Toolbar**. Production isn't affected.
- **Image optimization.** Product photos go through Vercel's image optimization, which counts toward your plan's usage. A demo store sits comfortably inside the free allowance, but keep an eye on it if you load in a large catalog.

## Settings

| Variable | Do you need it? | What it does |
| --- | --- | --- |
| `SITE_URL` | Once you have a custom domain | Your store's public address. Canonical URLs, the sitemap, `robots.txt` and structured data are built from it. On Vercel it falls back to your production `.vercel.app` address. |
| `OTEL_SERVICE_NAME` | No | The service name on OpenTelemetry traces. Defaults to `ecommerce-shop-demo`. |

For local development, copy `apps/ecommerce-shop-demo/.env.example` to `apps/ecommerce-shop-demo/.env.local` and edit it there.

## Make it yours

- **Name, tagline, email and navigation:** `src/lib/site.ts`.
- **Colors, fonts and corner radii:** `src/styles/base/_theme.scss`. These are nuvui tokens, with the light and dark values side by side, so a rebrand is mostly a matter of changing a handful of lines.
- **Products and collections:** `src/lib/catalog/products.ts` and `collections.ts`. Everything reads through `src/lib/catalog/index.ts`, so hooking up Shopify, a headless CMS or your own API means rewriting those few functions and nothing else.
- **Currencies:** `src/lib/currency.ts`. The demo converts at fixed rates for display only and always charges in USD. For real multi-currency pricing, take the rates from your commerce platform.
- **Checkout:** `src/components/cart/checkout-button.tsx` is where a Shopify checkout link or a Stripe Checkout session goes.
- **Policies:** `src/lib/policies.ts`. This is template copy, so have it reviewed before you take real orders.

The star ratings and testimonials are sample content. They're deliberately kept out of the structured data, so search engines never see made-up reviews.

## About the photos

The demo catalog's product names, descriptions and studio shots come from Vercel's public demo store at [template.vercel.shop](https://template.vercel.shop), and the on-model photos are cropped versions of its images. Make sure you have the rights to use them before you put the store in front of customers, or swap in your own: drop them into `public/products/<handle>/` and update the paths in `products.ts`.

## Hosting it yourself

The repo also ships a Dockerfile, a Helm chart and GitHub Actions workflows that build and publish a container image. [CLAUDE.md](CLAUDE.md) walks through the whole pipeline.

## Where things live

```
apps/ecommerce-shop-demo/
  src/app/              pages, metadata, sitemap, robots and share images
  src/components/       one folder per component, each with its own stylesheet
  src/lib/catalog/      the product data, its types and the cached readers
  src/lib/currency.ts   display currencies and their rates
  src/lib/seo.ts        structured data builders
  src/styles/           theme tokens, element defaults and page layout
  public/products/      three or four photos per product
packages/tsconfig/      the shared TypeScript config
charts/                 the Helm chart
```

## License

Free and open source under the [MIT License](LICENSE), © 2026 [sajanv88](https://github.com/sajanv88). Use it, fork it and build your own store with it, commercially or otherwise. A star on the repo or a link back to [nuvui](https://nuvui.nuvraxis.com) is always appreciated, but never required.

The license covers the code. The demo photos and product copy aren't part of it; see [About the photos](#about-the-photos).
反馈内容错误

看看同类模板

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