I’m excited to say that you can now get my blog posts delivered directly to your inbox!
For a little over a year, I’ve been working on adding this feature. Truthfully, it could have probably been done sooner, but somehow having a full-time job, moving to a new state, being sick a lot, and having a 3-year-old (who is now 4!) took up a lot of my time. 😜Still, I’m thrilled to now have this in a state where I can roll it out to the general public.
To receive emails of new posts, all you have to do is click the subscribe button on the top of my blog list, and enter your name/email.
Background
Here’s a little background of how I built this feature out. If you’re not into the technical nitty-gritty, feel free to skip all this. 🙂
First and foremost, I wanted to build this newsletter as a way of diving deeper into Rust. My impressions of Rust after working on this project could probably be a blog post on its own. It's a fascinating language that provides great performance and compiler safety, as well as some great features for making clean, expressive, and opinionated code. The newsletter is run by a Rust service that accepts new subscriber email addresses, stores subscriber data in a Postgres database, and sends out new emails (via AWS’ Simple Email Service) with blog content to confirmed subscribers.
Even with this newsletter set up, I still needed a way to send out emails upon the publication of a new post. This would be a great place for a webhook, but unfortunately, my CMS’ webhooks are only available to paid subscribers, and the plan is a little expensive for my taste. So, I set up a custom service of my own. Thankfully, Railway’s cron job feature offers a way to run a service on a regular schedule. In order to send out emails when a new blog is published, I set up a new Dart service to run hourly, checking my CMS for new posts and sending them out via the email service when available.
The nice things about doing all of this in my Railway cloud is that I can keep all of these services internal. Private networking is really easy in Railway, so my newsletter and my update service can both speak directly to my blog, without being exposed publicly. Here is a snapshot of my cloud setup in Railway – this blog is the only service that is accessible via public internet. The blog server can communicate with the update handler and the newsletter via a private network within Railway.
Rolling this out has been a long journey, with lots of technical and personal obstacles along the way, but it’s been a great learning process. I’ve leveled up my Rust skills by working extensively on a server app from the ground up, I’ve learned some new HTMX and Tailwind capabilities by setting up the entry form, and I’ve built loads of knowledge on how to connect multiple services in a cloud project via Railway.
Feel free to check out my source code for the newsletter and the update service. If you encounter an issue with subscribing, or if you have any comments about how I’ve implemented things, feel free to reach out to me on LinkedIn, BlueSky, or email shodgeskluck [at] gmail [dot] com. Happy reading!