Skip to content
All projects

Case study

Envelope

Typed email templates you preview in the browser and test like components

Envelope lets you write transactional emails as typed components, preview every state in the browser and snapshot test the HTML that actually reaches inboxes.

The problem

Our transactional emails lived in a folder of HTML strings with handlebars. Nobody knew which variables each one needed, and the only way to see a change was to send yourself a real email.

What I built

Envelope templates are components with typed props, so a missing variable is a type error instead of a blank space in a customer’s inbox. A local preview server renders every template with fixtures for each state, and a snapshot test fails if the final HTML changes unexpectedly.

Why it is archived

Two larger projects now do the same thing well, and I would rather send them pull requests than maintain a third option. The repository stays up as a reference.