viibhiiv: building a beehiiv alternative live, on Cloudflare
Kyle Williams ·
Tyler Denk posted that every week someone says they'll vibe-code a beehiiv alternative over the weekend, with a backlog of 370 features to include. So I bought viibhiiv.com and I'm building one live.
The deal: when viibhiiv.com hits 100 signups, the first issue gets sent by viibhiiv itself.
The list: Tyler's backlog has 370 features. Progress on every one is at viibhiiv.com/list: 245 done, 119 partly done or waiting on credentials, 6 left, and all 6 are out of scope by nature (a team of deliverability experts, 3M emails/minute, IP warming on shared IPs, a Netflix-scale ad network, 525+ brand deals, a human support team). Every buildable item on the list now has working, tested code; "partial" mostly means it goes live when Stripe, Cloudflare Stream, SES, Luma, or Discord credentials are added, or when a second publication is deployed.
Shipped since the last update: recommendations, deliverability (bounce classes, layered suppressions, DMARC/complaint ingestion, blocklist checks), an AI writer (Cmd+J) with audio versions and native social embeds, real-time collaborative editing on Durable Objects with comment threads, list imports from beehiiv/Substack/Mailchimp/Kit/Ghost plus GA4/HubSpot/Meta/Slack/Discord integrations, webinars (Stream WHIP studio, reminders, ICS), multiple lists with a preferences page, merge tags with "preview as subscriber", columns/sections/custom HTML/attachments, a block-based site builder with an AI page builder and edge caching, and Luma + Discord role sync.
Earlier: automations with welcome sequences, community, podcast hosting with Whisper transcripts, post templates, the editor (autosave, slash menu, Google Docs paste, R2 images), paid subscriptions and digital products (dormant until Stripe keys), sponsorships with an /advertise page, a site builder and link-in-bio, team roles and authors, an MCP server so Claude can run the newsletter, A/B subject tests, and a referral program.
Last round: a visual WYSIWYG editor (Markdown stays the source of truth, so live collaboration keeps working), OAuth so claude.ai can connect to the MCP server with a normal sign-in, and a workspace layer for multiple publications (shared team, publication switcher, login handoff, cross-publication search, a network between your publications, Stripe Connect payouts).
Next: the first real issue, sent by viibhiiv itself at 100 signups.
Done
✅ Waitlist + live count on viibhiiv.com
✅ Bot protection: Turnstile, a honeypot, rate limiting, a disposable-domain block, and an MX check.
✅ One-click unsubscribe, the way Gmail and Yahoo require, plus a suppressions table. The public count excludes anyone who leaves.
✅ Confirmation emails (live): double opt-in with a signed, expiring link, sent from
mail.viibhiiv.comwith SPF, DKIM, and DMARC. The first email viibhiiv ever sent went out today.✅ The newsletter itself: Markdown editor, Outlook-safe email, queue-based send that never double-sends, web version at
/p/slug, bot-filtered stats.✅ Admin login by magic link: single-use, 10-minute expiry, rate limited, redeemed by a button so mail scanners can't spend them.
✅ Subscriber data, smarter signups, embeddable forms, a REST API, and signed webhooks.
✅ Segments, polls and surveys, first-party analytics, and automations.
The live checklist of all 370 items is at viibhiiv.com/list.
Waiting on AWS: SES production access and bounce/complaint handling. Sending stays behind one sendEmail() function, so SES swaps in later. The full plan is on the next page.
Most of beehiiv's list exists to serve millions of senders. For a single 10k-reader newsletter, the real list is short. This is the plan: what to build, what to skip, and the stack. Comments and pushback welcome.
The one exception to "all on Cloudflare"
Everything runs on Cloudflare except the actual send. Cloudflare Email Service is transactional-only: its own docs say to use a dedicated marketing platform for newsletters and campaigns. A weekly bulk send through it risks getting the account flagged.
Send pipe: Amazon SES, called from a Worker.
Price is $0.10 per 1k emails. A weekly 10k send is about 43k emails a month, roughly $4/mo.
Cloudflare would be about $19/mo for the same volume ($5 Workers Paid + ~$0.35/1k), and it's against policy.
Levels compared providers at 1M/mo: Postmark $1,206, Resend $650, SendGrid $600, Cloudflare $354, SES $100. He picked Cloudflare for his app email, and Marc Köhlbrugge is on SES. (levels.io)
Keep sending behind one
sendEmail()function so the provider can be swapped later if Cloudflare allows bulk.
Use Cloudflare Email Service for the transactional pieces: signup confirmation, magic links, and "you've been unsubscribed" notices.
Stack
Workers: signup, confirm, unsubscribe, tracking, SES webhooks, admin API
D1: subscribers, posts, sends, events, suppressions
Queues: batch the send, retry throttles, avoid timeouts
R2: images in posts, with a public custom domain
Workers Static Assets (or Pages): web version of each post, signup page
Turnstile + WAF rate limiting: spam signups, endpoint abuse
Cron Triggers: scheduled sends, retry jobs, cleanup
Cloudflare Access: locks the admin UI to your email, so there's no auth to build
Workers secrets: SES keys, signing secrets
SES-side setup: verify the domain, request production access (out of the sandbox), and set up a configuration set with an SNS topic for bounces, complaints, and deliveries that posts to a Worker endpoint.
v1: what to build
1. Signups that don't poison the list
Signup form with Turnstile and a honeypot field.
Rate limit the signup endpoint (WAF rule, e.g. 5/min per IP).
Disposable-domain blocklist, plus basic syntax and MX checks. Skip paid validators (ZeroBounce, Kickbox) at this size.
Double opt-in: send a confirm link with a signed, expiring token. Subscribers count only once confirmed.
Acquisition source: store
utm_source,utm_medium,utm_campaign, and the referrer on every subscriber.
2. Deliverability basics (the 20% that matters)
SPF, DKIM, and DMARC aligned on the sending domain. Start DMARC at
p=nonewith reporting, then move toquarantine.Use a dedicated sending subdomain (e.g.
mail.yourdomain.com) so newsletter reputation stays separate from your main domain.One-click unsubscribe: add the
List-UnsubscribeandList-Unsubscribe-Post: List-Unsubscribe=One-Clickheaders. Gmail and Yahoo require them for bulk senders.A visible unsubscribe link in the footer, plus a physical address (CAN-SPAM).
Skip: IP warming and blocklist monitoring, which shared SES IPs handle. Feedback-loop registration is also covered by SES.
3. Suppression (the part you must not skip)
One suppressions table, fed by the SES webhooks:
Hard bounce → suppress permanently.
Complaint → suppress permanently and unsubscribe.
Soft bounce → count it, and suppress after 3 in a row (expire after 30 days).
Unsubscribe → permanent.
Every send checks suppressions first. SES has its own account-level list, but keep yours as the source of truth.
Keep the complaint rate under 0.1% (Gmail's line is 0.3%). Show it on the dashboard.
4. Writing and rendering
Write in Markdown (or a simple editor), stored in D1.
Render to email HTML with MJML or one hand-built table-based template with inline CSS, so it holds up in Outlook.
Size check: warn if the HTML is over ~100KB, since Gmail clips at 102KB.
Merge tags:
{{first_name}}with a fallback.Send test to me before every real send.
Images upload to R2 and get resized once at upload, max ~1200px wide.
5. Web version
Each post is published at
/p/slugfrom the same source, and the email links to it with "View in browser".An archive page plus a signup form on every post.
Basic meta tags and OG image. That's all the SEO needed.
6. The send
Admin clicks "Send" (or Cron fires at the scheduled time).
A Worker creates a
sendrow and pages through confirmed, unsuppressed subscribers.Push batches of ~50 to Queues.
The Queue consumer calls SES
SendEmailper recipient, so you get a unique unsubscribe link and tracking per person, staying under the SES rate (start at 14/sec, request more).On throttling or 5xx, Queue retries. Store a per-recipient
sent_atso retries never double-send.The SES message ID is saved for matching bounce and complaint events.
7. Stats (enough to learn from)
Opens: a tracking pixel through a Worker. Treat them as directional because Apple Mail prefetches.
Clicks: links rewritten to
/c/:idand redirected through a Worker.Bot-click filter: drop clicks within ~2 seconds of delivery, known scanner user agents, and recipients clicking every link at once.
Per post: delivered, opens, clicks, unsubscribes, bounces, complaints.
Per subscriber: last open/click date, which feeds a later "engaged" segment.
8. Admin
One admin page behind Cloudflare Access: subscriber list and search, post editor, send button, stats.
CSV import (with a re-confirm option for cold lists) and CSV export.
v2: only when there's a reason
Paid tier: Stripe Checkout, a webhook to set
tier=paid, and a paywall break in posts (email gets the free version, web checks a magic-link login).Segments: tags plus "engaged in the last 90 days". Sending to engaged readers only also helps deliverability.
Welcome sequence: one or two emails, sent by Cron on signup date.
Subject line A/B test: send A and B to 10% each, then send the winner to the rest after 2 hours.
Sunset policy: re-engage, then remove readers who haven't opened in 6 months.
Referral link: a per-subscriber code, with signups credited to the referrer.
Skip entirely
Collaborative editing, the AI writer, the website builder, community, podcasts, webinars, digital products, the ad network, the recommendation network, an MCP server, webhooks for third parties, team roles, multiple publications, audio versions, and dynamic content per segment. None of these matter at 10k with one writer.
Rough monthly cost
Workers Paid: $5 (covers Workers, Queues, D1, and most usage at this scale)
SES: ~$4
R2: ~$0 (free tier)
Domain: ~$1
Total: about $10/mo, vs. beehiiv at $59+.
The real cost is time: the deliverability pieces (suppression, unsubscribe headers, DNS alignment) aren't optional, and they're what make the list survive past month three.
Suggested build order
✅ Domain + coming-soon page with waitlist and live signup counter (goal: 100) (viibhiiv.com)
DNS (SPF/DKIM/DMARC), SES production access
Signup with Turnstile + double opt-in (confirmation emails: up next)
Unsubscribe (link + one-click header) + SES bounce/complaint webhook → suppressions
Template + Markdown rendering + test send
Queue-based send
Tracking + stats page
Web archive
Import existing list, re-confirming anyone cold
Open questions
The waitlist is the first list. Those signups predate double opt-in, so they get a confirmation email before the first real send.
Paid tier at launch or later?
Weekly cadence assumed. If it's more often, the costs are still trivial.