Docs / Desktop Workspace / Desktop Workspace Overview

Desktop Workspace Overview

Architecture, performance benchmarks, and capabilities of native BhaiCode Desktop.

The BhaiCode Desktop App is a native development workspace built with Tauri 2, Rust, and React 19. It provides high-velocity AI assistance with local-first privacy, native terminal integration, and a low memory footprint.

Rather than bundling Chromium and Node.js runtimes inside Electron, BhaiCode Desktop uses your operating system's native webview for rendering and runs heavy filesystem, process orchestration, and PTY terminal operations through a compiled Rust core.


Architectural Overview

MERMAID
graph TD
    subgraph Frontend Surface (React 19)
        CANVAS["Agentic Canvas Mode<br/>(Task timeline & plan progress)"]
        EDITOR["Workspace Editor Mode<br/>(CodeMirror 6 · Ask AI on Selection)"]
        DIFF["Multi-File Diff Viewer<br/>(Hunk-by-hunk accept/reject)"]
        TERM["PTY Terminal<br/>(xterm.js · OSC 133 decorations)"]
    end

    subgraph Native Rust Core (Tauri 2)
        IPC["Typed IPC Channel Bridge"]
        FS["Filesystem Bridge & Denylist Guards"]
        PTY["Portable-PTY Process Manager"]
        KEY["OS Keychain Security (macOS/Win/Linux)"]
    end

    subgraph Agent Swarm
        BRAIN["BhaiCode Agent Core<br/>(Bhai · Planner · Executor)"]
    end

    CANVAS --> IPC
    EDITOR --> IPC
    DIFF --> IPC
    TERM --> IPC

    IPC --> FS
    IPC --> PTY
    IPC --> KEY
    IPC --> BRAIN

Performance Benchmarks

Metric BhaiCode Desktop (Tauri 2) Typical Electron Editor
Installer Size ~7–8 MB ~120–150 MB
Idle Memory Footprint ~45 MB RAM ~500–800 MB RAM
Cold Startup Time < 350 ms 2.5–4.5 s
Execution Security Native OS Keychain & Path Denylist Plaintext config files

Two Working Modes

BhaiCode Desktop lets you switch between two dedicated modes:

1. Agentic Canvas Mode (`Cmd + 1` / `Ctrl + 1`)

A focused interface for task delegation:

  • Step-by-step implementation plan progression.
  • Subagent delegation events (e.g., handing off system design to Planner or heavy refactors to Executor).
  • Real-time tool execution logs.
  • Permission approval gates for terminal commands and sensitive actions.

2. Workspace Editor Mode (`Cmd + 2` / `Ctrl + 2`)

A dual-pane developer environment:

  • File explorer with Git status indicators.
  • CodeMirror 6 editor with syntax highlighting for 100+ languages.
  • Interactive "Ask AI on Selection": highlight any code block to explain, refactor, or test inline.
  • Integrated PTY terminal running your system's native shell.

Local-First Security & BYOK

  • Zero Remote Code Storage: Your source code stays on your local filesystem.
  • Native OS Keychain Vault: When you configure API keys for AI providers (OpenAI, Anthropic, Gemini, Nous Portal), credentials are stored directly in your operating system's native keychain (macOS Keychain, Windows Credential Manager, or Linux Secret Service). They are never saved to unencrypted config JSON files.
  • Direct Provider Connection: Requests are sent directly from your machine to the respective AI provider endpoint without a proxy server.
  • Air-Gapped Offline Models (Ollama): Connect to local open-source models via http://localhost:11434 for 100% offline, air-gapped development.

Ready to build with AI?

Start building for free with your own keys, or unlock managed compute in seconds