Foundations and setup
Decide if Electron fits the app
Compare Electron with a website and native development before committing to a desktop application.
Electron is a good fit when the product needs desktop capabilities and you want to reuse your web skills. Both conditions matter. If you only have one of them, another option is probably better.
My advice is to start from the requirement, not from the framework you’d like to use:
| Requirement | First option to consider |
|---|---|
| Share by URL with no installation | Website |
| Local files, native menus, offline desktop workflow | Electron |
| Smallest download or deepest platform integration | Native app |
| Existing web product with a focused desktop companion | Electron or a thin native shell |
A website wins whenever a link is enough. A native app wins when download size or deep OS integration is the whole product. Electron sits in the middle: one codebase, real desktop behavior, a bigger download.
What Electron does not remove
Electron removes the need to build three separate native interfaces. It does not remove platform work.
Menus follow different conventions on macOS and Windows. File paths differ. Installers differ. Code signing is a separate process on each platform. Permissions and update behavior differ too. You will still test on every operating system you ship to.
Write the decision down
For Desktop Notes, I like to write a short decision record before touching any code:
Desktop-only needs: offline notes, native export, application menu
Supported platforms: macOS and Windows
Accepted costs: larger download, two release pipelines
Reason a website is insufficient: notes must work fully offline
Four lines. That’s enough to make the tradeoff visible to you and to anyone who joins later.
Make it measurable. Set a download-size expectation, list the operating systems you will test, and name who owns security updates. When Electron ships a security release six months from now, someone has to update the app. Decide who, now.
The case where I’d say no
A common mistake is wrapping a remote website in an Electron window and calling it a desktop app. The result is a browser that only opens one site, plus a release pipeline you have to maintain forever.
If the app only displays a remote page, you took on all the security and packaging responsibility and got almost nothing in return. Choose Electron because desktop behavior matters: local files, native dialogs, working offline. That is the test we apply to Desktop Notes in the next lessons.
Lesson completed