Email & Notifications
What emails the site sends, and how to customize them.
DirectoryKit sends transactional emails via Resend. All templates are React components (from @react-email/render) — edit them in your IDE with live preview.
Emails the site sends
| Event | Recipient | Trigger |
|---|---|---|
| Welcome | New signup | User signs up |
| Submission received | Submitter | User submits a project |
| Submission approved | Submitter | Admin clicks Approve |
| Submission rejected | Submitter | Admin clicks Reject |
| New submission | Admin | A project is submitted |
| Payment receipt | Buyer | Stripe checkout.session.completed |
| Account notification | User | Cron-scheduled reminders |
| Newsletter subscribed | New subscriber | /api/newsletter/subscribe |
Previewing a template

Where templates live
lib/email.ts builds each email. Style tweaks (colors, logo, signature) happen there or through siteConfig / emailConfig.
External webhooks (optional)
On top of email, DirectoryKit can fire outbound webhooks to Discord/Slack when events happen. Controlled by the webhooksExternal flag.
Configure in the admin panel → Settings → Integrations (stored in DB). Events currently emitted:
project.submittedproject.approvedproject.rejecteduser.registered
In code:
import { webhookEvents } from '@/lib/webhooks';
await webhookEvents.projectSubmitted(project);Configuration
See Email Config for the full Resend setup (API key, domain verification, dev redirect).
Dev-safety: redirecting emails locally
When NODE_ENV=development and RESEND_DEV_REDIRECT=true (default), every email is redirected to RESEND_DEV_REDIRECT_TO. This prevents accidents where testing sends real emails to users.
Set it once in .env.local:
RESEND_DEV_REDIRECT=true
RESEND_DEV_REDIRECT_TO=you@example.comWith AI
Rewrite the welcome email template in lib/email.ts for my brand.
Brand: {brand name} Niche: {what kind of directory — e.g. "AI writing tools"} Tone: {friendly / professional / playful / editorial} CTA goal: {what do you want the reader to do first? — e.g. "submit their first tool", "follow on Twitter", "verify email"}
Keep:
- The existing send/transport logic
getFromAddress()helper (don't replace)- Use siteConfig from @/config/site.config for brand name and contact email — don't hardcode
Produce a plain-text and HTML version. Keep it under 100 words. Add one clear CTA button.