Skip to content

Add Electron desktop app (no proxy server needed)#21

Open
abhimanyusinghal wants to merge 1 commit intomasterfrom
feat/electron-desktop-app
Open

Add Electron desktop app (no proxy server needed)#21
abhimanyusinghal wants to merge 1 commit intomasterfrom
feat/electron-desktop-app

Conversation

@abhimanyusinghal
Copy link
Copy Markdown
Owner

Summary

  • Ships v1.5 roadmap item "Electron or Tauri desktop app (no proxy server needed)" using Electron, so the existing Node-based proxy logic (undici, ws, multipart construction) is reusable as-is.
  • New electron/ directory contains the main process, preload, and IPC handlers ported from server/proxy.js -- HTTP, OAuth token exchange, GitHub device flow, and WebSocket relay all run in-process. The Express server is no longer required for desktop.
  • The renderer is unchanged for the browser build; a tiny isDesktop() helper in src/utils/desktop.ts swaps transport at the four call sites that previously hit /api/proxy, /api/oauth/token, /api/github/*, and /api/ws-proxy.
  • Adds electron:dev, electron:build, and per-platform build scripts; electron-builder.yml ships NSIS / DMG (universal) / AppImage+deb targets.
  • Full instructions, IPC architecture, and troubleshooting in docs/DESKTOP.md.

Test plan

  • npx tsc -b passes
  • npx eslint clean on every file touched in this PR
  • npm test -- 459/459 tests pass (no regressions in http.ts, oauth.ts, github.ts, store, components, or proxy server)
  • vite build --base=./ produces a relative-path dist/ that loads from file://
  • electron electron/main.cjs boots the prod build without errors
  • npm run electron:dev end-to-end smoke (send a real cross-origin GET, OAuth token exchange against a live IdP, WebSocket echo)
  • npm run electron:build:win produces a working NSIS installer

Ports server/proxy.js logic to IPC handlers in the Electron main process so
the desktop build runs HTTP, WebSocket, OAuth token exchange, and GitHub
device flow without a sidecar Express server. The renderer detects desktop
mode via window.curlit and branches transport while keeping payload shapes
identical to the existing proxy endpoints.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant