Developer Overview
- BaseModule: lifecycle =
created → onInit → start → stop → onDestroy. - Plugin Capsule: every plugin runs in its own process, described by a manifest.
- Channel System:
ChannelType.MAIN and ChannelType.PLUGIN handle IPC with promise-based replies.
apps/core-app/
├── src/main/ # main process, modules, channels
├── src/renderer/ # renderer (Vue 3)
└── ...
plugins/
└── my-plugin/
├── manifest.json
├── init/
│ └── index.ts
├── preload/
└── src/
- Load – manifest is parsed and entry scripts are registered.
- Init –
init/index.ts runs with context (logger, storage, channel). - Run – plugin listens to events, renders UI, or exposes services.
- Destroy –
onDestroy clears timers, listeners, and temporary files.
- File access is scoped to the plugin directory.
- HTTPS calls are allowed; sensitive domains must be declared.
- Storage API enforces the 10 MB quota per plugin.
pnpm core:dev launches Electron with hot reload for plugins.pnpm utils:test validates shared SDK behavior.pnpm core:build:snapshot ensures the packaged app loads your plugin.