Now you can subscribe to these posts and have them land in your email inbox. I have two inspirations:
- Craig Mod, an incredible writer based in Japan;
- My little brother, Jeffrey, who has started a newsletter about his passion, American history.
I decided to wear the hair shirt and set it all up myself, from parts, rather than going through Substack or another email newsletter provider. Partly because of really questionable behavior on Substack’s part, but mostly because there’s nothing that feels better than over-engineering a side project.
Behind the scenes
This website runs on Cloudflare. It’s fully static—I render it on my laptop and upload it to a Cloudflare Pages site. To power a newsletter, you need a few things:
- Various pages: subscribe, email confirmed, email unsubscribed, link invalid, and a privacy page.
- A backend with a few useful endpoints (subscribe, confirm, unsubscribe).
- A way to actually send the emails.
I’m using a Cloudflare Worker for the backend—the static subscribe page posts to it, and the confirmation and unsubscribe links redirect through it back to static pages.
I’m using Amazon SES to actually send the email. It seemed the simplest way to do it, and it’s really cheap.
Because the posts themselves are just static text in a repo, I wrote a tiny Python CLI to actually send the emails—it fetches all subscribed addresses from the backend, then calls the AWS API to send each email.
Claude did almost all of the coding; I just wrote the spec and guided it toward improvements. It’s not perfect, but it seems to work. Of course no one’s subscribed yet, just me and my test accounts, but if I keep writing they’ll come.