Creating a desktop application with Electron.js

nimbus

Why build a desktop app for Nimbus?

Nimbus is an open-source application that allows developers to monitor their serverless backend hosted on AWS. Even though Nimbus was already available as a web app, we decided to also distribute it as a desktop app for two main reasons:

  1. A desktop app can provide a more seamless and intuitive user experience compared to a web application, as it allows users to quickly access important metrics related to their server-less components.

  2. Desktop apps can interact with local resources, which opens the door to features such as push notifications.

Problem

During the beta phase, our team frequently pushed updates to production and we wanted to ensure that users always had access to the most recent version of Nimbus without downloading a software update.

Solution

I used Electron.js to build a desktop app that points directly to our web app. The Electron app does not contain any of the code from Nimbus - it is merely a shell with a URL that links to the web app.

Packaging and distribution

For packaging and distribution, I used electron-forge.js. This user-friendly library combines many existing Electron tools (e.g. electron-packager, @electron/osx-sign, electron-winstaller, etc.) into a single interface, which facilitated the process.

I signed the app with Mac Developer credentials to distribute it to macOS users. Here’s what this looks like in the codebase:

app-sign-code

Finally, I made the desktop app available for download by storing it in a public S3 bucket and providing the link to it on our landing page nimbusos.io.