Next.js 14 App Router, using server actions and useFormState to handle the form
resend-transactional-emails-starter — Next.js Starter Template
By nazirabas
A contact form email starter template based on Next.js 14 App Router, Resend and Zod, including form validation, a business notification email and a sender confirmation email.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual browser screenshot from the verified demo.
All pages & views 2
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Validates with Zod and displays error messages per field
Sends email through the Resend SDK
Includes two built-in templates, a notification email and a confirmation email, with no react-email dependency
The notification email sets auto reply-to, so replies go directly to the submitter
Template rendering escapes HTML entities to handle XSS
Template Details
This is a starter template for a contact form email flow. The README states that it uses Next.js 14 App Router server actions and useFormState to handle form submission, validates with Zod and displays errors per field, and sends email through the Resend SDK. The email part includes two templates: a recipient notification sent to the business and a confirmation email sent to the form submitter. The templates are HTML/text renderers in string form and do not depend on react-email. The notification email sets auto reply-to, so replies go directly to the submitter; template rendering escapes HTML entities to handle XSS.
The project structure is listed in the README: src/app/page.tsx is the contact form using useFormState and useFormStatus, src/app/actions.ts is the submitContact server action, src/lib/schemas.ts holds the Zod validation rules, and emails/contact.tsx is the HTML/text template renderer. The README also gives extension directions, such as order confirmation, password reset, replacing with react-email components, adding attachments, or scheduling sends with Vercel Cron, but these are suggestions and the repository itself does not include the corresponding implementations.
The README does not provide information about performance, accessibility, test coverage, production deployment details, or specific framework version numbers; the preview screenshot only proves the page exists and cannot be used to infer page functionality.
Is it right for your project?
Use Cases
- Building a contact form with validation and email notifications for a website
- Scenarios that need to send email both to the business and to the form submitter
- Using it as a starting point to extend into email flows such as order confirmation or password reset
- Integrating Resend to send transactional email in a Next.js App Router project
Suitable For
- Developers using Next.js 14 App Router
- Teams that need starter code for a contact form email flow
- Projects that want to extend other email types on top of the template
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
After cloning the repository, run npm install and copy .env.example to .env.local
- 2
In .env.local, configure RESEND_API_KEY, FROM_EMAIL (a verified sender in Resend) and TO_EMAIL (the mailbox that receives inquiries)
- 3
After running npm run dev, open http://localhost:3000, submit the form, and check both inboxes
- 4
Before verifying a domain, Resend allows [email protected] as a test sender
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in the public repository; the free scope is the code of that version and does not mean external services or third-party assets are free.
Must comply with when using
- Free use, modification, commercial use and distribution of that version's code are allowed.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Demo images, fonts, icons and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments or AI may incur separate charges.
- Before running, RESEND_API_KEY, FROM_EMAIL (a verified sender in Resend) and TO_EMAIL (the mailbox that receives inquiries) must be configured in .env.local.
- A Resend API key must be obtained from https://resend.com/api-keys, which is an external service account requirement.
- FROM_EMAIL must be a sender address verified in Resend.
- Before verifying your own domain, only [email protected] can be used as a test sender.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
# add RESEND_API_KEY, FROM_EMAIL (verified sender), TO_EMAIL (inbox)
Original README
| `RESEND_API_KEY` | Get from https://resend.com/api-keys |
Original README
| `FROM_EMAIL` | Verified sender in Resend (e.g. `[email protected]`) |
Original README
https://github.com/nazirabas/resend-transactional-emails-starter/blob/main/LICENSEhttps://github.com/nazirabas/resend-transactional-emails-starter/blob/main/README.mdUntil you verify a domain, Resend allows sending from `[email protected]` for testing.
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-14. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- More documented · 85 / 100
- Technologies
- Next.js · HTML · React
- Website type
- Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2026-07-16
- Screenshot last checked
- 2026-10-16
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Review declaration: codex-user-requested-batch-review-20261017 · 2026-10-16
Inspect the recorded source material
SHA-256: a1fd2316595247f1420fff164d354120b3d39cd3a6124c4b41d8ea9b582ba1fe
2026-10-14T22:44:32.140Z
Source file / repository# Resend Transactional Emails Starter Next.js 14 + Resend + Zod, wired for a real-world contact form flow: validation, notification email to the business, confirmation email to the sender. Templates included, no `react-email` dependency required.  **Live demo:** [resend-transactional-emails-starter.vercel.app](https://resend-transactional-emails-starter.vercel.app) ## What's included - **Next.js 14** App Router with server actions and `useFormState` - **Resend** SDK for delivery - **Zod** validation with per-field error surfacing - **Two email templates** (notification + confirmation) with luxury dark-and-gold design - **Auto reply-to** — replies to the notification email go straight to the sender - **XSS-safe** HTML rendering with entity escaping in templates ## Quick start ```bash git clone https://github.com/nazirabas/resend-transactional-emails-starter my-forms cd my-forms npm install cp .env.example .env.local # add RESEND_API_KEY, FROM_EMAIL (verified sender), TO_EMAIL (inbox) npm run dev ``` Open http://localhost:3000, submit the form. Check both inboxes. ## Environment variables | Variable | Description | |---|---| | `RESEND_API_KEY` | Get from https://resend.com/api-keys | | `FROM_EMAIL` | Verified sender in Resend (e.g. `[email protected]`) | | `TO_EMAIL` | Where inbound enquiries land (your inbox) | Until you verify a domain, Resend allows sending from `[email protected]` for testing. ## Structure ``` src/app/ page.tsx # Contact form with useFormState + useFormStatus actions.ts # submitContact server action layout.tsx src/lib/ schemas.ts # Zod validation schema emails/ contact.tsx # HTML/text template renderers ``` ## Extending - **Order confirmations** — add a `renderOrderConfirmation` in `emails/order.tsx`, call from a Stripe webhook route - **Password reset** — same pattern, add a token in the URL - **React Email** — swap the string templates for `react-email` components if you want richer previews - **Attachments** — pass `attachments: [{ filename, content }]` to `resend.emails.send` - **Scheduled sends** — pair with Vercel Cron for reminder emails ## License MIT. --- Built by [Nazir Abbas](https://github.com/nazirabas). Web Developer and SEO Specialist for luxury brands.
Explore similar templates
Compare previews and descriptions within the same stack and category.

Next.js SaaS Starter
The official Next.js SaaS starter template, integrating email/password authentication, Stripe Checkout subscriptions, a dashboard with user/team CRUD, basic Owner/Member RBAC, and activity logging.
Next.js · SaaS

Next.js Commerce
Vercel's officially maintained Next.js App Router ecommerce starter with deep Shopify integration, offering a complete product catalog, cart, and checkout flow. Core logic is modular for swapping backends, and community provider versions exist for BigCommerce, Medusa, and Saleor.
Next.js · E-commerce

Next-js-Boilerplate
A developer-first Next.js 16 starter with Tailwind CSS 4 and TypeScript, supporting both App Router and Page Router.
Next.js · Starter

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

next-forge
next-forge is a Turborepo-based Next.js template maintained by Vercel, positioned as a starting point for SaaS products.
Next.js · Starter

SaaS-Boilerplate
SaaS-Boilerplate is an open-source SaaS starter template built with Next.js App Router, React 19, TypeScript, Tailwind CSS, and Shadcn UI.
Next.js · SaaS
