Next.jsReact电商作品集

forma-commerce — Next.js 电商模板

作者 SakuraUltra

FORMA 是一个基于 Next.js、React 与 TypeScript 的精品电商店面模板,包含商品筛选、持久购物车、访客演示结账与订单跟踪,所有数据保存在浏览器本地,无需 API 密钥或数据库。

看看你的网站会是什么样

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

1 个预览视图
作者提供的预览
作者提供的预览

来自项目 README 的原始预览。

目前有 1 张原始预览,可打开完整图片查看设计细节。

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

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

值得关注的模板亮点

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

01

首页、搜索、筛选列表、促销页、12 个商品详情页与站点地图共用同一份商品数据。

02

分类、颜色、价格与排序反映在 URL 中,可直接分享 /products?sort=newest 这类链接。

03

购物车按变体保存数量并在刷新后保留,包含整数校验、不可用商品处理与按变体库存上限。

04

访客演示结账会按商品目录重新计算价格,处理空购物车与存储错误反馈。

05

订单以快照形式保存在浏览器中,包含唯一 ID、商品与价格记录、订单历史与模拟配送步骤。

06

品牌信息、货币、运费阈值与规范 URL 集中在配置文件中,商品数据集中在 catalog 文件中。

模板详细介绍

FORMA 是仓库 SakuraUltra/forma-commerce 中的示例品牌,定位为作品集项目与可复用的 Next.js、React、TypeScript 电商模板。它用暖象牙色、深橄榄绿和编辑式布局呈现一套完整的访客购物流程,无需配置 API 密钥或数据库即可在本地运行。

模板覆盖从浏览到保存演示订单的路径:首页、搜索、带筛选的商品列表、促销商品、12 个商品详情页和站点地图共用同一份商品数据;分类、颜色、价格与排序会反映在 URL 中,可直接分享链接。购物车按变体保存数量并在刷新后保留,结账为访客演示流程,订单会以快照形式保存在浏览器存储中,并支持模拟配送步骤。

需要明确的是,这是一个前端电商演示,不是生产交易系统。它不接收支付、不注册账户、不发送邮件、不发货;购物车与订单数据存放在访客浏览器中,浏览器存储可被编辑或清除,不构成认证或安全边界。库存限制仅作用于单个购物车,下单不会预留共享库存;运费为模拟,税费不计算。仓库中的 prisma/schema.prisma 仅作为原始关系设计的参考,Prisma、Stripe 与认证并未接入应用。示例图片来自 Unsplash,不随代码的 MIT 许可提供。

Next.jsReact电商作品集

适合你的项目吗?

适用场景

  • 在本地运行并体验从浏览、筛选、加购到保存演示订单的完整访客购物流程。
  • 作为 Next.js、React 与 TypeScript 电商店面的学习或作品集参考项目。
  • 替换商品目录、品牌配置与视觉令牌,搭建自己的前端电商演示。
  • 研究购物车持久化、价格重算、库存边界与订单快照等前端状态处理方式。

适合人群

  • 希望参考 Next.js App Router 电商店面结构的开发者。
  • 需要可本地运行、无需后端即可演示购物流程的作品集作者。
  • 计划在前端演示基础上自行接入服务端校验与支付的前端团队。

上手与定制指南

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

  1. 1

    需要 Node.js 22.22 及以上版本,推荐使用 Node 22 LTS。

  2. 2

    克隆仓库后执行 npm ci 安装依赖,再用 npm run dev 启动,默认访问 localhost:3000。

  3. 3

    无需 .env、数据库、种子命令、支付密钥或账户;安装依赖、构建时加载 Google 字体以及远程商品图片需要联网。

  4. 4

    结账时请使用提供的虚构地址,不要填写真实信息。

  5. 5

    部署前需运行 npm run build,并将 NEXT_PUBLIC_SITE_URL 设置为实际公开地址。

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
  • 该项目仅为演示店面,不处理支付、不注册账户、不发送邮件、不发货;购物车与订单数据仅存于访客浏览器,结账须使用虚构地址。
  • 这是前端电商演示而非生产交易系统;浏览器存储可被编辑或清除,不构成认证或安全边界;库存限制仅按购物车计算,下单不预留共享库存;运费为模拟,税费不计算。
  • prisma/schema.prisma 仅作为原始关系设计的参考,Prisma、Stripe 与认证均未接入应用,不能直接用于生产交易。
  • 示例图片来自 Unsplash,不随应用代码许可提供,商用前需自行替换并确认图片授权。
  • 若要将模板作为自有商业店面展示,需先替换示例图片与品牌信息。
  • 安装依赖、构建时加载 Google 字体以及显示远程商品图片均需要联网。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

