Email Architecture

Document: 21-email-architecture.md
Version: 1.0.0


Purpose

This document defines the email architecture and communication standards used across all Rundown projects.

Email is a core communication channel for many applications. It is responsible for delivering transactional and operational messages to users, clients, and administrators in a reliable and maintainable manner.

This document establishes how email functionality should be designed, integrated, and maintained.


Email Philosophy

Email should be treated as an infrastructure service rather than application logic.

The application determines what message should be sent.

The email provider determines how that message is delivered.

This separation reduces coupling and allows providers to be replaced without affecting business logic.


Standard Email Provider

Rundown standardizes on:

Resend

Reasons include:

Alternative providers may be introduced only when project requirements justify them.


Responsibilities

The email layer owns:


Non-Responsibilities

The email layer should not own:

Email communicates outcomes; it should not decide application behaviour.


Email Categories

Transactional Emails

Examples:

Transactional emails are triggered by user actions or business events.


Operational Emails

Examples:

Operational emails are intended for administrators or internal users.


Marketing Emails

Examples:

Marketing emails should remain separate from transactional communication and comply with applicable consent requirements.


Email Templates

All email templates should be:

Rundown standardizes on:

React Email

Templates should remain independent of provider-specific implementation details.


Triggering Emails

Emails should be triggered by business events.

Examples:

Business logic determines when an email should be sent.

The email layer is responsible only for delivery.


Queueing

Projects with high email volume should introduce background processing or queues.

Examples:

Small projects may send emails synchronously when appropriate.


Delivery Reliability

Applications should:

Email delivery should never interrupt critical business workflows unless the email itself is essential to the workflow.


Security

Email systems should:

Environment variables should be used for all provider credentials.


Monitoring

Monitor:

Monitoring helps identify delivery issues before they affect users.


Engineering Decision

Email Provider Strategy

Status: Accepted

Decision

Rundown standardizes on Resend with React Email for all production email functionality.

Reasoning

This combination provides:

Business logic remains provider-independent, allowing future migration if required.


Email Checklist

Before implementing email functionality, verify:


Summary

The email architecture provides reliable communication between the application and its users.

By separating business events from message delivery, Rundown applications remain modular, maintainable, and flexible while ensuring a consistent communication experience.