The scope:
Maybe I was wrong about the scope of the project. I was convinced of a new version of server-manager and the progressive replacement of FormMagick.
Replacement of FormMagick with a different templating system was the real task.
As you will find, server manager is a deep dark rabbithole. To replace more will mean ripping out and rewriting a lot of perl code.
Trying to separate parts of that and replace it with something else, be it perl or PHP or cockpit is not easy (just ask nethesis.....)
So the 'simplest' task is to focus on replacing FM. Hence my approach. It does not to be complicated, or be a running application.
Just separate the style from the content/function.
This would be a big leap forwards.
I did this as a proof of concept with some mojo templates and a rough but working bootstrap responsive UI, but no one seemed to bother looking, or just ignored it.
Once you have that out of the way you can look at a number of different dev pathways
I believed we could build an accessible API 'layer' using Mojo on top of the existing perl functions (why reinvent the wheel?).
The great thing about mojo is that it is as happy outputting html as it is json.
So then you can build any frontend, anywhere, in any language, and link it via the API.
What no one has said to me so far about my test code is 'you can't do it that way because of x y or z technical reason'.
So, all anyone has to do is convince me of a better path.
I see your 'full working version' and yes, if you were building from the ground up then that is probably the right approach.
But I think it might be overkill right now (I do not know how much is required in the way of routes/controllers etc if we JUST try and replace the templates)