Skip to content
EtherCorps
Work Doota Mail Case study 01
Doota Mail 2025 – present Product · Platform · Operations

A self-hosted email platform, entirely on Cloudflare.

Doota is the studio's own product: an open-source, self-hosted email platform that renders mail as a chat interface — web client and developer sending API from one deploy, on any Cloudflare account. I designed and built it from first commit to production release, and it's the clearest evidence of how I build stateful systems on the edge.

RoleArchitect & sole engineer
LicenseOpen source
Runs onAny Cloudflare account
StatusIn production
Source github.com/etherCorps/doota Live doota.dev
01

The problem

Email is heavy, unbounded, and stubbornly stateful — and Cloudflare's edge is optimised for the opposite. No transactions in D1, a 2 MB row cap, a 10 GB database ceiling, and an inbound handler that must never drop a message. Building a real mail platform there meant treating each of those limits as a design input rather than a blocker: raw MIME as canonical truth in R2, an ingest path that acks before it parses, unique constraints as concurrency control, and encryption that still leaves search working.

02

What I built

One deploy, three products
The mail client Threads rendered as chat, quoted history stripped — SvelteKit on the front, streaming from the edge.
The sending API A developer API for transactional mail from the same deploy, so a team gets client and infrastructure at once.
The platform A multi-Worker architecture across D1, R2, KV, Queues, Durable Objects and Email Routing, deployed as code.
03

How it works

Inbound path
01
Receive
Email Routing invokes a Worker; the raw message streams straight into R2.
02
Ack
A pointer is queued and the message accepted — durable before any processing.
03
Derive
A Queue consumer parses, threads, strips quotes, encrypts, and indexes — idempotently.
04
Search
Blind-token full-text search over encrypted content: the index never holds a readable word.
05
Deploy
A single infrastructure-as-code command (Alchemy), run in CI, stands the whole thing up.
04

Results

Public and checkable
23 / 23
CalDAV/CardDAV conformance on Workers
AES-256
GCM zero-access encryption at rest
6
Cloudflare primitives in one deploy
1 cmd
IaC deploy, runs in CI
05

Running it

Doota is live at doota.dev and maintained in the open — the repo, the docs, and the design decisions are all public, including a long write-up of the eight places the platform pushed back. Calendar and contacts are next, on the CalDAV/CardDAV layer already validated against the protocol suite. It's the reference implementation for how I'd build your system too.

Related

Our services
EtherCorps mascot

Get in touch

I take on a small number of projects at a time.

Tell me what you're building and where it hurts. I'll say honestly whether I'm the right person for it.

Get in touch