I have been trying a new way to keeping track of projects, and I went down a fun rabbit hole before settling on an approach, that I thought would be fun to share.
But first, some context
I've been maintaining a developer journal for the past few months. I create a note each day and write down things I learnt as I'm working on them, or use it to break down and keep track of tasks when I'm stuck. If I'm working on multiple projects in the same day, they all go in the same daily note.
Recently, I came across the concept of interstitial journaling, where you write stuff throughout the day, but with a timestamp before each message. It seemed like a good idea as it gives me a better sense of how my day went, and was easy to incorporate with my then writing app of choice, Logseq.
While looking for Logseq plugins, I came across the following comment on a Reddit thread:
This is why I used personal IRC and Discord servers/channels for logging/journaling. Just start typing; all entries are automatically time-stamped, sorted, and cloud-backed.
My mind was BLOWN. The idea of a chat platform as a means of logging personal projects made so much sense! I had basically been trying to recreate the feeling of chatting with myself, and I didn't realize it until I read this comment.
I had been coming across the idea of self-hosting while looking for project ideas and saw IRC mentioned there, so I looked into it. That's where the idea clicked.
Channels as project logs
Trying out IRC felt like using something like Slack or Discord, but much more minimal. It is a text-based chat protocol based on the client-server model. There are servers that consist of one or more channels, and clients with which you can connect to and interact on channels by joining them.
The interface is also a minimal version of Slack or Discord, with a list of channels you've joined on the left and time-stamped messages from a channel in the center.
Now how does this relate to project management, you ask?
- Each channel represents one project I'm working on
- When I want to log something specific to a project, I post a message in that channel
This simple concept solves issues I've faced with the existing dev journal setup.
When I revisit a project after a break (which I often do), that would require searching through older notes to figure out where I last left off. While the daily notes made things easier on a day-to-day basis, I often felt the lack of a overall view of a project.
A channel helps with both time-tracking and project management:
- The messages are time-stamped, so I know how my day went
- The channel serves as the overall picture of my project - what I've done, what I need to do and where I last left off. Everything relating to a project is in one place.
- The channels list in the side tells me at a glance which projects I'm working on, and lets me easily switch between them.
This also helps in cases when I want to write a post about something I did over a long period of time - say weeks - and I forget details of what I did earlier.
A chat interface encourages me to write smaller updates, so I end up with a reliable log of events, as opposed to me having logged only certain aspects and trying to remember other details while writing the post (extremely annoying, trust me). And more writing leads to more thinking, so I consider this approach a win!
So I have the idea set, now comes the rabbit hole I went into while trying to look for ways to implement this.
Finding the perfect implementation
Self-hosted IRC server
Since the idea came from IRC, my first idea was to use the self-hosted server I used to try IRC in the first place. I had setup UnrealIRCd on my daily driver, and installed two IRC clients to try - Textual (a GUI) and irssi (a TUI).
It all worked fine, but I came across its limitations pretty quickly. It doesn't support multi-line messages and making the chat persist across sessions required additional setup, which didn't seem worth the effort.
Self-hosted Zulip server
A great open-source alternative to Slack/Discord is Zulip, which is used as the primary chat platform at the Recurse Center. I'm familiar with the interface and it has the concept of channels, which I can use to manage projects.
After some trial and error, I was able to self-host an instance using their docker image. It worked well, but it also felt overkill for some reason. I realized I wanted something that didn't rely on the internet to function, but something that looked like a chat platform visually.
Custom-built TUI
I really like the Bubbletea framework for TUIs, and had it in my "make something with this someday" list. This seemed like a good chance, and I even found some projects as inspiration!
- pjs follows the same concept of time-stamped project logging, but with a different implementation. It uses a SQLite DB to store notes, and each note is displayed separately as opposed to a chat interface.
- nap is a code snippet manager that reads and displays plaintext files, and the layout is pretty close to what I had in mind.
However, my feelings about TUIs are mixed - I find them really cool but don't use them much for some reason. This made me hesitant from really giving the idea a fair chance. I feared I would spend all this effort making something, and lose interest while making it.
This would have made for a great programming project though. Maybe someday.
Existing GUI apps
I didn't expect to find much here, but I ended up finding multiple apps.
The one app I ended up trying was Strflow, a macOS app. It provides a chat-like interface, where you can type messages with a subset of Markdown and the option to add tags. Each tag then becomes its own view, so you either see all messages at once or filter by a specific tag. While I would have preferred separate chats for each project, filtering by tags seemed fair enough.
I tried Strflow for about a day, and it worked really well! It allowed me to import my existing notes (there's an option to select an earlier date) and had a floating window shortcut, which displays a tinier version of the chat interface. It didn't make me go "this is it" though.
Somewhere, I was still craving on making my own implementation, so I finally settled on an idea involving good 'ol plaintext files and Markdown.
Current setup
I created a folder called logs
which contains all of the project logs. Each project corresponds to one log file - PROJNAME.md
, and follows this format:
#### 27 Sep 2024
##### 16:54
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
##### 20:55
Curabitur laoreet fermentum enim malesuada volutpat.
Praesent semper non odio at vestibulum.
...
I thought of choosing a shorter custom syntax, but if I ever want to export these logs as HTML, using existing syntax would make conversion and styling easier. I also don't use h4
and h5
tags in my writing, so using them here makes it easy to parse individual messages if I ever need to do that.
I added custom CSS set to my Markdown editor, Typora, to render the log files in a cool way. The above log file renders like so:
27 Sep 2024
16:54
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
20:55
Curabitur laoreet fermentum enim malesuada volutpat.
Praesent semper non odio at vestibulum.
...
Then there's the shell script to automate the logging process (parts of the script are omitted):
file="$LOGDIR/$1.md"
shift
if [[ -f "$file" ]]; then
lastdate="$(grep '^#### ' "$file" | tail -n1 | cut -c5- )"
todate="$(date '+%b %d %Y')"
cat <<-EndOfMessage >> "$file"
$(if [[ "$lastdate" != "$todate" ]]; then echo "#### $todate"; fi)
##### $(date '+%H:%M')
${@:-$($EDITOR $(mktemp))}
EndOfMessage
fi
If the file exists, it extracts the last date in a file, and compares it with the current date. If the dates are different (for instance posting a note past midnight), it inserts the date, followed by the timestamp.
Line 11 is the content of the message. That cool bash syntax means "take the remaining command line arguments if not empty, otherwise open a temporary file using an editor and take its contents after the editor is closed instead".
Next steps
The interactivity of a chat interface is still missing - having a chat box that appears with a shortcut, or being able to post multiple messages in succession instead of calling the shell script everytime.
I'm also starting to get interest in the TUI idea again, now that I recently learnt that my terminal emulator can display terminal windows with a shortcut, and they can be floating windows.
I'm also thinking of a web-based approach, with a frontend that resembles IRC/Slack.
Too many ideas in different directions, let's see where this goes.