This is a **demo storefront**. It does not accept payments, register accounts, send emails or ship products. Cart and order data live in the visitor's browser. Use the fictional address provided at checkout.

README 原文

This is a frontend commerce demo, not a production transaction system. Browser storage can be edited or cleared and is not an authentication or security boundary. Inventory limits apply per cart; placing orders does not reserve shared stock. Shipping is simulated and taxes are not calculated.

README 原文

`prisma/schema.prisma` preserves the original relational design **as a reference only**. Prisma, Stripe and authentication are not connected to the app.

README 原文

Sample imagery is served from Unsplash; photographs are not included under the application's code license.

README 原文

Replace imagery and branding before presenting the template as your own commercial store.

README 原文

Internet access is needed for dependency installation, Google fonts at build time and remote product photographs.

README 原文
https://github.com/SakuraUltra/forma-commerce/blob/main/LICENSEhttps://github.com/SakuraUltra/forma-commerce/blob/main/README.md

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

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料一般 · 73 / 100
技术栈
Next.js · React
网站类型
电商 · 作品集
这个分数如何计算

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

这个项目需要核对什么

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

目前没有记录演示链接。请依据仓库说明在本地评估;仅凭截图无法确认交互行为。

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

查看具体选型方法 →

介绍的制作与核对状态

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

审核声明: [email protected] · 2026-10-09

查看当时使用的来源资料

SHA-256: 095680948b56889ac66182cf71cb8693668183ddd0cf1a0bf8c88be409471bcd

2026-10-09T01:24:04.215Z

