
Desktop
This walks you through LobeHub's Electron architecture, which splits desktop work across main process controllers, preload scripts, and renderer services that reuse web code. You'll use it when wiring up IPC handlers, managing windows, or building desktop-specific features. The guide is formulaic but practical: it shows you exactly where files go, how to register controllers in the registry, and how to type your IPC calls in the shared package. The references folder promises deeper dives on menus and local tools, though those aren't included here. It's clearly documentation extracted from an active codebase rather than generic Electron advice, so you're learning their conventions, not just the framework.
- skills.sh installs
- 4.2K
- GitHub stars
- 84.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add lobehub/lobehub --skill desktop --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/lobehub/lobehub
- Category
- Documentation
- First seen
- Apr 16, 2026
More from lobehub/lobehub
All 26- Modal4.2K
- Add Setting Env4.2K
- Linear4.1K
- Hotkey4.1K
- Add Provider Doc3.9K
- Microcopy2.5K
- Version Release2.4K
- Store Data Structures2.4K
- Pr2.3K
- Upstash Workflow2.3K
- Debug1.5K
- Recent Data863
- Data Fetching812
- Vercel React Best Practices489
- Db Migrations248
- Spa Routes204
- Chat Sdk201
- Agent Tracing195
- Zustand6.9K
- React5.7K
- Drizzle5.5K
- Typescript5.2K
- I18n4.7K
- Project Overview4.4K