Skip to main content
The Teak desktop app is a native desktop application built with Tauri v2, combining the power of Rust with a React frontend for a fast, secure, and lightweight experience.

Overview

Built with Tauri v2, the desktop app provides a native application experience with automatic updates, system tray integration, and native file system access.

Technology Stack

  • Tauri v2
  • React 19 + Vite
  • Rust backend
  • Convex for data sync

Platforms

  • macOS (13.0+)
  • Windows
  • Linux
  • Native M1/M2 support

Key Features

Native Desktop Experience

  • Native window management
  • System tray icon
  • Custom title bar
  • Native file dialogs
  • Deep linking support
  • Lightweight binary (~10MB)
  • Fast startup time
  • Low memory footprint
  • Rust-powered backend for maximum performance
  • Tauri’s capability system for permission control
  • Sandboxed environment
  • Secure IPC between frontend and Rust backend
  • Content Security Policy (CSP) enforcement

Automatic Updates

Built-in updater using Tauri’s plugin system:
// Configured in tauri.conf.json
"plugins": {
  "updater": {
    "endpoints": [
      "https://updates.teakvault.com/{{target}}/{{arch}}/{{current_version}}"
    ],
    "pubkey": "REPLACE_WITH_UPDATER_PUBLIC_KEY"
  }
}

Update Flow

  1. App checks for updates on startup
  2. Downloads update in background
  3. Prompts user to install
  4. Seamless installation and restart

Cross-Platform Support

Single codebase for all desktop platforms:
  • macOS: Apple Silicon (aarch64) and Intel (x86_64)
  • Windows: 64-bit
  • Linux: Multiple distributions

Installation & Setup

Prerequisites

  • Xcode Command Line Tools
  • Rust (via rustup)
  • Node.js 18+ or Bun
xcode-select --install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Development

# Install dependencies
bun install

# Start dev server (hot reload)
bun run dev

# Or start desktop + Convex
bun run dev:desktop

Platform-Specific Features

macOS

App Bundle

Native .app bundle with proper code signing and notarization support

Menu Bar

Native macOS menu bar with keyboard shortcuts

Info.plist

Custom Info.plist configuration for permissions and app metadata

Universal Binary

Support for both Intel and Apple Silicon

Windows

MSI Installer

Windows Installer (.msi) with custom branding

Auto-start

Optional startup on Windows boot

System Tray

Minimize to system tray functionality

UAC

Proper User Account Control handling

Linux

AppImage

Portable AppImage distribution

.deb Package

Debian/Ubuntu package support

Desktop Entry

XDG desktop integration

Themes

Respects system dark/light mode

Architecture

Project Structure

desktop/
├── src/                 # React frontend
│   ├── pages/           # Page components
│   │   ├── CardsPage.tsx
│   │   ├── LoginPage.tsx
│   │   └── SettingsPage.tsx
│   ├── components/      # Shared components
│   │   ├── Layout.tsx
│   │   └── ErrorBoundary.tsx
│   ├── App.tsx          # Main app component
│   └── main.tsx         # Entry point
├── src-tauri/           # Rust backend
│   ├── src/
│   │   ├── main.rs      # Entry point
│   │   ├── lib.rs       # Library exports
│   │   └── commands.rs  # Tauri commands
│   ├── capabilities/    # Permission configs
│   ├── icons/           # App icons
│   ├── Cargo.toml       # Rust dependencies
│   └── tauri.conf.json  # Tauri configuration
├── vite.config.ts       # Vite configuration
└── package.json         # Node dependencies

Tauri Configuration

tauri.conf.json
{
  "productName": "Teak",
  "version": "0.1.0",
  "identifier": "com.praveenjuge.teak",
  "build": {
    "beforeDevCommand": "vite",
    "devUrl": "http://localhost:1420",
    "beforeBuildCommand": "bun run build:vite",
    "frontendDist": "../dist"
  },
  "app": {
    "windows": [
      {
        "label": "main",
        "title": "Teak",
        "width": 1000,
        "height": 700,
        "minWidth": 800,
        "minHeight": 600
      }
    ]
  }
}

Tauri Plugins