来源文件 / 仓库
# FORMA — Next.js Ecommerce Template

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Storefront checks](https://github.com/SakuraUltra/forma-commerce/actions/workflows/storefront-checks.yml/badge.svg?branch=main)](https://github.com/SakuraUltra/forma-commerce/actions/workflows/storefront-checks.yml)

**A boutique ecommerce storefront, from first browse to saved demo order.**

FORMA is the sample brand inside **forma-commerce**: a portfolio project and reusable **Next.js, React and TypeScript** template. Warm ivory, deep olive and an editorial layout frame a complete guest shopping journey—no API keys or database setup required.

[Run locally](#quick-start) · [Project case study](docs/showcase.md) · [v0.1.0 release](https://github.com/SakuraUltra/forma-commerce/releases/tag/v0.1.0) · [中文说明](docs/README.zh-CN.md)

> This is a **demo storefront**. It does not accept payments, register accounts, send emails or ship products. Cart and order data live in the visitor's browser. Use the fictional address provided at checkout.

## Preview

[![FORMA storefront preview: editorial home, collection, product details and saved demo order](docs/media/storefront-preview.gif)](https://github.com/SakuraUltra/forma-commerce/releases/tag/v0.1.0)

[Watch the MP4 walkthrough](docs/media/storefront-walkthrough.mp4) · [Explore the design and engineering decisions](docs/showcase.md)

The GIF and video are montages of captured screens from the working interface, not real-time screen recordings. Run the project locally to try the interactions.

[Download the offline showcase kit](https://github.com/SakuraUltra/forma-commerce/releases/download/v0.1.0/forma-v0.1.0-showcase.zip): extract the ZIP and open `index.html` for a static presentation with images and video. Interactive shopping requires [running the project locally](#quick-start).

<details>
<summary>View desktop, mobile and order screenshots</summary>

![FORMA desktop storefront: warm ivory, olive accents and editorial product photography](docs/media/desktop-home.jpg)

| Mobile storefront                                                                  | Saved demo order                                                                                                |
| ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| <img src="docs/media/mobile-home.jpg" alt="FORMA mobile storefront" width="260" /> | <img src="docs/media/demo-order.jpg" alt="A saved FORMA demo order with item and amount details" width="640" /> |

</details>

## Quick start

Use Node.js **22.22+** (Node 22 LTS recommended).

```bash
git clone --branch v0.1.0 https://github.com/SakuraUltra/forma-commerce.git
cd forma-commerce
npm ci
npm run dev
```

This checks out the **v0.1.0** release. Omit `--branch v0.1.0` to work with the latest `main` branch.

Open [localhost:3000](http://localhost:3000). No `.env`, database, seed command, payment key or account is required. Internet access is needed for dependency installation, Google fonts at build time and remote product photographs.

## Try the complete journey

1. Open **The collection**, filter by category/colour/price, or search with **⌘K / Ctrl+K**.
2. Choose a product colour and size. Unavailable variants cannot be added.
3. Open the cart, adjust quantities and continue to checkout.
4. Keep the example shipping address and select **Place demo order**. There is no card form.
5. View the saved order, refresh the page, then open **Explore demo delivery**.
6. Advance the simulated delivery steps. The orders page keeps your history and lets you clear it.

## Features

- **One catalog, everywhere:** home, search, filtered listings, sale items, all 12 product pages and sitemap share one data source.
- **Shareable discovery:** category, colour, price and sorting are reflected in the URL; direct links such as `/products?sort=newest` preserve the **Newest** sort order.
- **Persistent cart:** variant quantities survive reloads; integer validation, unavailable-product handling and per-variant stock limits.
- **Guest checkout:** catalog-based price recalculation, consistent shipping thresholds, empty-cart protection and useful storage-error feedback.
- **Saved demo orders:** unique IDs, item and price snapshots, order history, missing-order states and interactive simulated delivery.
- **Boutique visual identity:** an editorial home page, warm neutral surfaces, olive accents and a responsive layout with dark/light themes.
- **Accessible interactions:** labelled controls, keyboard search, a skip link, mobile navigation and filters.
- **Configurable branding:** store name, description, currency, shipping and canonical URL in one file.
- **Validation:** domain and component tests plus lint, TypeScript and production build checks; GitHub Actions configuration lives alongside the code.

## Make it your own

| Change                                                               | File                                        |
| -------------------------------------------------------------------- | ------------------------------------------- |
| Store name, currency, locale, shipping threshold and repository link | `src/lib/store-config.ts`                   |
| Products, images, categories, colours, prices and sample stock       | `src/lib/catalog.ts`                        |
| Home page copy and sections                                          | `src/components/home/`                      |
| Theme and visual tokens                                              | `src/app/globals.css`                       |
| Allowed external image hosts                                         | `next.config.ts`                            |
| Public canonical URL                                                 | `NEXT_PUBLIC_SITE_URL` (see `.env.example`) |

All monetary values are **integer cents**. The initial catalog is priced in USD. Changing `currency` changes presentation, **not exchange rates**; update catalog prices, price-filter thresholds and shipping amounts for a different market. Product photos illustrate the sample catalog and do not change when selecting a colour.

## Development

```bash
npm run lint
npm run test:run
npm run build
npm run start
```

`npm run test` starts watch mode. `npm run typecheck` performs a separate type check (the production build also checks types). The [Storefront checks workflow](.github/workflows/storefront-checks.yml) installs locked dependencies, lints, tests and builds on pull requests and pushes to `main`. It can also be run manually from GitHub Actions. It uses a read-only repository token and does not deploy the site. Check the [Actions page](https://github.com/SakuraUltra/forma-commerce/actions/workflows/storefront-checks.yml) for the status of a particular commit.

Tests cover stock and quantity limits, duplicate and stale cart data, price recalculation, shipping boundaries, unique order IDs, persistence, malformed saved orders, failed storage, missing orders and the guest checkout UI.

## Architecture and boundaries

Next.js App Router · React · TypeScript · Tailwind CSS · Base UI · Zustand · Vitest

```text
Shared catalog → browsing / search / product detail
                          ↓
                persistent variant cart
                          ↓
           validate catalog prices and quantities
                          ↓
         order snapshot saved to browser storage
                          ↓
              order history / demo delivery
```

This is a frontend commerce demo, not a production transaction system. Browser storage can be edited or cleared and is not an authentication or security boundary. Inventory limits apply per cart; placing orders does not reserve shared stock. Shipping is simulated and taxes are not calculated.

`prisma/schema.prisma` preserves the original relational design **as a reference only**. Prisma, Stripe and authentication are not connected to the app. The unused SDK wrappers and outdated database seed were removed from the default installation; adding production commerce requires server-side ownership and validation. See the [extension guide](docs/architecture.md).

## Optional deployment

The project can be explored through this README, the release assets and a local installation. To host your own copy, run `npm run build` and deploy to a host supporting Next.js. Set `NEXT_PUBLIC_SITE_URL` to the actual public address before the production build. Full instructions and post-deployment checks are in [docs/deployment.md](docs/deployment.md).

## Images and licensing

Sample imagery is served from Unsplash; photographs are not included under the application's code license. Updated images: [candle by Jack Baxter](https://unsplash.com/photos/a-lit-candle-in-a-glass-jar-on-a-table-fCe0oFccURY), [tote by Rahul Bhogal](https://unsplash.com/photos/white-tote-bag-lihCTIOP28U), and [watch by Lucas Kepner](https://unsplash.com/photos/a-watch-sitting-on-top-of-a-black-table-KqmdTLEji08). Replace imagery and branding before presenting the template as your own commercial store.

Application code is available under the [MIT License](LICENSE).
反馈内容错误

看看同类模板

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