Ozean Devlog #1: Rewriting My RSS Reader in Go

| 4.43 kB

Earlier this year, I got tired of how my RSS reader worked. I wrote it in JavaScript with Astro, and it was clunky. It didn't store any data and had to re-fetch each feed every time the page reloaded. As it used Vercel for hosting, using a database, even a hosted one, sucked. So, I used this as an opportunity to improve my Go skills.

I rewrote everything. The frontend now uses Go HTML templates. No framework. The backend uses the vanilla Go router. With Go 1.22 I don't need to use a library. The default router is now good enough.

The other application handles all remaining tasks related to the database. It can create the tables and populate them. Currently, it is a for loop that executes once every 8 hours. It fetches all the feeds and updates the database. In the future, a cron job will replace the for loop. Updating once every 8 hours feels okay, but that interval should be at fixed times of the day. The current implementation depends on the application's launch time. It feels like bad UX to me.

What's next

Aside from what I've already mentioned, I want to add accounts. While I like how browsers show me that I've already visited a link, it doesn't work across machines. Accounts will store when a post gets read. They will also make it possible to see other user accounts. The visibility of accounts will depend on the user's preferences. The Finder also "exists," not doing anything outside of finding a link inside an HTML header tag. With accounts, it could evolve to be one of the primary ways of adding a feed to one's list.

I like what the Serenity OS project does. In the same way, I want to avoid dependencies. As of writing this, the only packages I am using are a driver for SQLite and a package for parsing RSS/Atom feeds. Replacing those will take some time. I don't know enough about SQL databases and need to learn about drivers. Before that, I want to write the parser for XML feeds. The default XML package in Go is not enough. Malformed XML and bad implementations of feeds make it unsuitable, as it can't parse those.

There are other things I have to add that might be invisible to the user. Here's a list of (potential) changes and features in no particular order:

The list will change over time, but I don't want to bloat it with features. I want to create an efficient application that is enjoyable to use. Its only purpose is and will be for following and reading blogs.

You can find the code on Codeberg and visit the project here.