四套订单生命周期邮件模板:创建、确认、发货、送达
resend-ecommerce — Next.js 电商模板
作者 imnotannamaria
基于 React Email 与 Resend 的开源电商交易邮件模板集,覆盖订单创建、确认、发货、送达四个环节,可在 Next.js 中预览、复制 HTML 并发送测试邮件。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
支持调整强调色与边框圆角,并可开关配送日期、支付信息、物流追踪等区块
表单填写时实时预览邮件效果
可服务端渲染后复制原始 HTML,或通过 Resend API 发送测试邮件
使用 React Email 编写,配合 Next.js App Router 与 TypeScript
包含 Vitest 测试、Biome 检查与 Husky 提交前钩子
模板详细介绍
这个仓库提供一套面向电商订单流程的交易邮件模板,使用 React Email 编写,并通过 Resend 发送。模板共四个,分别对应订单创建(/orders/created)、订单确认(/orders/confirmed)、订单发货(/orders/shipped)和订单送达(/orders/delivered),覆盖从下单到签收的主要节点。每个模板都支持调整强调色(预设色板或自定义十六进制值)、边框圆角(直角、中等、大圆角),并可开关配送日期、支付信息、物流追踪、署名和社交链接等区块。页面提供实时预览,填写表单时即时看到变化;还可以在服务端渲染后复制原始 HTML,或通过 Resend API 发送一封测试邮件。项目使用 Next.js App Router,表单校验基于 React Hook Form 与 Zod,API 路由使用 Hono,UI 组件来自 Radix UI Themes,图标使用 Lucide React,样式使用 Tailwind CSS,并配有 Vitest 测试、Biome 检查与格式化,以及 Husky 与 lint-staged 的提交前钩子。演示站点运行在作者自己的 Resend API Key 上,因此“发送”操作只能投递到作者邮箱;要发送到其他收件箱,需要克隆仓库并配置自己的 RESEND_API_KEY。
适合你的项目吗?
适用场景
- 为电商项目快速搭建订单通知邮件的起始模板
- 在本地预览并调整邮件样式,再复制 HTML 用于其他发送渠道
- 通过 Resend API 发送测试邮件,验证模板在实际收件箱中的显示效果
- 作为 React Email 与 Resend 集成的示例项目参考
适合人群
- 需要订单交易邮件模板的电商开发者
- 使用 Next.js 与 React Email 技术栈的团队
- 希望自定义邮件配色、圆角与内容区块的前端开发者
- 想了解 Resend 发送流程与 React Email 渲染方式的开发者
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
克隆仓库后运行 npm install 安装依赖
- 2
在 .env.local 中配置 RESEND_API_KEY,否则无法发送测试邮件
- 3
运行 npm run dev 启动开发服务器进行预览
- 4
演示站点的发送功能仅能投递到作者邮箱,需使用自己的 API Key 才能发送到其他地址
- 5
代码采用 MIT 许可,但演示图片、字体、图标等第三方素材需按各自许可核对
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示站点的“发送”功能使用作者本人的 Resend API Key,只能投递到作者邮箱;如需发送到其他收件箱,必须克隆仓库并配置自己的 RESEND_API_KEY。
- 发送邮件依赖外部服务 Resend,需自行注册并配置 RESEND_API_KEY 环境变量,否则无法使用发送功能。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
This live demo runs on my Resend API key — the **Send** action can only deliver to my address. Clone the repo and set your own `RESEND_API_KEY` to send to any inbox.
README 原文
https://github.com/imnotannamaria/resend-ecommerce/blob/main/LICENSEhttps://github.com/imnotannamaria/resend-ecommerce/blob/main/README.md# 3. Add your Resend API key to .env.local RESEND_API_KEY=re_xxxxxxxxx
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-01。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 85 / 100
- 技术栈
- Next.js · React
- 网站类型
- 电商
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-04-20
- 截图检查日期
- 2026-10-01
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 0f4ea21bb658d09969c3e77af92f0084aa4dbed7ea0c5e322572f0484225f380
2026-10-01T01:34:32.159Z
来源文件 / 仓库# Resend Ecommerce Open-source transactional email templates for e-commerce, built with [React Email](https://react.email) and [Resend](https://resend.com). Customize, preview, and send in minutes. ## Email templates Four templates covering the full order lifecycle: | Template | Route | Description | |---|---|---| | Order Created | `/orders/created` | Sent immediately after purchase. Confirms order details, product summary, and estimated delivery. | | Order Confirmed | `/orders/confirmed` | Sent when the merchant confirms the order is being prepared and payment is verified. | | Order Shipped | `/orders/shipped` | Dispatched when the package leaves the warehouse. Includes tracking information. | | Order Delivered | `/orders/delivered` | Final notification confirming the package has been delivered to the customer. | Each template supports: - **Accent color** — preset palette or custom hex - **Border radius** — sharp, medium, or large - **Toggleable sections** — delivery date, payment details, tracking info, sign-off, social links - **Live preview** — see changes in real time as you fill the form - **Copy HTML** — renders server-side and copies raw HTML to clipboard - **Send** — sends a live test email via the Resend API ## Getting started ```bash # 1. Clone the repo git clone https://github.com/imnotannamaria/resend-ecommerce.git # 2. Install dependencies npm install # 3. Add your Resend API key to .env.local RESEND_API_KEY=re_xxxxxxxxx # 4. Start the dev server npm run dev ``` ## Tech stack - [Next.js 15](https://nextjs.org) — App Router - [React 19](https://react.dev) — UI library - [TypeScript](https://www.typescriptlang.org) — Type safety - [React Email](https://react.email) — Email rendering - [Resend](https://resend.com) — Email delivery - [Radix UI Themes](https://www.radix-ui.com/themes) — UI components - [Lucide React](https://lucide.dev) — Icons - [Geist](https://vercel.com/font) — Font - [Tailwind CSS v4](https://tailwindcss.com) — Styling - [React Hook Form](https://react-hook-form.com) + [Zod](https://zod.dev) — Form validation - [Hono](https://hono.dev) — API routes - [Sonner](https://sonner.emilkowal.ski) — Toast notifications - [Vitest](https://vitest.dev) — Tests - [Biome](https://biomejs.dev) — Linting and formatting - [Husky](https://typicode.github.io/husky) + [lint-staged](https://github.com/lint-staged/lint-staged) — Pre-commit hooks ## Development ```bash npm run dev # Start dev server npm run test # Run tests in watch mode npm run test:run # Run tests once npm run lint # Lint with Biome npm run format # Format with Biome npm run check # Lint + format ``` ## Project structure ``` app/ ├── emails/ # Email templates (order-created, confirmed, shipped, delivered) ├── orders/ # Preview pages for each email template ├── components/ # Shared UI components (form fields, design panel, etc.) ├── api/ # API routes for rendering HTML and sending emails └── __tests__/ # Unit and integration tests ``` ## Pre-commit hooks Husky runs on every commit: 1. **lint-staged** — Biome check on staged files 2. **vitest run** — full test suite ## Demo > This live demo runs on my Resend API key — the **Send** action can only deliver to my address. Clone the repo and set your own `RESEND_API_KEY` to send to any inbox. --- Developed by [Anna Maria](https://github.com/imnotannamaria)
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

Next.js Commerce
Next.js Commerce 是 Vercel 团队维护的电商启动模板,基于 Next.js App Router 构建,采用服务端渲染、React Server Components、Server Actions …
Next.js · 电商

commerceplate
Commerceplate 是一个基于 Next.js 16、Tailwind CSS 4 和 TypeScript 的 Shopify 电商启动模板,由 Zeon Studio 开发并免费开源。
Next.js · 电商

ecommerce-template
An ecommerce template built with NextJS 16, TypeScript and TailwindCSS
Next.js · 电商

commercelayer-sanity-template
A multi-country ecommerce template built with Commerce Layer, Next.js, Sanity studio, and deployed to Netlify.
Next.js · 电商

boundless-nextjs-ecommerce-template
Next.js E-Commerce template. Strong TypeScript, Ready to use, For high-performance e-commerce websites.
Next.js · 电商

mobile-medusa
📱 Combine your Medusa.js e-commerce backend and/or web storefront with a Expo mobile app that matches Medusa …
Next.js · 电商
