Hibiscus.txt

(last edited )

Decided to share my experience writing a personal web service. This was my first time making a “serious” standalone app that I would actually use, and not just a proof of concept or an assignment.

I really wanted a self-hosted diary for a while, but couldn’t find one that was… basic enough. Something like Joplin or BookStack had too many features for the task, and local apps like jrnl and Obsidian weren’t ideal because I use multiple devices too much to spend time synchronising. This might sound weird, but I found that having to open and/or maintain these (relatively) enormous apps was too much friction/distraction and just made me stop writing after a bit. So, long story short, I decided to make my own!

My app, Hibiscus.txt (named as a vague reference to an indie game1 :D), is as simple as it gets. You get a text area that is saved to an ISO-8601 named file (yyyy-mm-dd.txt), and can edit it until around end of the day (configurable), before it is replaced by next day’s file. You can look back at previous files and export everything in a .zip archive for backups. Also included is a basic notes feature, but it is not the focus and is intended for things like specific milestones and events. Use of plain text means I am not tethered to this specific piece of software and can easily change the setup later down the line.

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.

A lot of work went not into adding features, but rather removing them. For instance, I had a log.txt file for single-line timestamped notes, found myself never using it, and ultimately ditched it to keep the UI simple. I also initially used JS with an API for loading and saving, but realised that Go templates and HTML forms were sufficient.

Technical details

TL;DR

Many of the decisions were dictated by me being the target audience. A clear example of that is inclusion of optional Telegram notifications for failed login attempts - since I use that as my main messenger.

The footprint of the app is very small. Front page weights around 5kb, with plain HTML&CSS (and a non-critical JS script that just updates the date every hour). I wrote the backend in Go since that’s currently my favourite language, with Chi as a dependency because I couldn’t do middleware well on my own. A possibly controversial choice is use of HTTP basic auth as the way to log in. It might be considered insecure or crude by some, but it was very easy to add and with me only accessing the app once or twice a day over https it’s really not a problem.

The linux/amd64 docker image (my preferred way of running apps) weights 10mb as of the time of writing, and a compiled executable should be around the same size. It needs 1 port (7101 by default) and 2 volumes - data and config directories. Data stores the text files, and the config dir contains a single config.txt with all settings defined as key=value pairs in plain text. Including the password, because if someone can read a file on my server, I have much bigger issues to worry about.

Future plans

At this point I am happy with the end result. The project is simple by design, and I achieved the functionality that I wanted. The course of action right now is just polishing what I have, and fixing any issues as they arise - e.g. I noticed I could edit old day’s data at midnight, and realised that I forgot to implement timezones. I do have a short list of potential improvements in form of a TODO file, and am slowly making my way through it.

Overall, I think Hibiscus.txt is a complete, successful project! :D


  1. Finding Paradise, one of my favourite games of all time ↩︎