Starting the LiteDB Portal Project, a story

Necessity is the mother of invention. I’m working on a project where it seems that storing and manipulating documents is the way to go instead of the relational database route. Maybe it’s too much time having worked with Mongo but it just feels naturally to me. The go-to embedded database is of course SQLite so I start up with that and some of the new document processing capabilities that it has. Then it occurred to me to ask if there is a NoSQL Document database equivalent to it. Sure enough LiteDB is one and it is built natively for .NET. After using it a bit it was clear I needed to inspect and manipulate the data stored in it not just in my app but on the side. While the website shows literally half a dozen ways to do it literally all of them are stuck to running only on Windows. After a few days of suffering through a Windows VM with that being the only reason I decided to take some of my newfound skills with Avalonia and build a client that can run on Linux, Mac, and Windows too. This begat LiteDB Portal .

LiteDB Portal Release 1 Screenshot

LiteDB Portal Release 1 Screenshot

The idea to “just do it” came to me the weekend before Thanksgiving. I had been struggling with determining what was happening to the data I was shoving into the database while I was trying to fight a weird time interval processing bug. It was then that I discovered that there were no unsigned types in the BSON spec and that may have been causing the problems (although part of it was definitely a logic error elsewhere). I am just in the beginning of the other project and I figured the ability to peer into the data was only going to get more critical as time went on. What if I at some point wrote a client that could do the types of things that LiteDB Studio (the project’s in-house viewer) did but in a cross platform way? It was holiday week and I had other things to do on my main project but eventually, maybe one day, I’d move on to write it. Then Thanksgiving hit.

Thanksgiving morning I just did some light tweaking of the application for one of my main projects and then did cooking and socializing the rest of the day. At bed time though I couldn’t sleep. The “just do it” vibe was grabbing me. It couldn’t be that hard to whip up something at least marginally useful to me. The UX for the LiteDB Studio worked well enough and was pretty simple. Then I was thinking why not emulate some of Robomongo , which I was familiar with. But of course this was going to distract from my main projects which is totally not the point…or would it help me in the end. I finally fell asleep but was in one of those moods where I had working dreams. When I woke up in the morning I decided that with the long weekend I would make it a hard press to get out an MVP Release 1 of this new LiteDB Browser/Viewer.

I was already very warmed up on Avalonia since I’m using it on two other projects right now. I was also obviously pretty warmed up on LiteDB too. It was really a question of avoiding unnecessary “nice to haves” and get to the core part of the project. I had to come back up to speed on some parts of Avalonia which gave me trouble before (the dreaded Tree View). I was going to have to skip trying to reproduce the hyrbid tree/grid view used in Robomongo for its hierarchal resusts browser. I was going to have to skip out on the desire to have syntax highlighting and IntelliSense when the integration of the AvalonEdit control seemed to be obviously pretty complex on a good day. Since the idea was to make this useful for others as well and to release it as FOSS I did need to do more polishing than I would for an internal tool and plan to make some documentation.

I had hoped that by focusing a lot on it over the weekend that I’d be able to get a good enough start that I could at least start using it and then slowly, maybe over the next month, get it up to a state I’d call “Release 1”. I ended up making so much progress and putting in enough hours that I hit that goal by this morning. Today I squeezed in a few more hours to finish up some initial testing, to write documentation, and to write a manual. There are still many features I’d like to see in it. There are features that I know I’m going to need but I don’t know which of those they will be yet. I know I’d like to make the UI a bit prettier, and some of the code for it too. I know there are stability problems which I’ve already run into but that are intermittent so not worth tracking down yet. All of those things I’ll deal with as I need to and in subsequent releases. I’m just stoked I was able to get usable and shareable piece of software out in under a weekend that I think others in the world will find useful as well. Even if no one else does I’m glad I could write it for myself and put it out there.