The desktop app uses several Tauri plugins:
Persistent key-value storage
import { Store } from "@tauri-apps/plugin-store";

const store = new Store("settings.json");
await store.set("theme", "dark");
const theme = await store.get("theme");
Automatic app updates
import { check } from "@tauri-apps/plugin-updater";

const update = await check();
if (update?.available) {
  await update.downloadAndInstall();
}
Open URLs and files in default system apps
import { open } from "@tauri-apps/plugin-opener";

await open("https://teakvault.com");
Process management and exit handling
import { exit } from "@tauri-apps/plugin-process";

await exit(0);

Frontend Stack

React + Vite

The frontend uses modern React with Vite for fast development:
vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({
  plugins: [react(), tailwindcss()],
  clearScreen: false,
  server: {
    port: 1420,
    strictPort: true,
  },
});

UI Components

  • Tailwind CSS 4: Utility-first styling
  • shadcn/ui: Reusable component library (via @teak/ui)
  • Ant Design: Complex components like date pickers
  • React Router: Client-side routing
  • next-themes: Dark mode support

State Management

import { useQuery, useMutation } from "@teak/convex";
import { api } from "@teak/convex";

// Real-time Convex queries
const cards = useQuery(api.cards.list);
const createCard = useMutation(api.cards.create);

Authentication Flow

The desktop app uses a special OAuth flow:
1

Initiate Auth

Desktop app opens the web app in the default browser
2

User Logs In

User authenticates in the browser
3

Callback

Web app redirects to teak://auth/complete with auth token
4

Deep Link

Desktop app handles the deep link and stores the session
// Deep link handling in Rust
#[tauri::command]
fn handle_auth_callback(token: String) -> Result<(), String> {
    // Store auth token
    Ok(())
}

Building & Distribution

Code Signing

# Set up code signing
export APPLE_CERTIFICATE="path/to/cert.p12"
export APPLE_CERTIFICATE_PASSWORD="your-password"
export APPLE_ID="[email protected]"
export APPLE_PASSWORD="app-specific-password"

# Build with signing
bun run build

Release Process

1

Build

Build the application for target platforms
bun run build
2

Test

Test the built application thoroughly
3

Upload

Upload artifacts to your update server
# Upload to https://updates.teakvault.com/
4

Release

Users get automatic update notifications

Update Server

The updater requires a server that provides:
  • Latest version information
  • Download URLs for platform-specific binaries
  • Signature verification
update-manifest.json
{
  "version": "0.1.0",
  "notes": "Bug fixes and improvements",
  "pub_date": "2026-03-03T00:00:00Z",
  "platforms": {
    "darwin-aarch64": {
      "url": "https://updates.teakvault.com/Teak_0.1.0_aarch64.app.tar.gz",
      "signature": "..."
    }
  }
}

Performance

Bundle Size

The desktop app is extremely lightweight:
  • macOS: ~10MB .app bundle
  • Windows: ~8MB .exe
  • Linux: ~12MB AppImage

Memory Usage

Typical memory footprint:
  • Idle: ~50MB
  • Active use: ~100-150MB
  • Large card library: ~200MB

Startup Time

Cold start performance:
  • macOS: <1 second
  • Windows: <1.5 seconds
  • Linux: <1.5 seconds

Security

Capability System

Tauri v2 uses a capability-based permission system:
capabilities/default.json
{
  "identifier": "default",
  "permissions": [
    "core:default",
    "store:default",
    "updater:default"
  ]
}

Content Security Policy

"security": {
  "csp": null  // Customize for production
}

Troubleshooting

  • Ensure all system dependencies are installed
  • Check Rust toolchain is up to date: rustup update
  • Clear cargo cache: cargo clean
  • Check Tauri CLI version: cargo install tauri-cli --version 2
  • Ensure port 1420 is available
  • Check Vite configuration
  • Verify frontend dependencies are installed
  • Verify update server is accessible
  • Check signature verification
  • Ensure app has network permissions

Learn More

Backend

Learn about the Convex backend

Architecture

Understand the system architecture

Tauri

Official Tauri documentation

Tauri v2

Tauri v2 migration guide

Build docs developers (and LLMs) love