I originally built this app using the nocode site Glide with the data held on a GoogleSheet. However significant changes to Glide platform meant that I would need to rebuild the app from scratch. So I challenged myself to rebuild it in TW so that its future was more in my own hands rather than a third paty platform.
I tried to minimise the use of plugins and much of the layout and functionality is with some tweaks to core and some CSS. Also hiding the sidebar and making it read only.
The main plugins that it is dependant on are Leaflet, Shiraz Dynamic tables and Spotlight.
I also wanted a better mobile experience, like the bottom minimalist toolbar and the option to install as a PWA.
My build is done in node.js which is exported as a single file wiki. That gets uploaded to a web directory that has a Service Worker (js file) already waiting. I hand crafted the service worker to get it to do what I wanted from the PWA.
You should get a prompt after 15 seconds asking if you want to install. Depending on your browser you will get a web shortcut or a full PWA App install.
Some of the content - pictures and Bible verses are not cached so to get the best experience you do need a web connection.
I used a couple of online tutorials to learn how to create the manifest (manifest.json) and service worker (sw.js) files. I wanted to know exactly how these parts worked and what my options were.
I also found I needed to add some html to the TW index.html head and body so that it worked with the manfest.
This was done using tags $:/tags/RawMarkup and $:/tags/RawMarkupWikified/BottomBody to add HTML to <head> and <body> sections of final page. See pwaHTMLheader and pwaHTMLbody.
I do want to learn how to create a TW PWA so I start by copying an already working PWA. I exported all Paul’s Address Book tiddlers as .json and imported them into a fresh TW.
Even though in surface the cloned wiki looks like the original Paul’s TW, the service worker and the manifest are not there so I do suspect that this functionalities are not coded within a tiddler or were not exported as the rest of the tiddlers…
Yes, the service worker and manifest are completely seperate and external to the TW file.
I read up a couple of guides to creating these elements:
There are plenty of others around and you should be able to pickup the tweaks you want to get the desired final product.
Once they are in place on the server (hosting) you can upload your TW file (in my case exported from a node.js set-up).
I can see packaging it all up so that the manifest and service worker files were created from a TW Plugin would be really smart - but too far up my learning curve!