Resend Setup (Email)
NextGenKit uses Resend for transactional emails with React Email templates.
1. Get Your API Key
- Sign up at resend.com
- Go to API Keys → Create a new key
- Add it to
.env.localasRESEND_API_KEY
2. Verify Your Domain
For production, verify your sending domain in Resend Dashboard → Domains. Set EMAIL_FROM to an address on that domain.
3. Email Templates
Templates live in the emails/ directory using React Email components:
emails/welcome.tsx— Sent on user signupemails/subscription-confirmed.tsx— After successful paymentemails/payment-failed.tsx— On failed invoice
4. Preview Templates
pnpm email:dev
Opens a browser preview at localhost:3001 where you can see all templates.
5. Sending Emails
import { resend } from "@/lib/email"
import { WelcomeEmail } from "@/emails/welcome"
await resend.emails.send({
from: env.EMAIL_FROM,
to: user.email,
subject: "Welcome to NextGenKit",
react: WelcomeEmail({ name: user.name }),
})