desktop▌
lobehub/lobe-chat · updated Apr 8, 2026
LobeHub desktop is built on Electron with main-renderer architecture:
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
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
Location: packages/electron-client-ipc/src/types.ts
export interface SomeParams {
/* ... */
}
export interface SomeResult {
success: boolean;
error?: string;
}
3. Create Renderer Service
Location: src/services/electron/
import { ensureElectronIpc } from '@/utils/electron/ipc';
const ipc = ensureElectronIpc();
export const newFeatureService = async (params: SomeParams) => {
return ipc.newFeature.doSomething(params);
};
4. Implement Store Action
Location: src/store/
5. Add Tests
Location: apps/desktop/src/main/controllers/__tests__/
Detailed Guides
See references/ for specific topics:
- Feature implementation:
references/feature-implementation.md - Local tools workflow:
references/local-tools.md - Menu configuration:
references/menu-config.md - Window management:
references/window-management.md
Best Practices
- Security: Validate inputs, limit exposed APIs
- Performance: Use async methods, batch data transfers
- UX: Add progress indicators, provide error feedback
- Code organization: Follow existing patterns, add documentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★45 reviews- ★★★★★Advait Liu· Dec 16, 2024
Useful defaults in desktop — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Yuki Diallo· Dec 8, 2024
Keeps context tight: desktop is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Advait Nasser· Nov 27, 2024
desktop is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Evelyn Rahman· Nov 3, 2024
Registry listing for desktop matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Yusuf Nasser· Nov 3, 2024
Solid pick for teams standardizing on skills: desktop is focused, and the summary matches what you get after install.
- ★★★★★Yuki Harris· Oct 22, 2024
Useful defaults in desktop — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Advait Wang· Oct 18, 2024
Solid pick for teams standardizing on skills: desktop is focused, and the summary matches what you get after install.
- ★★★★★Yuki Mensah· Sep 25, 2024
desktop reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Piyush G· Sep 17, 2024
desktop fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Amelia Abbas· Sep 9, 2024
We added desktop from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 45