An experiment to convert superchargehq.com into a desktop application. Electron Quick Start Guide: www.electronjs... Website: superchargehq.com LinkedIn: / shivam-mathur-g10 Blog: / shivam_g10
hello shivam I have a issue that I have converted one of the website using electronjs and nativefier and I want to change the task bar icon which is electrons icon with my icon can you give me solution for it.
There is a command line --icon option in electron build step and you can add an icon property in BrowserWindow as well. As for nativefier, I haven't used it personally but if you're facing issues then there seems to be an open issue for this which is quite old and many people have found work arounds to do this. Hope this helps github.com/nativefier/nativefier/issues/321
You can change the BrowserWindow to use your Django web url. As long as there is no "open in new tab" link, it should behave like a normal application. Incase you have something that opens like that then it will open a new application window. An example of this is there in this video towards the end when I'm testing the results.
great video! thanks a lot. Do you maybe also happen to know the best practise to convert the web app without building it? so that after the conversion, the app can be developed for further features?
If you find a way please tell me. Node.js does the same exact thing shown in this video... with Edge app shortcut i have no control over size and position and it shows urls.
@@shivam_g10 I discovered electron-builder and electron-forge, electron-builder being the most easiest because somehow I found a way to edit the app name and the icon image.
What I've displayed is a front end Desktop App that uses Rest APIs. Stack here is Vanilla JS built with webpack. React and Angular will also build static front end files in the same way that I've shown. For adding database we can use embedded databases like SQLite. Bundling Postgres and others is not possible. You can obviously install them separately and connect to them to the electron app. You can look into installer options if more flexibility is required.
@Ebizzill That website was a product I was making so there's no tutorial for it unfortunately. The electron bit should work with any framework related project that generates static files for front end. I modeled the build process for that project by looking at react and angular.
@kevinmwangi6782 Since the background process in electron runs node you can connect mongo db in the same ways that you can connect with node. You have a lot of flexibility on this.
Playwright has experimental support for electron: playwright.dev/docs/api/class-electronapplication This repository is a good reference if you're doing it for the first time. github.com/spaceagetv/electron-playwright-example There are eslint dependency issues with it, but those dependencies can be removed to make it run and understand how electron and playwright play together. Hope this helps :)
The angular part of it can be changed to desktop app. That's what I showed in the video. My app is still connected to the backend via rest APIs and the front end was converted to a desktop app
Might be a bit late to comment, but you can, did this just for fun, it converted my Laravel project with Filament php to a desktop app, just remember to make nodeIntegration to false in BrowserWindow, so that you get a smooth experiance.