# Desktop Apps with Electron and Tauri

> Package web apps as desktop applications with Electron or the lighter Tauri, and understand their security models. Free notes, key concepts, resources and a...

Canonical: https://www.internhack.in/roadmaps/tracks/frontend/desktop-apps
Last updated: 2026-11-28

Package web apps as desktop applications with Electron or the lighter Tauri, and understand their security models.

Advanced · about 6 hours · difficulty 3/5

Learn first: [Build Tools and Bundlers](https://www.internhack.in/roadmaps/tracks/frontend/build-tools), [Content Security Policy and Supply-Chain Safety](https://www.internhack.in/roadmaps/tracks/frontend/csp)

Many well-known desktop apps (code editors, chat, design and note-taking tools) are web apps running inside a desktop shell. If you can build a web frontend, you can ship a desktop app.

### Electron

Bundles Chromium and Node.js with your app. You write a **main process** (Node: windows, menus, file system, native dialogs) and **renderer processes** (your web UI), connected through IPC. Huge ecosystem and consistent rendering across platforms; the cost is large download size and memory use.

### Tauri

Uses the operating system's own webview (WebView2, WKWebView, WebKitGTK) with a **Rust** backend, producing much smaller binaries and lower memory use. You call backend commands from the frontend through a typed API, and Tauri 2 also targets iOS and Android. Rendering differences between system webviews need testing.

### Security is critical

Desktop apps have access to the user's machine, so an XSS bug can become remote code execution.

- In Electron: keep `contextIsolation` on and `nodeIntegration` off, expose only narrow APIs through a **preload script** with `contextBridge`, validate IPC messages and never load remote untrusted content with privileges.
- In Tauri: use the **capabilities and permissions** system to allow only the commands and paths you need.
- Apply a Content Security Policy in both.

### Shipping

Code signing and notarisation (macOS), installers per platform, and **auto-updates**.

### Good enough to move on

You can wrap an existing web app in Electron or Tauri, add one native feature (file open/save or a tray menu) through a safe bridge, and produce an installer for your platform.

## Key concepts

- **Electron main and renderer processes**
- **IPC and preload scripts**
- **Tauri and system webviews**
- **Desktop security hardening**
- **Native features: files, menus, tray**
- **Packaging, signing and auto-updates**

## Mini project

Turn your Markdown notes web app into a desktop app with Tauri or Electron that opens and saves files from disk through a safe, validated bridge and ships as an installer.

## Check yourself

Why is enabling nodeIntegration in an Electron renderer that displays user content so dangerous?

## Free resources

- [Electron Documentation](https://www.electronjs.org/docs/latest/) (Electron)
- [Electron Security](https://www.electronjs.org/docs/latest/tutorial/security) (Electron)
- [Tauri](https://v2.tauri.app/start/) (Tauri)

Previous: [Mobile Apps with React Native](https://www.internhack.in/roadmaps/tracks/frontend/react-native) · Next: [Capstone: A Production-Grade Frontend Application](https://www.internhack.in/roadmaps/tracks/frontend/capstone)

## More in Shipping to Production and Beyond

- [Deploying Frontend Apps](https://www.internhack.in/roadmaps/tracks/frontend/deployment)
- [Environment Variables and Configuration](https://www.internhack.in/roadmaps/tracks/frontend/env-config)
- [Continuous Integration for Frontend Projects](https://www.internhack.in/roadmaps/tracks/frontend/frontend-ci)
- [Mobile Apps with React Native](https://www.internhack.in/roadmaps/tracks/frontend/react-native)
- [Desktop Apps with Electron and Tauri](https://www.internhack.in/roadmaps/tracks/frontend/desktop-apps)
- [Capstone: A Production-Grade Frontend Application](https://www.internhack.in/roadmaps/tracks/frontend/capstone)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Frontend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/frontend)
