desktop-architect
Architect-level desktop direction — choosing native, Electron or Tauri from real constraints, the main/renderer and process boundaries, filesystem and OS integration ownership, update and distribution reality, and the resource footprint a desktop app is judged on. Use before any platform-specific desktop skill.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- desktop-architect
- license
- MIT
- metadata
- { "crusor-path": "desktop-architect", "crusor-domain": "desktop-architect", "crusor-origin": "original", "crusor-sources": "electronjs.org/docs; v2.tauri.app; developer.apple.com/documentation; learn.microsoft.com/windows/apps", "crusor-triggers": "desktop app, electron, tauri, native desktop, cross platform desktop, auto update, desktop architecture, ipc, local database, desktop security, update channel", "crusor-verified-on": "2026-10-30" }
- description
- Architect-level desktop direction — choosing native, Electron or Tauri from real constraints, the main/renderer and process boundaries, filesystem and OS integration ownership, update and distribution reality, and the resource footprint a desktop app is judged on. Use before any platform-specific desktop skill.
- compatibility
- Windows, macOS, Linux; native, Electron, Tauri
03 SKILL.md 正文
Desktop Architect
A desktop app is a long-lived local process with real privileges. It can read files, run native code, and live for weeks without a restart — which is exactly why the boundaries matter more than on the web.
When to use
- Choosing a desktop runtime, packaging model, or update strategy.
- A desktop app that must integrate with the OS: tray, file types, hardware, installers.
- Reviewing a desktop plan that has to satisfy enterprise deployment.
When NOT to use
- A web app that happens to be installed — that is the website domain.
- A mobile app running on a tablet with a keyboard.
Leaf map
Five shelves, 19 books.
| Shelf | Books |
|---|---|
runtimes-architect/ |
electron · tauri · native-desktop · native-feel · winui · appkit · gtk |
platform-architect/ |
desktop-ipc · desktop-tray-and-menus · desktop-hardware · desktop-accessibility · desktop-automation · desktop-localization |
data-architect/ |
desktop-offline-storage · desktop-security |
quality-architect/ |
desktop-testing · desktop-telemetry |
delivery-architect/ |
desktop-distribution · desktop-update |
Read the crown, then the one or two books the plan actually needs.
Decision 1 — Runtime choice
| Constraint | Choose |
|---|---|
| team is web-only, needs native modules fast | Electron |
| memory/install size matter, security posture strict | Tauri |
| OS-native UI, deep system APIs, MDM/enterprise | native per platform |
| heavy offline data + long sessions | any, but measure memory over 8h |
- Electron ships Chromium per app (~100 MB+); Tauri uses the system webview (~5–10 MB) and Rust for the privileged side.
- Native means writing the app N times — a product decision, not a technical preference.
- Choose once: hybrid migrations carry both costs.
Decision 2 — Process boundaries
UI (renderer/webview) → no filesystem, no native calls directly
privileged core (main/Rust) → files, network, OS APIs, secrets
OS integrations → keychain, notifications, trays, deep links
- The renderer is untrusted: treat it like a browser tab. A compromised renderer must not be able to exfiltrate the filesystem.
- IPC is a typed API surface: explicit methods, validated arguments, no arbitrary command passthrough.
- Never expose
require,eval, or a genericexecto the UI.
Decision 3 — Local state and data
- SQLite (or an embedded store) for application data; JSON files only for config.
- Large binary assets live on disk, referenced by path — not in a database blob.
- Single-instance enforcement; concurrent writers corrupt state.
- Migrations versioned from v1, run at startup with a backup before destructive steps.
Decision 4 — Offline and updates
- Desktop apps are offline by default; sync is a feature with a conflict policy.
- Auto-update is a security-critical channel: signed updates, HTTPS, and a rollback path. Unsigned updates are remote code execution by design.
- Check for updates on a schedule, on demand, and after long uptime; show what changed and let the user defer.
- The app must behave sanely when the update server is unreachable forever.
Decision 5 — OS integration
- Filesystem access through user-chosen paths (file dialogs), not broad home directory permissions.
- Credentials in the OS keychain (Keychain/Credential Manager/libsecret), never in a config file.
- Deep links / file associations / tray icons declared in the installer manifest, not patched at runtime.
- Respect platform conventions: menu bar on macOS, window controls per OS, keyboard shortcuts per platform.
Decision 6 — Resource discipline
- Memory over a long session is the user-visible metric: leaks surface after hours, not minutes.
- Background polling and timers are budgeted; a laptop battery drain is a bug report.
- Cold start under 2 s, first interaction under 1 s, measured on a mid-tier machine.
Failure modes at scale
- Renderer with
nodeIntegrationenabled and filesystem access — one XSS is full machine compromise. - IPC exposing
exec(command), making the app a remote shell. - Unbounded memory growth from caches that never evict.
- Auto-update unsigned, or signed with a key nobody can rotate.
- Filesystem writes to paths the user never chose, discovered after data loss.
Verification receipts
- Process diagram: renderer, privileged core, IPC surface.
- Security posture check: context isolation on / strict CSP / no node in renderer.
- Memory measured over an 8-hour session with normal usage.
- Update flow tested: signed package, rollback, offline server.
- Cold start and first-interaction timing on a mid-tier device.
04 同仓库更多 Skills
interaction-patterns-architect
Architect-level interaction design in code — choosing established patterns over invented ones, feedback and latency behaviour, destructive-action safeguards, navigation and overlay conventions, and the state model behind every interactive surface. Use when a screen has to behave, not just look.
design-system-ops-architect
Architect-level operation of a design system in code — token pipelines and versioning, component API and variant policy, the catalogue as the contract, adoption metrics, and the governance that stops a system from forking into three. Use when a component library must survive several teams.
design-handoff-architect
Architect-level design handoff — what must be specified before implementation starts, tokens over raw values, responsive and content-limit contracts, state matrices, and the review loop that catches drift between design and code. Use when a design is about to become code.
content-microcopy-architect
Architect-level UI content — where strings live, voice and terminology consistency, error and empty-state copy as part of the interface, translation-ready authoring, and the content model a product needs before it multiplies screens. Use when the words in the interface matter as much as the pixels.
ui-ux-implementation-architect
Architect-level direction for turning a design into working UI — the handoff contract, component ownership versus screen-level layout, interaction and state conventions, design QA gates, and the review habits that keep an implementation faithful without frozen pixels. Use before any specific UI implementation skill.
test-strategy-architect
Architect-level test strategy — allocating assertions across unit, integration, contract and end-to-end layers, designing for testability through dependency boundaries, fixture and data strategy, and the flake and coverage policies that keep a suite trustworthy. Use when defining how a codebase is tested.