Cerveau: a future-proof web app for notes
I’d like to announce the public beta of Cerveau1, a web app for managing plain-text notes from a GitHub repository. Cerveau integrates directly with 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 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.to
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, 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).
DigitalOcean droplet running . 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?
Although nothing concrete has come up yet, depending on success, (see below) I’m entertaining the idea of eventually open-sourcing Cerveau after a certain level of sponsors.
Several have asked me about open-sourcing @CerveauApp.— Sridhar Ratnakumar (@sridca) September 5, 2020
I reflected on using GitHub sponsors to do it sustainably.
However I don't feel confident that it would be successful.
So I've created a "pre-goal" to test the waters, as it were.#Haskellhttps://t.co/NYodwn4d92 pic.twitter.com/c1udy1TJw9
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.
“Cerveau” is prounced with the “eau” sounding like the “o” in “Go”. See audio playback.↩︎
Incidentally, the paper Explicitly Comprehensible Functional Reactive Programming compares The Elm Architecture and Reflex Ecosystem’s frameworks.↩︎