
Desktop
lobehub/lobehubOfficial
Electron desktop development guide covering controllers, IPC types, renderer services, and window management.
- skills.sh installs
- 4.2K
- GitHub stars
- 86K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers main-renderer architecture: main process controllers, renderer code reused from
src/, and preload scripts - Walks through adding a feature: controller, IPC types, renderer service, store action, and tests
- Includes reference guides for feature implementation, local tools, menu configuration, and window management
- Directs logs to
<userData>/logsand reads them withpnpm --dir apps/desktop logsfilters, nottail
Install
$ npx -y skills add lobehub/lobehub --skill desktop -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Desktop Development Guide
Architecture Overview
LobeHub desktop is built on Electron with main-renderer architecture:
- Main Process (
apps/desktop/src/main): App lifecycle, system APIs, window management - Renderer Process: Reuses web code from
src/ - Preload Scripts (
apps/desktop/src/preload): Securely expose main process to renderer
Both processes log to <userData>/logs/{main,renderer}.jsonl in dev and packaged
builds (apps/desktop/src/main/utils/structuredLog/); read them with
pnpm --dir apps/desktop logs list|query|follow (filters: --level, --since,
--operation op_…, --topic tpc_…) instead of tailing files.
Adding New Desktop Features
1. Create Controller
Location: apps/desktop/src/main/controllers/
import { ControllerModule, IpcMethod } from '@/controllers';
export default class NewFeatureCtr extends ControllerModule {
static override readonly groupName = 'newFeature';
@IpcMethod()
async doSomething(params: SomeParams): Promise<SomeResult> {
// Implementation
return { success: true };
}
}
Register in apps/desktop/src/main/controllers/registry.ts.
2. Define IPC Types
Details
- Repository
- github.com/lobehub/lobehub
- Categories
- Frontend & UI Code, Code Review & Quality, CLI & Terminal
- First seen
- Apr 16, 2026
More from lobehub/lobehub
All 21Similar to Desktop
More Frontend & UI Code
electron-developmentmindrally/skills1.5K installsElectron development guidelines that enforce process separation, context isolation, and validated IPC for desktop apps.
electron-desktoptravisjneuman/.claude235 installsCross-platform Electron guide covering secure main, preload, and renderer architecture for Windows, macOS, and Linux.
moai-framework-electronmodu-ai/moai-adk193 installsElectron 33+ desktop development guide covering Main/Renderer architecture, type-safe IPC, security defaults, and packaging.
electron-devjamditis/claude-skills-journalism319 installsElectron desktop app patterns covering secure IPC, Fuses and ASAR integrity, tray, PTY terminals, WebRTC, and packaging.
spa-routeslobehub/lobehub206 installsShared desktop router, route segments, and features boundary guide for the SPA's Web and Electron routers.