CtrlOps
|Docs

System Architecture

Deep technical dive into CtrlOps architecture — Tauri + Rust + React stack, component relationships, and data flows.

CtrlOps is built on a high-speed foundation that combines lightning-fast performance with a simple, modern interface. This page explains the inner workings that make your server management feel so fluid.

The CtrlOps Ecosystem

At its heart, CtrlOps is divided into four main layers that work together to provide a seamless, secure connection to your infrastructure.

Technology Stack

TechnologyPurposeVersion
ReactUI Framework18.x
ViteBuild Tool5.x
Ant DesignUI Components5.x
Tailwind CSSStyling3.x
XTerm.jsTerminal Emulator5.x
Framer MotionAnimations11.x
ZustandState Management4.x
TechnologyPurposeCrate
TauriDesktop Framework2.x
TokioAsync Runtime1.x
ssh2SSH/SFTP Client0.9.x
reqwestHTTP Client0.11.x
serdeSerialization1.x
anyhowError Handling1.x
ToolPurpose
CargoRust Package Manager
NPMNode Package Manager
GitHub ActionsCI/CD
Apple CodesignmacOS Signing
osslsigncodeWindows Signing

Project Structure

DevOpsFlow-2.0/
├── apps/
│   ├── desktop/              # Main Application Source
│   │   ├── src/
│   │   │   ├── lib.rs        # Core system functions
│   │   │   └── update_checker.rs
│   │   ├── Cargo.toml
│   │   └── tauri.conf.json
│   └── sidecar/              # Helper Services

├── core/                     # Shared Rust library
│   └── src/
│       ├── lib.rs            # Library exports
│       ├── ai/               # AI provider integrations
│       │   ├── mod.rs
│       │   ├── openai.rs
│       │   ├── anthropic.rs
│       │   └── gemini.rs
│       ├── license/          # License validation
│       │   └── mod.rs
│       ├── sessions/         # SSH session management
│       │   └── manager.rs
│       ├── sftp/             # SFTP operations
│       │   └── mod.rs
│       └── ssh/              # SSH utilities
│           └── mod.rs

├── ui/                       # React frontend
│   └── src/
│       ├── index.jsx         # Entry point
│       ├── components/       # React components
│       │   ├── Instance/     # Server management
│       │   ├── Home/         # Connection management
│       │   ├── Layout/       # App layout
│       │   └── Common/       # Shared components
│       ├── pages/            # Route pages
│       ├── utils/            # Utilities
│       │   ├── socketService.js
│       │   ├── mixpanel.js
│       │   └── aiPrompts.js
│       └── hooks/            # Custom React hooks

├── Cargo.toml               # Rust workspace
├── package.json             # Node dependencies
└── vite.config.js          # Vite configuration

Component Mapping

Backend (Rust) → Frontend (React)

Rust ComponentPurposeReact Consumer
ssh_connectEstablish SSH connectionsocketService.js
ssh_open_shellOpen interactive shellConsole.jsx
ssh_execute_commandRun remote commandssocketService.js
sftp_listList remote filesFileManager.jsx
sftp_uploadUpload filesFileManager.jsx
sftp_downloadDownload filesFileManager.jsx
ai_chat_requestAI provider callssocketService.js
validate_licenseLicense validationLicenseActivation.jsx
check_for_updateUpdate checkinguseStartupUpdateCheck.js

Application Visual Flow

Data Flow Examples

Secure Server Connection Flow

AI Assistant Flow

IPC Communication

Commands (Frontend → Backend)

Prop

Type

Example command definition:

#[tauri::command]
async fn ssh_connect(
    session_id: String,
    config: SshConfig,
) -> Result<SshConnectResult, String> {
    // Implementation
}

Invoked from React:

import { invoke } from '@tauri-apps/api/core';

const result = await invoke('ssh_connect', {
  sessionId: 'main-connection',
  config: { host, username, port: 22 }
});

Events (Backend → Frontend)

Prop

Type

Example event flow:

// Rust emits
cmd.app_handle()
    .emit("ssh:terminal-data", json!({
        "sessionId": id,
        "data": output
    }))
    .ok();
// React listens
import { listen } from '@tauri-apps/api/event';

const unlisten = await listen('ssh:terminal-data', (event) => {
  const { sessionId, data } = event.payload;
  // Update terminal
});

Security Foundation

Protecting Your Data

The management interface runs in a securely isolated environment:

  • No direct access to your local files without permission.
  • No external network access except through the secure bridge.
  • Every system request is checked by the secure engine.

The core engine operates with standard workstation permissions:

  • Secure server connections use verified system tunnels.
  • File tasks remain strictly within your authorized desktop space.
  • All binaries are digitally signed and verified by Apple/Microsoft.

All internal messages are rigorously checked:

  • Automatic verification of every command received.
  • Strict input checks to prevent accidental server errors.
  • Self-healing error handling to prevent application crashes.

Performance Characteristics

MetricTargetAchieved
Binary Size< 20 MB~15 MB
Idle Memory< 50 MB~30 MB
Startup Time< 2s< 1s
SSH Connection< 5s< 3s
File TransferSaturate 1Gbps~900 Mbps
AI Response< 3s< 2s (typical)

Build Pipeline

Release Process: Each release goes through automated builds on macOS, Windows, and Linux runners. Binaries are signed and notarized before distribution via the update server.

Extension Points

CtrlOps is designed for extensibility:

Adding New AI Providers

  1. Create provider file in core/src/ai/
  2. Implement the AiProvider trait
  3. Add to provider router
  4. Register in frontend AI settings

Adding New SSH Commands

  1. Add command handler in apps/desktop/src/lib.rs
  2. Create TypeScript type definitions
  3. Add UI component
  4. Wire through socket service

Custom Themes

The UI uses CSS variables for theming:

:root {
  --ctrl-primary: #35b729;
  --ctrl-bg: #111114;
  --ctrl-surface: #1a1a1d;
}

Want to contribute? Check out the Contributing Guide and Development Setup.

On this page