Search code examples
javascripthtmlcssdesktop-application

How to create website-based desktop application for Windows, Linux and MacOS?


I have one but a bit complicated question.

To complete my project, I need to create an application for computers in 100%. It is to support both devices with Windows as well as those based on MacOS and Linux.

The application itself is supposed to contain several elements from its "cousin" which is the website. More specifically, it is supposed to be a login and a message system. It would be best if I could just create a folder "Application", copy any files I want with the pages and resources I want to it (simply put - any structure) and somehow convert it to the appropriate filesystems for the above-mentioned filesystems.

And now the question comes - are there suitable pages, packages for this, or maybe I have to write this application myself?

Most importantly - let me add that the only programming languages I know are JavaScript, HTML and CSS, so this task may be difficult.


Solution

  • Electron is a very popular approach for this sort of thing. Using front-end code (HTML, JS, CSS), you can construct an application (which essentially runs a webpage - or few) and then make it executable in any environment.

    If you need any (privileged) backend code, you can write it in Node (in Electron's main process) and have it communicate to the page script through the preload script.