Consider Tauri (or one of its simpler competitors) or CouchDB in place of custom backup server
Opened this issue · 4 comments
DISCLAIMER: I haven't tried this, just going off the advertising that is really enticing. (I found NullBoard looking for an easy self-hosted project tracker to help work on some app ideas of my own, so I'll hopefully be trying Tauri in the near future.)
Tauri is supposedly (if I understand correct) a lightweight yet more robust alternative to Electron that bundles a frontend app and its backend server, runs the frontend using the system web UI, and is cross-platform.
So, for instance, instead of building a NullBoard Agent for each OS and having to run it in the background separately from the front-end, the Agent and the single-page app could be bundled into a single application (and should hopefully work on all desktop OSes).
The single-page app would still be useable as an HTML file without the local backups, since Tauri is designed (again, if I understand correctly) such that in practice the frontend and backend still communicate over HTTP just like a web app.
(One thing I don't know: Tauri's support for localStorage… Well, but it would be straightforward to implement a localStorage alternative that sends data to the backend where it's saved as a file, I suppose.)
I'll admit, I admire the system tray solution to managing a background server for a local web application – I wanted to build apps this way myself around a decade ago, but didn't figure out a good way to get the system tray bit on all three OSes. Same time period where I wanted to do the export/import trick that NullBoard is doing but FileReader wasn't well supported so while export was easy import wasn't doable without a backing "server" app. I even had a page where list items were editable and could be added and deleted, though I never worked out a satisfactory method for saving and it wasn't as robust nor as featureful as NB.
Thanks a ton for NullBoard! 🚀
I've done a little more poking around and this discussion mentions a couple similar options, "Wails" and "Neutralino" I think. tauri-apps/tauri#3521 The accepted answer suggests that Neutralino may be the simplest if all you want is to make a static website have its own frontend (instead of running localhost and connecting from your regular browser with all its tabs) without bundling Chromium (instead relying on system web views). On the other hand, if you want to bundle the agent or something like it… I'm still figuring that out.
CouchDB might be a decent alternative to having a custom backup agent, if the backups are just JSON. It stores JSON and it has an HTTP interface. As simple as it gets. But I don't know if it has a system tray or something to show that it's still running. And as far as I can tell it doesn't provide its own window to display the HTML but still expects you to open your browser and navigate to localhost, even if you store the webpage itself inside CouchDB (this is apparently a thing called "CouchApps", which is interesting).
For those who still want a separate app for Nullboard, you can check out my fork at https://github.com/hauptkern/thinboard. It has an installer and can even work on older systems like XP and Vista!
The advantage of using one of these other webapp-as-desktop-app or separate JSON DB options, is that it would free Nullboard's backup system from being Windows-only.