This repository contains all of the code for gathering the data which I display on my website
After spending some time debugging different language servers in Neovim, I felt inspired to write my own server that would simply parse metadata and aggregate statistics about my coding sessions so that I could display it on my website.
I launch the server from this repository as a daemon every time my laptop
boots. It then receives remote procedure calls from the neovim plugin
pertaining to events such as the opening of buffers, windows gaining focus, the
initiation of new nvim
processes, etc.
These calls contains the path to the buffer, which the server parses and writes to an append-only log-structured key-value store. Every segment is roughly 10KB on disk. The server requests all of the buffers from this KV store every 15 minutes, and proceeds to aggregate them to a remote MongoDB database.
I chose this approach primarily because I wanted to build a log-structured storage engine in order to better understand the inner workings of some popular databases. It is a work in progress, but it now includes some core features such as hash indexes, segmentation, and compaction. As a bonus, it helps me avoid surpassing the limits set by the free tier for the MongoDB database!
This project has evolved into a playground where I can experiment with different ideas and technologies. The most challenging part so far has been designing the website, as I wanted it to have a unique look and feel and to build all of the components from scratch. I'm in the process of making it open source, but I have a few things that I'd like to clean up first.