til/willcodefor.beer is now a Remix app
One of my goals for 2021 was to write more and I started getting really into it. I've been able to keep it up since, with a total of 43 posts in 2021 and 2022. Now I've again come to a point where I require something else to simplify writing. Eleventy was awesome and I liked working with it, but I want to keep improving.
At the beginning of 2022, I rebooted my movie logging website in Remix and I've had a great time working on it since. I've encountered no major issues and everything has been so easy to update and fix. Pairing Remix with Prisma and Tailwind makes me feel happy doing web development again.
Following that experience, I decided to explore rebuilding my work project in Remix during a hack day. In one eight-hour day, I managed to rewrite most of the functionality.
Authentication, three list views, two create views, filtering and more. I basically rebuilt the entire app. In 8 hours. Wow Remix, just wow. - Tweet
Following these two great experiences, I have been planning to rewrite this site in Remix. The main thing I wanted to solve was to avoid full builds whenever I wanted to publish a new post or fix a typo in an old one. I had a feeling that I could solve this by putting my posts in a database.
I do my writing in Obsidian and have a small script to pull the posts with a specific tag from it. I could update that script to push these new or updated posts directly to the database. Fast and easy updates.
I started out with the Indie Stack, one of the built-in official stacks that Remix can generate. This stack contains an app deployed to Fly.io, a SQLite database, Tailwind styling, and more. Since I already have a Postgres database running on Fly.io for my movie website, I decided to rework the stack to use that instead.
I wanted the site to look and work exactly the same as before. Because of this, development was straight-forward, basically copy and paste the templates and pull in the post data from the database. It took me about a working day to migrate every feature. This includes the redirect feature I wrote about in _redirects in Cloudflare Pages (Remix also solves the 100 redirects limit I mentioned in that post) and the blog post series feature I created in Eleventy and wrote about in Blog post series in Eleventy.
Like I thought, I could also rewrite my posts script to send updates straight to the database. To speed it up even more, I only update the posts that have been modified since I last ran the script. Now it just takes a couple of seconds to add a new post or fix something. What a dream.
Everything worked just as I hoped it would and my writing experience has again levelled up. I don't know if this is just me, but the site even feels faster than my Eleventy site which was only static files.
I've already started writing down new features that I'm able to build now that I have the power of Remix behind the site. Looking forward to keep improving on the site!