Skip to content
HlexNC edited this page Mar 14, 2026 · 3 revisions

Zelara Desktop App Wiki

Welcome to the technical documentation for Zelara's desktop application (Tauri + React + Rust).

Getting Started

For Developers

Architecture

Tech Stack

  • Framework: Tauri 2 (Rust backend + Vite/React frontend)
  • Language: TypeScript (frontend) + Rust (backend)
  • WebSocket Server: tokio-tungstenite on port 8765
  • TLS: tokio-rustls + rcgen (self-signed cert generated on first launch)
  • BLE Advertising: WinRT BluetoothLEAdvertisementPublisher via windows crate (Windows-only; no-op stub on macOS/Linux)
  • CV Processing: ONNX Runtime (image validation)
  • Storage: SQLite (rusqlite) + file system

Key Rust Modules (src-tauri/src/)

Module Purpose
device_linking.rs WebSocket server, TLS, QR generation, handshake, task dispatch
ble_advertising.rs BLE peripheral advertising (Windows WinRT); BleAdvertisingState, BleStatus
cv_processor.rs Heuristic paper bag detection (brown pixel ratio)
storage.rs Progress persistence, unlock_module command
lib.rs Tauri setup, command registration, managed state

Tauri Commands (BLE)

Command Description
start_ble_advertising Start BLE advertisement (auto-called on launch)
stop_ble_advertising Stop BLE advertisement
get_ble_status Returns current BleStatus (notSupported | idle | advertising | error)

Tauri Events (BLE)

Event Payload
ble-status-changed { status, ip?, port?, message? }

Build Configuration

  • Target platforms: Windows (NSIS installer), macOS, Linux
  • Rust edition: 2021
  • Dev URL: http://localhost:1420

Quick Links


Core Wiki Reference

The main technical documentation lives in the Zelara Core Wiki. Key pages relevant to the desktop app: