Skip to main content

Suite Desktop Architecture

Trezor Suite Desktop is an Electron-based application that provides a full-featured, offline-capable interface for managing Trezor hardware wallets. It combines the power of Node.js with a modern React frontend. Trezor Suite Desktop

Overview

Suite Desktop is built using:

Electron 40.1.0

Cross-platform desktop framework

React 19.1.0

UI rendering and component architecture

Redux Toolkit

State management and data flow

Node.js 24

Backend runtime for native features

Architecture Layers

┌────────────────────────────────────────┐
│         Renderer Process (UI)            │
│  ┌──────────────────────────────────┐  │
│  │  React Components (@trezor/suite)  │  │
│  │  Redux Store & Middleware          │  │
│  │  @trezor/ipc-proxy                 │  │
│  └──────────────────────────────────┘  │
└──────────────────┬─────────────────────┘
                 │ IPC Communication
┌──────────────────┴─────────────────────┐
│        Main Process (Node.js)           │
│  ┌──────────────────────────────────┐  │
│  │  @trezor/suite-desktop-core        │  │
│  │  - Window Management               │  │
│  │  - Auto Updates                    │  │
│  │  - File System Access              │  │
│  │  - Native Modules                  │  │
│  │  @trezor/connect (Node)            │  │
│  └──────────────────────────────────┘  │
└──────────────────┬─────────────────────┘

┌──────────────────┴─────────────────────┐
│         Native Layer                    │
│  - Trezor Bridge (USB/HID)             │
│  - Tor (Privacy)                       │
│  - File System                         │
│  - OS Integration                      │
└────────────────────────────────────────┘

Key Components

1. Renderer Process

The renderer process runs the React-based UI in a Chromium browser context.
@trezor/suite PackageThe main Suite UI package provides:
  • React components for all screens
  • Redux store for state management
  • Routing and navigation
  • Business logic
// Renderer entry point
import { App } from '@trezor/suite';
import { render } from 'react-dom';

render(<App />, document.getElementById('root'));

2. Main Process

The main process handles all Node.js operations and system integrations.
Core functionality for the Electron main process:Window Management
  • Create and manage application windows
  • Handle window state (minimize, maximize, close)
  • Multi-window support
Auto-Updates
  • Check for application updates
  • Download and install updates
  • Notify user of available updates
File System
  • Read/write application data
  • Manage logs
  • Export/import wallet data
IPC Handlers
  • Process messages from renderer
  • Invoke native APIs
  • Return results to renderer
Connect runs in Node.js context in main process:
// Main process
import TrezorConnect from '@trezor/connect';

TrezorConnect.init({
  manifest: {
    email: '[email protected]',
    appUrl: 'https://suite.trezor.io',
  },
});

// Handle IPC requests from renderer
ipcMain.handle('trezor-connect', async (event, method, params) => {
  return await TrezorConnect[method](params);
});
Benefits:
  • Direct USB/HID access
  • No WebUSB limitations
  • Better performance
  • Offline capabilities
Integration with native system features:Trezor Bridge
  • USB/HID device communication
  • Device detection and monitoring
  • Low-level protocol handling
Tor
  • Bundled Tor binary
  • SOCKS5 proxy configuration
  • Privacy-enhanced connections
Coinjoin Backend
  • Bitcoin privacy features
  • Coordinator communication
  • Transaction mixing

Key Differences: Desktop vs Web

Desktop

  • Connect runs in Node.js (main process)
  • Imported as regular node_module
  • No Connect files on renderer
  • IPC proxy in renderer
// Renderer: @trezor/ipc-proxy
TrezorConnect.getAddress(...) → IPCMain Process

Web

  • Connect is part of JavaScript bundle
  • Uses @trezor/connect-web
  • Runs in browser context
  • WebUSB for device communication
// Browser: @trezor/connect-web
TrezorConnect.getAddress(...) → WebUSB
See webpack config for web replacement logic.

Application Structure

Package Organization

packages/
├── suite-desktop/              # Build target & bundler
│   ├── build-electron/         # Output directory
│   ├── dist/                   # Compiled main process
│   └── package.json            # Electron app dependencies
├── suite-desktop-core/         # Main process logic
│   ├── src/
│   │   ├── main.ts             # Entry point
│   │   ├── modules/
│   │   │   ├── auto-updater.ts
│   │   │   ├── window-manager.ts
│   │   │   ├── tor.ts
│   │   │   └── trezor-connect.ts
│   │   └── ipc-handlers.ts
│   └── scripts/build.ts
├── suite-desktop-ui/           # Renderer-specific UI
├── suite-desktop-api/          # IPC API definitions
└── suite-desktop-native/       # Native module bindings
Important: @trezor/suite-desktop is a container for bundled code. Do not add custom code or dependencies here. Use @trezor/suite-desktop-core instead.

Build Process

1

Compile TypeScript

# Compile main process
yarn workspace @trezor/suite-desktop-core build
2

Bundle Renderer

# Build renderer (Suite UI)
yarn workspace @trezor/suite build
3

Package with Electron Builder

# Build for specific platform
yarn workspace @trezor/suite-desktop build:mac
yarn workspace @trezor/suite-desktop build:win
yarn workspace @trezor/suite-desktop build:linux
4

Output

Packaged apps in packages/suite-desktop/build-electron/:
  • macOS: .dmg and .app
  • Windows: .exe installer
  • Linux: .AppImage

Environment Configurations

Suite Desktop runs in different modes with separate data directories:
EnvironmentApp IDNameData DirUse Case
Productioncom.trezor.suiteTrezor Suite@trezor/suite-desktopReleased builds
Developmentcom.trezor.suite.devTrezor Suite Dev@trezor/suite-desktop-devBuilt dev versions
Local Devcom.github.ElectronTrezor Suite Local@trezor/suite-desktop-localyarn suite:dev:desktop
macOS
~/Library/Application Support/@trezor/suite-desktop/
├── IndexedDB/          # Database
├── Cache/              # Cached resources
├── logs/               # Application logs
└── User Data/          # Settings
Windows
C:\Users\[user]\AppData\Roaming\@trezor\suite-desktop\
Linux
/home/[user]/.config/@trezor/suite-desktop/
You can access your data directory from Suite: Settings → Debug → Wipe app data (link in description).

Development

Running Dev Server

yarn suite:dev:desktop
This command:
  1. Starts Webpack dev server for renderer
  2. Compiles main process with watch mode
  3. Launches Electron with hot reload
React DevTools are available. To use them, reload the renderer process (Ctrl+R / Cmd+R) while DevTools are open.

Keyboard Shortcuts

ActionShortcut (macOS)Shortcut (Windows/Linux)
ReloadCmd+R / F5Ctrl+R / F5
Hard ReloadShift+Cmd+RShift+Ctrl+R
RestartOption+F5Alt+F5
DevToolsCmd+Shift+ICtrl+Shift+I / F12

Debugging

Chrome DevToolsPress F12 or Cmd+Shift+I to open DevTools.Features:
  • React component inspection
  • Network monitoring
  • Console logs
  • Redux DevTools (if enabled)
// Enable Redux DevTools
// .env.local
TANSTACK_REACT_QUERY_DEV_TOOLS=true

Build & Distribution

Building for Release

yarn workspace @trezor/suite-desktop build:mac
Output: packages/suite-desktop/build-electron/
  • Trezor Suite-[version]-arm64.dmg (Apple Silicon)
  • Trezor Suite-[version]-x64.dmg (Intel)
  • mac-arm64/Trezor Suite.app
  • mac-x64/Trezor Suite.app
Signing: Requires Apple Developer certificateNotarization: Automatic if credentials configured

Auto-Updates

Suite Desktop includes built-in auto-update functionality:
1

Check for Updates

App checks for updates on startup and periodically.
2

Download in Background

Updates download automatically in the background.
3

Notify User

User is notified when update is ready to install.
4

Install on Restart

Update installs when user restarts the application.
Auto-updates use electron-updater with delta updates for efficiency.

Advanced Features

Tor Integration

  • Bundled Tor binary included with app
  • Automatically started when Tor mode enabled
  • SOCKS5 proxy on localhost:9050
  • All network traffic routed through Tor
// Enable Tor in settings
dispatch(toggleTor(true));
Tor settings in Suite:
  • Settings → Application → Tor
  • Enable/disable Tor
  • Snowflake bridges for censored networks
  • Custom bridges
Location: @trezor/suite-desktop-core/src/modules/tor.tsFeatures:
  • Automatic Tor binary management
  • Bootstrap progress tracking
  • Circuit building
  • Bridge configuration

Anonymous Mode

Run Suite with fresh data on every start (like incognito mode): See anon-mode docs

Extracting Application

For debugging or inspection, you can extract the packaged app:
npx @electron/asar extract \
  ./Trezor\ Suite.app/Contents/Resources/app.asar \
  ./decompiled

Performance Optimization

Code Splitting

Lazy load routes and heavy components

IPC Batching

Batch multiple IPC calls when possible

Asset Optimization

Compress images and bundle only needed resources

Memory Management

Proper cleanup of listeners and subscriptions

Troubleshooting

# Clean build
yarn workspace @trezor/suite-desktop-core clean
yarn workspace @trezor/suite clean
yarn build:essential
Check logs:
  • macOS: ~/Library/Logs/Trezor Suite/
  • Windows: %APPDATA%\Trezor Suite\logs\
  • Linux: ~/.config/Trezor Suite/logs/
  1. Install/restart Trezor Bridge
  2. Try different USB cable
  3. Check USB permissions (Linux)
  4. Restart Suite

Next Steps

Suite Web Architecture

Compare with web version architecture

Debugging Guide

Advanced debugging techniques

Runtime Flags

Command-line options

Desktop Updates

Update mechanism details

Build docs developers (and LLMs) love