Skip to content

feat: desktop app (packages/desktop) #70

Description

@badchars

Summary

Add a desktop application for CyberStrike as packages/desktop in the monorepo. Currently CyberStrike runs as CLI/TUI or via web UI — a native desktop app would provide a first-class GUI experience with system-level integration.

Priority: Low — planned but not immediate.

Current State

  • No desktop app exists in the monorepo
  • packages/containers/tauri-linux/ (Tauri build Dockerfile) has been removed as unused
  • CORS origins for tauri://localhost and http://tauri.localhost are already configured in server.ts:92-96 and will work for any desktop framework
  • packages/app (SolidJS SPA) can potentially be reused as the renderer/webview content

Upstream Reference

Upstream (anomalyco/opencode) has packages/desktop using:

Property Value
Framework Electron (was Tauri, migrated)
Build tool electron-vite
Packager electron-builder
Structure src/main, src/preload, src/renderer
Platforms Mac, Windows, Linux

Options

A. Electron (upstream parity)

  • Pro: Upstream reference code available, mature ecosystem, full Node.js access
  • Pro: Can embed packages/app as renderer with minimal changes
  • Con: Larger binary size (~100MB+), higher memory usage

B. Tauri 2.x

  • Pro: Smaller binary (~10MB), lower memory, Rust backend
  • Pro: Better security sandbox
  • Con: No upstream reference, Rust toolchain required for builds
  • Con: WebView rendering differences across platforms

C. Neutralinojs / other lightweight

  • Pro: Very small binary
  • Con: Limited ecosystem, fewer features

Suggested Architecture

packages/desktop/
├── src/
│   ├── main/          # Main process (Electron) or backend (Tauri)
│   ├── preload/       # Preload scripts (Electron only)
│   └── renderer/      # Imports from packages/app or packages/ui
├── icons/             # App icons for all platforms
├── scripts/           # Build/dev helper scripts
├── package.json
└── electron-builder.config.ts  # or tauri.conf.json

Key integration points:

  • Backend: Spawn cyberstrike binary as child process, or embed the Hono server in-process
  • Web UI: Reuse packages/app as the webview content
  • System tray: Quick access, background operation
  • Auto-update: Built-in update mechanism
  • Deep links: cyberstrike:// protocol handler

Pre-requisites

  • Decide on framework (Electron vs Tauri 2.x)
  • Evaluate if packages/app can run as-is in a webview
  • Define MVP feature set (just wrapper? or native features like system tray, notifications?)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions