Email systems, Mamo, 2026

Mamo’s Email Studio, an email builder on React Email

Mamo’s transactional emails, the receipts, verification codes and card and dispute notices, were built one at a time in Stripo, and nothing kept them consistent. In 2026 I moved them onto an email design system built on React Email: 16 components, and an editor where a teammate assembles an email from those components and the export is safe for real inboxes.

Stack
React Email, TipTap, TypeScript, Bun, Cloud Run, Firestore, Claude Code
My part
Led it end to end, from the architecture and the design system to every product call, and built it with Claude Code; Mamo’s platform team set up the deploy and access

Why not keep Stripo

Stripo is a visual editor, and every email in it was its own one-off: styles copied from the last template and changed by hand. 89 templates had grown that way. There was no way to change a button once and have every email follow, and what Stripo showed wasn’t always what arrived. Its export carried its own fallback fonts, so some clients rendered our emails in Roboto.

The goal was an email design system in code, with an editor on top that teammates who don’t write code could use without breaking the design.

Wrap the editor, don’t write one

A rich-text editor written from scratch is months of work. React Email 6 shipped @react-email/editor, Resend’s own editor built on TipTap and ProseMirror, and it serializes straight to React Email components. So I wrapped it: each Mamo component became an editor block, from the header and cards to key-attribute lists, tables, buttons and footers, with closed choices instead of free styling. A text block offers the design system’s type styles and colors, not a font picker. Spacing is steppers, and blocks whose padding belongs to the design system lock it.

What the canvas shows and what gets exported are two different things, and only the export reaches an inbox: table layouts, inline styles, no flexbox, nothing that depends on hover.

Key-Attribute List Item, exported
<table role="presentation" width="100%">  <tr>    <td style="font-family:Manrope,Arial;      font-size:14px;color:#5e6371">      Amount    </td>    <td align="right"      style="font-family:Manrope,Arial;      font-size:14px;color:#0b0d12">      AED 250.00    </td>  </tr></table>
Pick a block to see what it exports. Simplified from the real components, with placeholder text.
The Email Studio editor with a key-attribute list item selected inside a card, and the inspector showing text style, color, padding and margin controls
The editor, with a key-attribute list item selected inside a card. The inspector offers the design system’s choices only.

Built with Claude Code

I built the studio with Claude Code, and the split was clear. I did the thinking: the architecture, the design system’s rules, what to build next and what good looked like, and I kept suggesting the next idea. Claude Code did most of the implementing, and it was quick to catch and fix bugs once I’d pointed at where to look.

Every bug in the next section started the same way: I sent a real email to a real inbox, or pasted it into a real tool, and saw something wrong. Tracing it to the cause was work we did together.

Four bugs only a real inbox showed

The editor’s preview and Apple Mail looked right through all four of these. I ranked email clients by where Mamo’s email actually lands, from a week of SendGrid delivery data, and tested on real devices in that order. Gmail came first by a wide margin, and two of the four bugs were Gmail’s. Each fix became a standing rule for the project, so the next component can’t bring the bug back.

What happened: On the Gmail app, the promo block stayed in two squeezed columns on a phone and cards lost their mobile padding.

Why: Gmail, on every platform, strips any <style> element that isn’t inside <head>. Each component had rendered its own.

The fix: Components export their responsive CSS as strings, and the Shell puts all of them in one <style> in its <head>.

shell.tsx
<Head>  <style>{[    SHELL_MOBILE_PADDING_CSS,    CARD_RESPONSIVE_CSS,    MARKETING_UPSELL_RESPONSIVE_CSS,  ].join('\n')}</style></Head>
Pick a bug, then flip between before and after. The phone is a drawing; the fixes are the shape of the real code.

From my laptop to the team

The builder started on my machine. To let anyone at Mamo work on emails, it moved to Cloud Run with Firestore, behind Google sign-in through IAP, with access given through a Google group. Templates live only in Firestore, and every save is a version with who, when and the full content, which gives history, restore, a trash and an activity log. The library got live previews, folders and a ranked word search, so “card acti” finds “Card is activated”.

Then it was slow. I compressed the build, split the editor into its own chunk, kept the library in memory, and prefetched an email when you hover or focus it. One fix nearly shipped a crash: loading the editor lazily behind Suspense made React reconnect its effects mid-load, TipTap destroyed its instance, and opening an email went blank. The fix was to render the editor only once its code has loaded.

Load times before and after the performance pass
MomentBeforeAfter
Open the libraryA 2.9 MB script, sent uncompressed, then 1.7 s for the listVisible in about 0.4 s
Open an emailFetched fresh every timeAbout 5 ms after the click, prefetched on hover
Back to the libraryEverything refetchedAbout 30 ms, kept in memory
Before, from the hosted studio; after, measured on a local production build.
The Email Studio library: a folder, then a grid of emails, each with a live preview, its name, subject line, editor and last edit
The library, with live previews of each email, folders, search, sorting and a list view.

What’s next

The studio doesn’t send email yet. The plan I shared with engineering: “eventually the emails created would connect to Resend and we’d send emails from the codebase instead of using SendGrid.” Before that, image uploads straight to Mamo’s asset CDN, and rendering the library’s previews on the server, so the first visit after a release is as fast as the rest.