# Electron
Electron is an open-source framework for building cross-platform desktop applications with web technologies ([[JavaScript]], [[TypeScript]], HTML, CSS). It bundles Chromium and Node.js into a single runtime, so a single codebase ships on Windows, macOS, and Linux.
It was originally developed at GitHub as the shell for the Atom editor (2013), and was released as a standalone framework in 2014 under the name Atom Shell before being renamed to Electron in 2015. It is maintained by the OpenJS Foundation.
Many widely used apps are built on Electron: [[Obsidian]], Visual Studio Code, Slack, Discord, WhatsApp Desktop, Microsoft Teams, Notion, Figma Desktop, Cursor, 1Password, and more.
## Architecture
- **Main process**: Node.js runtime; manages app lifecycle, native APIs, windows
- **Renderer processes**: Chromium instances rendering the UI (one per window)
- **IPC**: Communication between main and renderers via `ipcMain` / `ipcRenderer`
- **Preload scripts**: Bridge scripts with access to both DOM and Node.js (used to expose safe APIs via `contextBridge`)
## Strengths
- Huge ecosystem; use any npm package, any frontend framework
- Consistent rendering across platforms (bundled Chromium)
- Mature tooling: auto-updater, code signing, notarization, crash reporting
- Massive talent pool; any web developer can ship desktop apps
## Trade-offs
- Large bundle size (typically 80–150MB per app because Chromium + Node are bundled)
- High memory footprint; each app ships its own browser engine
- Security surface is non-trivial; requires discipline around `contextIsolation`, `nodeIntegration`, and sandboxing
- Native feel is approximate; not truly native widgets
## Alternatives
- [[Tauri]]; Rust back-end, system webview; much smaller binaries
- [[ElectroBun]]; Bun + Zig + system webview; TypeScript only
- Native toolkits (SwiftUI, WinUI, GTK, Qt)
## References
- Official website: https://www.electronjs.org
- Documentation: https://www.electronjs.org/docs/latest
- Source: https://github.com/electron/electron
- Apps built with Electron: https://www.electronjs.org/apps
- Blog: https://www.electronjs.org/blog
## Related
- [[Obsidian]]
- [[Tauri]]
- [[ElectroBun]]
- [[JavaScript]]
- [[TypeScript]]