Nimiq Hub can take as parameter a promise, so, it's possible to push the order to IPFS and instead of waiting, calling the Hub directly with a Promise that resolves when IPFS returns the file hash. This way, Nimiq Checkout can start syncing while we wait for the hash from IPFS.
Besides being nice enhancement, if IPFS takes long, the browser will refuse to open the window (300ms limit for user interaction handlers!) - so this fix will avoid such an edge case by opening the window right away.
Create a web worker in the shop backend #7 or during setup #6 that will in regular intervals (24h?) get orders from the storage #4 and show a push notification if there are new ones.
The backend (the files from /backend/) should be available via GitHub Pages that that people can set up the shop without having to pull the code and run it locally.
Could the webpack be set up to automatically build the latest version of backend into, for example, docs/backend? (that way it would be deployed to GitHub Pages)
Right now the JS file is impressive 5MB big - still 1.3MB GZipped. Most of it AFAIK IPFS.
It's half size with minification, but that currently breaks IPFS.
Need to find a solution.
Could be:
Code splitting: at least in the frontend, the heavy IPFS could be loaded later w/t a problem
Repace the IPFS implementation:
Use the official client lib, i.e. don't start a node in the browser, just use an HTTP gateway
Try IPFS lite - neither official nor the full functional range but should be enough for storing and getting files