Version 3 of the kit: - Radix UI replaced with Base UI (using the Shadcn UI patterns) - next-intl replaces react-i18next - enhanceAction deprecated; usage moved to next-safe-action - main layout now wrapped with [locale] path segment - Teams only mode - Layout updates - Zod v4 - Next.js 16.2 - Typescript 6 - All other dependencies updated - Removed deprecated Edge CSRF - Dynamic Github Action runner
1.0 KiB
1.0 KiB
Email Templates Instructions
This package owns transactional email templates and renderers using React Email.
Non-negotiables
- New email must be added to
src/registry.ts(EMAIL_TEMPLATE_RENDERERS) or dynamic inclusion/discovery will miss it. - New email renderer must be exported from
src/index.ts. - Renderer contract: async function returning
{ html, subject }. - i18n namespace must match locale filename in
src/locales/<lang>/<namespace>.json. - Reuse shared primitives in
src/components/*for layout/style consistency. - Include one clear CTA and a plain URL fallback in body copy.
- Keep subject/body concise, action-first, non-spammy.
When adding a new email
- Add template in
src/emails/*.email.tsx. - Add locale file in
src/locales/en/*-email.jsonif template uses i18n. - Export template renderer from
src/index.ts. - Add renderer to
src/registry.ts(EMAIL_TEMPLATE_RENDERERS).
src/registry.ts is required for dynamic inclusion/discovery. If not added there, dynamic template listing/rendering
will miss it.