Skip to content

Add newsletter template#1064

Open
pfstr wants to merge 1 commit into
cloudflare:mainfrom
pfstr:add-newsletter-template
Open

Add newsletter template#1064
pfstr wants to merge 1 commit into
cloudflare:mainfrom
pfstr:add-newsletter-template

Conversation

@pfstr

@pfstr pfstr commented Jul 20, 2026

Copy link
Copy Markdown

Newsletter template

A self-hosted, serverless newsletter that runs entirely on the user's own Cloudflare account: a hosted (and embeddable) signup form, one-click RFC 8058 unsubscribe, and a simple /admin page to send a campaign. Subscribers live in D1, so the user owns the data.

Sending is deliberately provider-agnostic: src/email.ts is a small sendEmail() adapter the user wires to their own email provider, so the template ships tied to no vendor. Collecting subscribers works out of the box with zero configuration.

Optional, off by default

  • Double opt-in (DOUBLE_OPT_IN) — a confirmation-email step before a subscriber is added
  • Bot protection via Cloudflare Turnstile on the signup form
  • Automatic RSS → email on a cron trigger, with a first-run baseline and per-post dedup so posts are never emailed twice

Products & bindings

  • Workers + D1
  • Handlers: fetch (Hono) and scheduled (cron trigger)
  • Deploy-screen config: ADMIN_TOKEN, FROM_NAME, FROM_EMAIL, DOUBLE_OPT_IN

Notes for reviewers

  • E2E tests in playwright-tests/newsletter-template.spec.ts using the shared fixtures.
  • preview_image_url / preview_icon_url left out for the Growth team to provide; a screenshot is included in the README for now.
  • Contributor-hosted live demo while in review: https://newsletter-template-preview.rafael-pfister.workers.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant