Angel Campa
Colour theme

WorkShared infrastructure, then teardown

Ventora Sequencer

Ran multi-day email sequences on behalf of other products, sending real mail through one Durable Object per enrollment that scheduled its own next step.

Ran on
Cloudflare Workers
Ran
May 2026 to July 2026
Domain
Multi-tenant email sequencing infrastructure
Source
email-sequencing-saas-sequencer-snapshot

Built with

  • Cloudflare Workers
  • Hono
  • Durable Objects
  • D1
  • Drizzle
  • Queues
  • Cloudflare Access
  • React 19
  • Resend

Hosted services

  • D1
  • KV
  • R2
  • Queues
  • Durable Objects
  • Analytics Engine
  • Cron Triggers
  • Cloudflare Access
The Deliverability page of the operator dashboard: a table of per-domain daily sending health, with columns for sent, delivered, bounce rate, complaint rate and opens, an inline SVG sparkline per row, and complaint rates above the threshold highlighted in red.
Domain health, one row per domain per day, captured against local seed data used throughout every screenshot here.

The decision

The send path was defended four times over, because Cloudflare guarantees a Durable Object alarm fires at least once, not exactly once. An alarm handler that crashes after sending an email but before recording that it sent is simply retried, with no memory of the first attempt. Every other failure in this system was recoverable; a duplicate email to a stranger was not.

Each layer assumed the others would eventually be wrong. The Durable Object refused to re-enter a step already marked sent. A crash between writing the message and writing the step was repaired by looking for the orphaned message rather than guessing which way to resolve it.

Two unique database indexes made a duplicate message physically unrepresentable, one step to one message by constraint rather than convention. If all three failed anyway, the outbound call to Resend still carried an idempotency key derived from the run and step, so an identical retry produced an identical key the provider would collapse on its own.

Architecture

Everything ran on one Cloudflare Worker: the product API, the operator dashboard’s static assets, the provider webhook endpoints, a queue consumer, four cron jobs, and one Durable Object per enrollment whose alarm() handler was the state machine driving that person through their sequence.

Three authentication regimes coexisted on that single Worker, decided by URL prefix. The product API and the operator dashboard both delegated authentication entirely to Cloudflare Access (service tokens for the former, Google IdP plus an email allowlist for the latter), so there was no login form, session, or password anywhere in the application code. Provider webhooks and the one-click unsubscribe link verified themselves instead, with HMAC signatures the Worker checked directly.

By the numbers

Each figure carries where it came from and when it was measured. Open one to see the command behind it, where the repository recorded a command.

Authored TypeScript, excluding generated
28,702 LOC across 156 files
Provenance

Source portfolio/METRICS.md § Code size

node scripts/dev/portfolio-metrics.mjs

Measured

Test code
40,192 LOC across 151 files (a 1.40:1 ratio against source)
Provenance

Source portfolio/METRICS.md § Code size

Measured

Tests
1,747 passing across 149 files, plus 14 Workers-runtime system tests booted against real D1, R2, KV, Queue and Durable Object bindings, not mocks
Provenance

Source portfolio/METRICS.md § Tests and coverage

pnpm test

Measured

Dashboard coverage
99.58% statements, 98.43% branches, 97.51% functions, gated per file at 95/95/90 rather than as a repository average
Provenance

Source portfolio/METRICS.md § Tests and coverage

pnpm test:web:coverage

Measured

Database
21 D1 tables, 33 migrations, 30 indexes (18 plain, 12 unique)
Provenance

Source portfolio/METRICS.md § Content

Measured

HTTP surface
30 internal dashboard endpoints, 10 product API endpoints, 2 provider webhooks, across 3 separate auth regimes
Provenance

Source README.md § By the numbers

Measured

Sequence content
121 YAML sequences, 1,695 steps, schema- and policy-validated at build time
Provenance

Source portfolio/METRICS.md § Content

Measured

Commit history
698 commits over 9 weeks (2026-05-11 to 2026-07-13), including at least 5 credited to the coding-agent identity AI Alex
Provenance

Source portfolio/METRICS.md § Numbers that are not checkable from this snapshot

Measured

Screens

Overview page with cards for emails sent, active runs and unsubscribe rate, above a warning banner listing sequences with no recent sign-ups
The overview, with the rot detector flagging sequences nobody has entered in 90 days.
Sequence detail dialog listing a compiled sequence expanded to its individual steps, each with its delay, template and subject line
A compiled sequence expanded to its 14-step schedule.
Contact detail sheet showing a contact's product memberships, current sequence step, and a message timeline in the order events happened
Product memberships, active step, and message timeline.
Template preview dialog rendering a marketing email's real HTML inside the dashboard
The preview dialog, rendering real email HTML.
Read the repositoryemail-sequencing-saas-sequencer-snapshot

Its portfolio/ directory holds the architecture, metrics and testing documents these figures were taken from.