I’d like to announce the public beta of Cerveau 1 , a web app for managing plain-text notes from a GitHub repository. Cerveau integrates directly with Neuron which supports Zettelkasten-style note-taking in Markdown. This very site you are reading is managed by Neuron and edited in Cerveau, and its Git repo is essentially a directory of Markdown files.
I created the open-source Neuron to scratch my own itch, wherein I wanted to maintain my notes for a lifetime, without being dependent on proprietory formats or systems. I still wasn’t totally satisfied however, because I did not want to give up on the convenience of managing notes from a web app on my mobile phone. I didn’t want to be tied to a desktop text editor. So, the idea behind Cerveau was born - which began to resolve that dissatifaction without compromising on future-proofness.
How does it work?
All notes are written in Markdown, and stored in a Git repository. Cerveau directly modifies the contents of the repository using GitHub Apps API, while caching the latest revision of the repository on a PostgreSQL database. This allows me to edit my notes from a web browser (as well as from a mobile phone), while keeping the canonical version always on Git all the while allowing edits from elsewhere such as Emacs (i.e., two-way sync).
The editor widget is based on CodeMirror, via reflex-codemirror.
Real-time communication via WebSockets
WebSockets, via rhyolite, is used for real-time communication between the backend and the frontend; if you have two windows open, then updating a note from one window will have the other window automatically update its view without an explicit refresh (this works even if you are viewing a different note that has the modified note in its backlinks).
Nix is used for both developent and deployment; the production version in particular is deployed to a DigitalOcean droplet running NixOS. Nix makes reproducible development environments easy and possible. A testament to this is how easy it is to contribute to neuron (see CONTRIBUTING.md) - as with one command,
nix-shell, you get the full development enviornment including Haskell IDE support starting from a pristine system with nothing but Nix installed.
Full-Stack Haskell, from Prototype to Production
Towards perfecting future-proof note-taking
Making future-proof note-taking awesome is my current goal. LSP support, which facilitates improved note-taking experience in modern editors like VSCode, for Neuron is just one of the several things we can do to move towards that goal.
Where does Cerveau fit in all of this? Cerveau is a “luxury on top”, and a gift to those who help sponsor the open-source Neuron project to realize the aforementioned goal.
Will Cerveau be open-sourced?
I decided to entertain the idea of eventually open-sourcing Cerveau after a certain level of sponsors.
Two major features I’d like to see done myself next are:
- Auto-completion of links: typing
[[in the CodeMirror text editor should bring up an autocomplete popup of note titles. Update: pretty much done
- Auto-save: auto-save notes while editing, to provide a Google Docs like feel.