Is there a good webview-based thin client example app for Electron?


#1

I am getting started with Electron and would like to build a simple desktop app that just opens an existing webapp using a URL and renders everything the same way as if the user was using their own installed Chrome web browser. The user would’t have any ability to navigate away from the webapp URL. it would just load a specific URL and act as a thin client for the current app but also have the ability to evolve into something more as we iterate with updates going forward. It doesn’t need web browser features like an address bar that is visible to the user, etc since we want this to be locked to the URL, etc. Is there an example already that does pretty much this same type of thing so I don’t have to reinvent the wheel?


#2

You can use nativefier to do that instead of wasting your time coding it.


#3

Wow - appears (at least after testing for the first 5 minutes) to be exactly what I was setting out to code, at least initially.

It seems that it built for the platform I was on, OSX.

I assume there is a way to get it to build for all 3 platforms (mac,windows, ubuntu)? Will it all be from within the same project code base?

Once initially created using the command line scaffolding, will the resulting project be able to handle being extended and updated so users only need to download and install this once, then when we apply updates to this “thin client” (making it thicker ever so slightly), it will be able to notify the user that an update exists and they can “Download & Install” in a nice platform specific manner?


#4

Yes, check this out for the target platform.[quote=“patakijv, post:3, topic:41610”]
Once initially created using the command line scaffolding, will the resulting project be able to handle being extended and updated so users only need to download and install this once, then when we apply updates to this “thin client” (making it thicker ever so slightly), it will be able to notify the user that an update exists and they can “Download & Install” in a nice platform specific manner?
[/quote]

Nativefier just wraps the URL, why would you want to update the “thin client”? You should update your webapp instead.


#5

Thanks, I did find the --platform option and the rest of the options for building. It seems like it is a good tool if all you want is to wrap a webapp as a desktop app and be done with it.

The goal here however is to build a thin client that starts out just as wrapper around a webapp but then can be extended and updated to have new local-to-client features. Capabilities like offline usage require more than what you can do within the scope of a webapp-only solution, which is why we want a thin client desktop app even if it starts out its life as a webapp only. Hence, that is why we want to build a webview-based Electron app to start and looking for a good example to start with.

If Nativefier does its thing using Electron as a base and is essentially an automated build tool, then I would think whatever we intended to code into an Electron app could be added or integrated into the project so after Nativefier builds the base project, no? I will dig more into this later to find out.


#6

Oh, well anyways, check this out


#7

Interesting. UpUp appears to be geared towards storing locally already rendered content from a particular (static?) page, correct?

In our case we want to add local offline capability where pages, content, assets that may not have been rendered already by the user may need to be available through an initial downloading step performed while online. I.E. a “Enable Offline For This Category” button to click and then the app can download a database or a large collection of files like PDFs or map tiles, etc. to the local client for future rendering even they have not yet been rendered from the server for the user. Then the app can switch to able to load and interact with the database or view pdfs locally if the user is offline. When the app is online, it would return interacting with the webapp from the server and even sync the category local content at that time.


#8

In that case you have to code it yourself instead of using nativefier. Good Luck :smile:


#9

Right, which brings us back to the original question/post, looking for a good example of building an electron webview-based app. The result of the nativefier might be a little overkill as an example since it has a lot of additional coding around it and it doesn’t demonstrate a single project that can be built for multiple platforms (due to its code being part of the node module) but will look at it more closely if I don’t find any other examples.


#10

I’m not quite sure if this, this and this is based on a webview, but would be handy.