Skip to content

Mac app: native Electrobun shell for packages/ui #133

Description

@RichardBray

Why

Current UX is CLI -> spawns local server -> opens browser. Too many steps for non-CLI users. Goal: native Mac app, double-click to open, no terminal, no localhost URL.

Approach

  • Wrap existing packages/ui web UI in an Electrobun shell (native window, system WebView, TS backend via Bun - no Rust/Node split, fits current monorepo).
  • Bundle FFmpeg inside the app (FFmpeg is LGPL by default if GPL-only codecs like libx264 are excluded from the build - no conflict with Hance's own FSL-1.1-Apache-2.0 license). Ship a signed, notarized universal binary (arm64 + x86_64).
  • Wire packages/ui directly to a local FFmpeg call in-process, replacing the current CLI-trigger + server flow.
  • Optional: use VideoToolbox (-c:v h264_videotoolbox) as FFmpeg's encoder backend for faster export on Apple Silicon, while keeping FFmpeg's -filter_complex chain (grade -> halation -> aberration -> weave) as the effects engine - AVFoundation has no equivalent to arbitrary filter graphs, so it can't replace FFmpeg outright.

Why Electrobun over Tauri

  • TS/Bun end to end, matches the existing Bun workspaces setup - no Rust glue layer.
  • Reuses packages/ui as-is (system WebView rendering).
  • v1-stable, 12.2k stars, production apps already shipping on it.
  • Tradeoff: larger bundle than Tauri (~64MB app-shell overhead before FFmpeg vs Tauri's single-digit MB), but that's dwarfed by the bundled FFmpeg binary either way, so not a deciding factor here.

Scope

  • Electrobun app shell (window, menu, dock icon, packaging/signing/notarization)
  • Bundle FFmpeg (LGPL build, universal binary)
  • Wire packages/ui to in-process FFmpeg calls (drop CLI-trigger + local server step)
  • Drag-drop / "Open With" file input
  • Preset picker for grade/halation/aberration/weave with live preview
  • Export flow
  • Native .mov preview (AVFoundation/WKWebView) - avoid transcoding for playback; only run FFmpeg on actual effects/export

Out of scope (future issue)

  • MCP server for agent-driven control - power-user feature, not needed for initial non-technical-user adoption target.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — soon, not urgent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions