Electron is a framework for building cross-platform desktop applications using web technologies (JavaScript, HTML, and CSS). The repository at httpsNaN-NaN combines the Chromium rendering engine with the Node.js runtime, exposing platform APIs for macOS, Windows, and Linux through a unified JavaScript interface README.md9-12
The Electron repository serves as the central hub for the framework's development, containing:
shell/ that bridges Chromium browser APIs with Electron's application-level logic docs/development/pull-requests.md67-68lib/ that provide the developer-facing interface docs/development/pull-requests.md69docs/ and a comprehensive test suite in spec/ docs/README.md1-20 docs/development/pull-requests.md70Sources: README.md9-12 docs/development/pull-requests.md65-71 docs/README.md1-20
Development Infrastructure:
package.json docs/development/pull-requests.md165-171Core Native Layer (shell/):
NativeWindowMac, NativeWindowViews) docs/README.md110JavaScript API Layer (lib/):
app for lifecycle management, BrowserWindow for UI, and session for network/storage docs/README.md107-133ipcRenderer for communication and contextBridge for secure API exposure docs/README.md146-147Sources: docs/tutorial/tutorial-2-first-app.md130-134 docs/README.md105-155 docs/tutorial/electron-timelines.md3-4 docs/api/process.md111-120
The following diagram illustrates how repository entities relate to the functional layers of the framework.
Key Directories:
| Directory | Contents | Purpose |
|---|---|---|
shell/ | C++ source code | Core native implementation and Chromium integration |
lib/ | TypeScript/JavaScript | Electron's internal JS logic and public APIs |
docs/ | Markdown files | Official guides, tutorials, and API documentation |
spec/ | *-spec.ts files | Automated test suite for all Electron APIs docs/development/pull-requests.md70 |
patches/ | .patch files | Custom modifications to Chromium and Node.js docs/tutorial/electron-versioning.md29 |
For detailed directory organization, see Project Structure.
Sources: docs/development/pull-requests.md65-71 docs/README.md105-155 README.md38-46
Electron's APIs are typically split between a JavaScript wrapper and a C++ binding that interacts with Chromium's internals.
Implementation Pattern:
lib/, handles argument parsing and high-level logic.shell/browser/api/, uses Gin/V8 to expose native methods to JavaScript.content layer or Views system to perform native actions.Sources: docs/README.md105-149 docs/tutorial/tutorial-2-first-app.md130-134
Electron uses a multi-process architecture to ensure stability and security, separating the system-level "Main" process from the web-rendering "Renderer" processes docs/tutorial/tutorial-2-first-app.md130-134
app module docs/api/process.md114 It creates BrowserWindow instances.ipcMain and ipcRenderer modules docs/README.md117-147For detailed process architecture, see Core Architecture.
Sources: docs/tutorial/tutorial-2-first-app.md130-134 docs/api/process.md111-120 docs/README.md24
Electron follows a strict release cadence and versioning policy:
For detailed build system information, see Build System.
Sources: docs/tutorial/electron-versioning.md17-25 docs/tutorial/electron-timelines.md24-26 docs/tutorial/electron-timelines.md65