Advanced Deslop Platform
Comprehensive skill designed for remove, generated, code, slop. Includes structured workflows, validation checks, and reusable patterns for sentry.
Advanced Deslop Platform
A desktop application development skill for building cross-platform desktop apps using frameworks like Electron, Tauri, and native platform APIs, covering packaging, auto-updates, and system integration.
When to Use
Choose Advanced Deslop Platform when:
- Building cross-platform desktop applications with web technologies
- Packaging web apps as native desktop applications with system tray and notifications
- Implementing auto-update mechanisms, native file system access, and OS integration
- Choosing between Electron, Tauri, or native frameworks for a desktop project
Consider alternatives when:
- Building a purely web-based application — deploy as a PWA instead
- Targeting only one platform — use native SDKs for best performance
- Building a simple utility — a CLI tool may be more appropriate
Quick Start
# Create a new Tauri app (Rust + web frontend) npm create tauri-app@latest my-desktop-app -- --template react-ts # Create a new Electron app npm init electron-app@latest my-electron-app -- --template=webpack-typescript
// Tauri application setup with system tray import { invoke } from '@tauri-apps/api/core'; import { TrayIcon } from '@tauri-apps/api/tray'; import { Menu, MenuItem } from '@tauri-apps/api/menu'; async function setupApp() { // Invoke Rust backend function const result = await invoke<string>('greet', { name: 'User' }); console.log(result); // Create system tray const menu = await Menu.new({ items: [ await MenuItem.new({ text: 'Show Window', action: () => { const { getCurrentWindow } = window.__TAURI__.window; getCurrentWindow().show(); } }), await MenuItem.new({ text: 'Quit', action: () => { const { exit } = window.__TAURI__.process; exit(0); } }) ] }); await TrayIcon.new({ icon: 'icons/icon.png', menu, tooltip: 'My Desktop App' }); } // Rust backend (src-tauri/src/main.rs) /* #[tauri::command] fn greet(name: &str) -> String { format!("Hello, {}! You've been greeted from Rust!", name) } fn main() { tauri::Builder::default() .invoke_handler(tauri::generate_handler![greet]) .run(tauri::generate_context!()) .expect("error while running tauri application"); } */
Core Concepts
Framework Comparison
| Feature | Electron | Tauri | Flutter | Qt |
|---|---|---|---|---|
| Language | JS/TS | Rust + JS/TS | Dart | C++ |
| Bundle Size | ~150 MB | ~5-10 MB | ~20 MB | ~30 MB |
| Memory Usage | High | Low | Medium | Low |
| Native APIs | Via Node.js | Via Rust plugins | Via platform channels | Direct |
| Auto Update | electron-updater | Tauri updater | Manual | Qt Installer |
| Cross Platform | Win/Mac/Linux | Win/Mac/Linux | Win/Mac/Linux/Mobile | Win/Mac/Linux |
Native System Integration
// Electron: File system and dialog integration import { app, BrowserWindow, dialog, ipcMain, Notification } from 'electron'; import * as fs from 'fs'; import * as path from 'path'; class DesktopApp { private mainWindow: BrowserWindow | null = null; createWindow() { this.mainWindow = new BrowserWindow({ width: 1200, height: 800, webPreferences: { preload: path.join(__dirname, 'preload.js'), contextIsolation: true, nodeIntegration: false }, titleBarStyle: 'hiddenInset' }); } setupIPC() { ipcMain.handle('open-file', async () => { const result = await dialog.showOpenDialog(this.mainWindow!, { properties: ['openFile'], filters: [ { name: 'Documents', extensions: ['txt', 'md', 'json'] }, { name: 'All Files', extensions: ['*'] } ] }); if (!result.canceled && result.filePaths.length > 0) { return fs.readFileSync(result.filePaths[0], 'utf-8'); } return null; }); ipcMain.handle('save-file', async (_event, content: string) => { const result = await dialog.showSaveDialog(this.mainWindow!, { filters: [{ name: 'Text Files', extensions: ['txt'] }] }); if (!result.canceled && result.filePath) { fs.writeFileSync(result.filePath, content); new Notification({ title: 'File Saved', body: `Saved to ${result.filePath}` }).show(); return true; } return false; }); } }
Configuration
| Option | Description | Default |
|---|---|---|
framework | Desktop framework: electron, tauri, flutter | "tauri" |
window_width | Default window width in pixels | 1200 |
window_height | Default window height in pixels | 800 |
system_tray | Enable system tray icon | false |
auto_update | Enable auto-update mechanism | true |
single_instance | Prevent multiple app instances | true |
deep_linking | Register custom URL protocol | false |
native_menus | Use native menu bar | true |
Best Practices
- Use Tauri for new projects unless you specifically need Node.js APIs in the main process — Tauri produces dramatically smaller bundles (5-10 MB vs 150 MB), uses less memory, and has better security defaults with its Rust backend
- Always enable context isolation in Electron and use a preload script to expose only necessary APIs to the renderer process — direct
nodeIntegrationis a critical security risk that exposes the full Node.js API to web content - Implement graceful update flows that download updates in the background and prompt users to restart rather than forcing immediate updates that interrupt their work
- Handle offline scenarios since desktop apps are expected to work without internet — cache resources locally, queue operations for when connectivity returns, and show clear offline status indicators
- Test on all target platforms in CI/CD because each OS has different window management, file system conventions, and permission models that can cause platform-specific bugs
Common Issues
Large Electron bundle sizes: Electron ships a full Chromium browser, resulting in 150+ MB downloads. Use tools like electron-builder with compression, enable ASAR archives, exclude unnecessary files from the bundle, and consider Tauri as an alternative for significantly smaller distributable sizes.
Code signing and notarization failures: macOS requires apps to be signed and notarized for distribution. Set up Apple Developer certificates in CI, configure electron-builder or tauri-action with proper signing credentials, and allow time for Apple's notarization service to process the build before distributing.
Auto-update mechanism breaking: Updates can fail silently or corrupt installations if the update server is misconfigured. Test the complete update flow end-to-end (download, verify signature, install, restart) in a staging environment, implement rollback mechanisms, and log update events to diagnose failures remotely.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Full-Stack Code Reviewer
Comprehensive code review skill that checks for security vulnerabilities, performance issues, accessibility, and best practices across frontend and backend code.
Test Suite Generator
Generates comprehensive test suites with unit tests, integration tests, and edge cases. Supports Jest, Vitest, Pytest, and Go testing.
Pro Architecture Workspace
Battle-tested skill for architectural, decision, making, framework. Includes structured workflows, validation checks, and reusable patterns for development.