lobehub avatar

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-code

Installs into .claude/skills of the current project.

Files

Desktop Development Guide

Architecture Overview

LobeHub desktop is built on Electron with main-renderer architecture:

  1. Main Process (apps/desktop/src/main): App lifecycle, system APIs, window management
  2. Renderer Process: Reuses web code from src/
  3. 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
1grafana avatarskill-authoringgrafana/skillsAuthor, audit, and improve Grafana SKILL.md files against Anthropic's published Agent Skills guidance and the four-dimension rubric the grafana/skills CI gate u4.2Kskills.sh installs
2egonex-ai avatarunderstand-onboardegonex-ai/understand-anythingUse when you need to generate an onboarding guide for new team members joining a project4.2Kskills.sh installs
3dotnet avatarmigrate-dotnet10-to-dotnet11dotnet/skillsMigrate a .NET 10 project or solution to .NET 11 and resolve all breaking changes. This is a MIGRATION skill — use it when upgrading from .NET 10 to .NET 11, NO4.1Kskills.sh installs
4plannotator avatarhtmlplannotator/effective-htmlCreate or redesign self-contained single-file HTML artifacts with a visual direction shaped by the user's brief, project, and subject. Use when HTML is the deli4.1Kskills.sh installs
5softaworks avatarprofessional-communicationsoftaworks/agent-toolkitGuide technical communication for software developers. Covers email structure, team messaging etiquette, meeting agendas, and adapting messages for technical vs4.1Kskills.sh installs
6kostja94 avatarcopywritingkostja94/marketing-skillsWhen the user wants to write or optimize short-form marketing copy—headlines, CTAs, ad copy, landing page copy, email copy. Also use when the user mentions "cop4Kskills.sh installs