wingsite

Caw into the Void

published: 2024-08-21
tags: caw go projects

Hex

A friend of mine, HexDSL, for a long time, had kept a microblog in the form of a table, first on notion. In the past I have created a program to turn it into an RSS feed and when he switched to using obsidian, I updated it for that. He then moved a third time to an UpNote file.

I've had an idea since creating goldfinch to add microblog functionality to it, but never got around to it. Watching Hex jump between solutions got me thinking about it and on his last jump I decided to start a new project.

Social Media

I never really "got" social media. I've had accounts on various platforms but never really posted much, or spent much time there. I hadn't had one anywhere in years but last year I did set up a gotosocial server and really try. I did have some interactions, all positive even, but there's just something about social media that makes me not really care for it, even when it's open source and federated. I didn't really get the appeal of shouting into the void either but listening to Hex did help with that. Sometimes you just want to send out little updates or a random thought and not care after that. Technically you could use social media platforms for that but they never really give me that feeling. I meant to write about this and my fedi experiment a while ago but I've been busy with life a lot lately and the idea just drifted. I still get the occasional message about Trendy or a blog post on it which is mostly why I left it up. Unsure about what I'll do with it in the future but moving on...

Caw

I wanted a microblog... platform? (This feels like the wrong word) That didn't have any kind of social media features and had RSS feeds. Essentially a void to shout in, but publicly viewable. I also wanted to avoid having to do authentication. I happened upon twtxt which reminded me of drew's lace idea for gemini. So caw initially started out being built on that idea: maintaining a text file with a list of posts. I also wanted a regular website to view these posts on too. As I worked on this I found myself pushing twtxt to a secondary feature and eventually dropped it. It's still a neat idea but ultimately not what I ended up wanting.

The Void is my instance of caw, have a look around for more context to this section!

All the posts and user data are stored in an SQLite database. Initially the configuration was also stored in the database but I later moved that to a config file. All posts are added as markdown and both the original markdown and converted HTML are stored so I don't have to convert posts every time one is loaded. Posts have identifiers which are just UUIDs. I also store linked accounts. These are the replacement for authentication. You can create programs and add a linked account type to reference.

Caw exists only as a frontend and API for other programs to hook into. The API initially started as a go package but I decided to change it being an API so it could be used in non-go programs early on. At the moment the API runs as a second HTTP server, the first being the web server itself, which is supposed to only run on localhost. I have been meaning to look at unix sockets, which would probably be a better way of doing it, but I just wanted to get something finished so I'll look them later.

While I originally thought of it a single user "thing" I had decided to make it multi-user before I actually started, as well as adding a timeline as the main page showing everyone's posts. The timeline is as close to a social feature caw has, and it optional per user. There is an RSS feed for the timeline and each user has their own feed as well. I did also add the option to exclude a single user from the timeline RSS so people would be able to subscribe to it and not see their own posts showing up.

Posting

As mentioned earlier, I didn't want to do authentication. I maintain a Discord bot and used the API with it to create linked accounts associated with Discord IDs. People DM the bot which uses the linked account system to connect with caw user IDs and make the posts. Discord already using markdown for messages also means messages are seen in Discord pretty much as they will appear on the website.

Conclusion

I had a fun time making it. I didn't really expect anyone to actually use it but some people are quite actively using it which is pretty nice ^_^

Check my micro-thoughts on the void

You can find caw either at it's fossil repo or the git mirror if you prefer.