Knowfox, my personal knowledge management system, now runs on Laravel 8. This is the latest version of Laravel and comes with some nice features like support for teams that we can soon utilize in Knowfox as well.
This has been really difficult, however, was really easy once I understood how to do it: Knowfox now runs on the latest version of Laravel, version 8. It also is structured as a package, so it should be much easier to upgrade to new versions of Laravel in the future.
Why was it so difficult? Knowfox is a big system. When I started it in 2017, I quickly added many views into the tree of concepts. It was built on Laravel 5, the tightly integrated CSS framework at the time, Bootstrap, version 3.
Then, Bootstrap 4 came along and Laravel quickly dropped support for the older version. However, upgrading every template proved a tedious task. In addition, Bootstrap lacks many features that are needed for the Knowfox editor like tagging and auto completion. Sadly, the external components I used only supported Bootstrap 3. Still, I attemped an update to Bootstrap 4, but never completed it.
When I started to think of upgrading, I also came across an alternative frontend toolkit, UIKit, version 3. I like it a lot. It looks modern, is simple to use and customize, yet very comprehensive and has excellent documentation. I use it for all my little side projects and naturally wanted to use it for knowfox, too.
Meanwhile, Laravel tightly integrated with VueJS, a reactive Javascript toolkit. I developed some Vue components for Knowfox, but felt that while Vue was much smaller that its competitors, React or Angular. it still was a burden to develop with. I looked around and came across MithrilJS, a petite framework that is a joy to work with. The editor was quick to port. But the image uploading and the various list formats dragged on. A simpler approach was needed.
To make upgrading easier, I wanted to convert Knowfox into a set of Laravel packages. At the same time, for another project, I developed a CRUD package for Laravel (CRUD is short for create, read, update, delete, the basic functions of any web app), which already supports UIKit3.
So, I set out to port Knowfox to Laravel 8, using my CRUD package with UIKit3 as its frontend toolkit. And I made good progress. After only a day, I had the editor and lists of concepts working. Then, a user reported a bug and I had to concede that it would probably take a few more weeks until everything was ported.
Then, an insight struck me. It was obviously much too much work to port Knowfox to Laravel 8, convert it into packages and upgrade the UI to a new frontend toolkit, all before I could have an initial launch.
Actually, I rather like the Bootstrap 3 styling and still use Knowfox with it every day. What if I only did the port to Laravel 8 and kept the old styling?
I set to work, made a fresh installation of Laravel 8, including the new Jetstream system, together with the Livewire stack, and installed the original Knowfox repository as well as two other dependencies as Git submodules. After only another day, I had it working locally!
In the evening, I made a backup of my live database and started a test deployment with the new database migrations. It worked smoothly and now Knowfox runs live on the latest Laravel version.
The base repository is now knowfox/base. It pulls in the Knowfox core and frontend from knowfox/knowfox, plus some functionality from knowfox/entangle and knowfox/drupal7.
The integration with Laravel Jetstream is currently rather loose. There is just a simple link between the two. Now that this big hurdle is out of the way, I can continue to work on the integration and even integrate some of the new features like teams and use the new Livewire integration to make the system more reactive. Great times!
While integrating with Jetstream, I lost the passwordless login for Knowfox, at least for the moment. To continue to use the system, you need to set a password. Use the lost password workflow for this:
What have I learned from all this? For side projects, it is of the essence to cut work down to the absolute barest necessities and be ready to launch in the shortest possible time, ideally within one or a few days at most. If you don't do this, work will drag on and you really run in danger to never launch at all, which is the ultimate waste of your precious time.