Closed christianbrb closed 3 years ago
without a hosted environment
does that mean no external dependencies at all?
We can give it a try if you can use the gh_pages branch sources in the browser without the need for any server. If it works maybe we can pack a version of the dApp in an archive and allow the users to extract and run locally from the browser.
In Chrome v73 and later we can already install the Light Client as a Chrome App:
It then installs it as a PWA locally and starts it in a "native window". Still requires a hosted version to fetch updates from though. It can then be started by typing chrome://apps into Chrome and clicking on raiden-dapp.
Not sure but depending on exact requirements it could already be sufficient
Nice finding @nephix, thanks @kelsos for the the seamless PWA implementation. The local static files from gh_pages
branch is also a nice option, although we need to check if everything behaves properly when served from local filesystem on Chrome & Firefox. Just let's not go the cursed Electron route on this issue.
@andrevmatos to check, if PWA works with MetaMask
@kelsos proposed to do this with Electron
@kelsos proposed to do this with Electron
I wouldn't say I proposed to do this with Electron. Rather, I said if the other ways to do it are not acceptable and we have to go the electron way then I can help because I have some prior experience with Electron and Vue :)
Ok, I hear your excitement 🤣
We should check
@andrevmatos @weilbith @kelsos Who has got time to do some pre-iteration research on this?
I just checked here, and Metamask is definitely fully available for PWAs on Chromium. Would it be enough to provide it, and point to the serve_pr
script or full local build/serve if the user needs further control?
I just checked here, and Metamask is definitely fully available for PWAs on Chromium. Would it be enough to provide it, and point to the
serve_pr
script or full local build/serve if the user needs further control?
The problem with serve_pr
is that it requires some technical skills, if the local version is targeting non-technical users I don't think it would work that easy.
The proposal from Kelsos:
The proposal from Kelsos:
* Pack an express app with a node backend which serves the application * Leave the user to use MetaMask * Run in the local browser
The only problem I see with this approach is that the user might not know/understand how to stop the application properly. The same happened with the wizard running as a bundle from a terminal.
The proposal from Kelsos:
* Pack an express app with a node backend which serves the application * Leave the user to use MetaMask * Run in the local browser
The only problem I see with this approach is that the user might not know/understand how to stop the application properly. The same happened with the wizard running as a bundle from a terminal.
I don't see how that is a problem. This could be easily solved if you add a terminate endpoint to the "server" and some packaged mode customization so that the user can terminate the server directly from the dApp. I think the WebUI is doing a similar thing with the python client already.
Btw the server doesn't have to be node either, you could easily do a small flask backend packaged with PyInstaller that can produce binaries for Linux/OSX and Windows.
To check, if it works as a progressive web app:
@andrevmatos Could you roughly check the PWA concept.
Ok, I think it is not working on a lot of browsers: https://caniuse.com/web-app-manifest
I have found this articles: https://almbok.com/kb/progressive_web_application https://web.dev/progressive-web-apps/
PWA seems to work on MetaMask Mobile: https://github.com/MetaMask/metamask-mobile/issues/1966
It seems to mainly work on mobile.
Just for completness. There is a PWA plug-in for Vue: https://axelhodler.medium.com/caching-in-a-vue-js-pwa-845233696072 https://vuepress.vuejs.org/plugin/official/plugin-pwa.html
Edit: Caching question moved to #2382
If not there is another way of building offline available web pages: https://vueschool.io/articles/vuejs-tutorials/vue-js-performance-mastering-cache/ https://samvloeberghs.be/posts/lessons-learned-on-offline-capabilities-with-service-workers-using-workbox/
We use that already if I'm not wrong.
Closing this one as it has a long discussion and the scope is not clear any more.
First we are going to fix https://github.com/raiden-network/light-client/issues/2382
If need we are going to create a new issue for using the service worker / cache offline capability.
User Story
As Chris, I want to easily install the dApp on my local system so that I can test it without a hosted environment.
Acceptance criteria