← Back to Blog | building my own blog

| Talor Anderson

This blog is built with React and runs on Cloudflare workers. I built it myself, and learned some interesting things along the way.

I had an old personal site, with a landing page and a small blog. It was a static generated site built with Jekyll. I never really kept up with the blog, and as time went on I grew more embarrassed of my years-old posts with no followup. If I wanted to make a blog post, I had to write and edit it on my computer in a code editor. It was too much friction.

I tweet constantly, because it's always available wherever I am, on my phone or in a browser. I set out to build a new website for myself that was just as available as the twitter app.

Why build it myself?

I evaluated some other alternatives before deciding to build a new blog from the ground up. I only had a few requirements:

  • Markdown authoring, or at least some way to export my data so I wasn't stuck on platform
  • RSS feed (I don't care much about having an email subscriber list at this point)
  • Some room to personalize the pages, themes, and behavior.
  • Authoring that felt fluid and simple like twitter, so I would actually write.

First I signed up for bearblog.dev. I was attracted to its minimal designs, markdown-first authoring, and philosophy of 'simpler is better'. Unfortunately I found it a bit too simple for what I wanted, to the point I felt I needed to submit some PR's to make the editor a bit more friendly. I tried drafting some posts, and it didn't feel like something I could get into the habit of using frequently.

Next I checked out substack. To be honest, I didn't really "get" it. The feed was uninteresting, and I didn't see activity from many folks I knew there. Some folks on twitter talked about substack like it's the next big thing, but it didn't really grab me. It was also yet another closed-off platform, and I really wanted a home for my content that belonged to me.

I really wanted one of these options to work, so that I could spend time actually writing instead of coding, but I thought with AI assistance I could build something fast that would work well for me.

Building the blog

I started with a template from react-router on cloudflare. I chose this for a few reasons:

  • I liked remix, which eventually became React Router 7.
  • I'm (possibly unjustly) biased against next.js, so that was off the table.
  • I wanted everything hosted on one site, so hosting on neon or supabase didn't feel right.
  • I like using sqlite as a database: I'm only storing my own data, so I don't really need a powerful database like Postgres.
  • Since I was using sqlite, I wanted to avoid running docker at all locally. (I tried railway, but it pushes you towards local docker).
  • Cloudflare's local dev experience is pretty good, and their paid workers plan is only $5/mo.

Step 1: hello world

First, I created a plain static landing page for my home. I pushed to GitHub, and Cloudflare's automatic builds deployed my site. I was amazed at how fast it deployed: my builds take about a minute to complete! This is great because I push code frequently and I'm very impatient.

I pointed my domain taloranderson.com at the deployed worker through Cloudflare's DNS settings.

I had a new website! It wasn't a blog, but the old site wasn't much of one either.

Step 2: the blog

Next, I wanted to build out some blogging functionality. I fired up Claude code and asked it to build some new routes and pages for me. I started small: I only wanted the ability to read blog posts that were in my database already. It helped me create the necessary DB schema, insert some placeholder data, and then add individual post and a list page. I used drizzle for an ORM, because we used it at scale at Replit for all user applications and I'd seen it work well there.

It's amazing how fast Claude could do all this, and it seems really comfortable with Cloudflare's wrangler cli. AI coding is the perfect tool for perfectionists like me: I just let it code, throw away the terrible bits, and keep the rest even if it's not perfect.

Step 3: auth

Before I could add post authoring, I had to set up authentication. I used better-auth, because it had an easy to use drizzle plugin.

Only one user is allowed on my site. Signup gets blocked automatically if any user exists. This made it really easy to use the existing login / signup utilities from better-auth, have private sections of my site, but make it safe for only myself to use.

Blog posting and draft functionality are hidden behind authentication. Having a full auth utility means I could even build myself private tools, or maybe even let other people authenticate and use those tools. My old static site could never do all that!

Step 4: some early polish

I added a few nice to have features after all this:

  1. Drafts autosave as I type. I can work on the go on my phone or laptop and never worry about losing any content.
  2. Keyboard shortcuts in the draft editor:
  • cmd+b to bold
  • cmd+i for italic
  • selecting some text then pasting a link wraps the text in a markdown link.

A note on the keyboard shortcuts: I use the document.execCommand API that hooks into input history, so I can even cmd+z to undo the keyboard shortcut actions. pretty cool! I learned about this when I submitted my PR to bearblog mentioned above.

What's next

There's still a few features to add.

I'd love to add media uploads. Cloudflare should have great support for this.

I think at some point I'll want a "link" post type, inspired by Simon Willison's linkblog.

Last, I think it would be great to have a commenting feature. I don't use Bluesky much, but I love the way some sites use Bluesky as commenting infrastructure.

Conclusion

This post was entirely written in my own site! And it's the first non-work blog post I've written in years. It felt great to build the site for myself, and only took two evenings in my lull between jobs to complete.