30 June 2020

A Pet Project

I have a pet project that I use to explore new cloud environments and technology stack. A simple web notebook application. It contains everything I will likely need to do with a stack in a simple application. Add some extras and it becomes more useful and gives me an idea how to the application will be partitioned on each stack.

Note: I updated this on 02 July, with additional requirements that I found in one of my implementations.

Basic Notepad

I aim for the basic application to be as simple as possible. So let’s start with these requirements:

  • Login page. Establish identity via authentication. Authorization is part of the extended multi-user story.

  • A left panel with a tree display. Notebooks at the top level, topics underneath each notebook.

  • Primary pane contains the actual note feature. If a topic has been selected in the topic pane, the latest text is shown. If the edit button is selected, the pane becomes a note editor.

  • The edit pane allows the user to create a Markdown formatted text.

  • When the display mode is enabled, the underlying Markdown text is rendered as formatted HTML.

  • New entries are saved as they are modified, undo/redo is supported.

  • When the user presses the save button, the current text is stored in the persistence layer.

Extending the Notepad

The basic notepad demonstrates the presentation, persistence, and control layers of a platform. It also exercises the authentication aspect of the platform. I try to keep the user interface confined to HTML and basic Javascript, I do use Bootstrap in order to minimize my involvement in Material design choices.

Attachments are a logical next step. Users should be able to upload images and insert them into their text. Since the underlying format is Markdown there are some open source WYSIWYG editors available. Some even support inserting inline images. The downside is the time it takes to integrate these with the backend.

So we have the basic application running in the core framework. There are a few tweaks we can make to make the application useful for daily tasks. Search comes to mind immediately. My first choice for an embedded database in Java is H2, which has a nice hook into the Lucene search engine. If I really want to build a robust search for the notes, I add an ElasticSearch client. This means you have to create build pipelines for ElasticSearch configurations, but when you have the horsepower you may as well use it.

So once you have multiple users, you want to track each user’s contributions to each note. I have not yet found an open source database with user difference engine included. This is a great opportunity, if I get this far I try to solve the problem again. Tilting at windmills got us this far, one has to preserver.