project-nomad/package.json
Claude cd28a109b9
feat: add Electron desktop app wrapper
Adds a native desktop application shell in electron/ that wraps the
existing Docker-based NOMAD stack in an Electron BrowserWindow.

Architecture:
- Single instance lock prevents multiple app copies from running
- Main process manages the full Docker Compose lifecycle (up/stop)
- Health-check polling (GET /api/health) with 3-minute timeout before
  loading the NOMAD web UI in the BrowserWindow
- System tray stays alive when the window is closed, with menu items
  for Show/Hide, Open in Browser, Restart, Stop, and Quit
- Retry button on the loading screen re-runs the launch sequence
  without needing to restart the app

Files:
  electron/package.json       - Electron 34 + electron-builder config
                                Targets: AppImage/deb (Linux), DMG (Mac),
                                NSIS (Windows); supports x64 + arm64
  electron/tsconfig.json      - CommonJS/ES2020 TypeScript for main process
  electron/src/main.ts        - Main process: window, tray, Docker helpers,
                                startup state machine, IPC handlers
  electron/src/preload.ts     - contextBridge: exposes onStatus / retryLaunch
                                to loading screen without full nodeIntegration
  electron/src/loading.html   - Branded startup screen with animated progress
                                bar, status messages, and error retry button
  electron/assets/README.md   - Icon file guide (512px PNG, tray 32px PNG,
                                ICNS for Mac, ICO for Windows)

Root scripts added:
  npm run electron:install     - install electron deps
  npm run electron:build       - compile TypeScript
  npm run electron:dev         - build + launch in dev mode
  npm run electron📦*   - package for linux/mac/win

https://claude.ai/code/session_01WfRC4tDeYprykhMrg4PxX6
2026-03-22 21:53:02 +00:00

18 lines
596 B
JSON

{
"name": "project-nomad",
"version": "1.30.1",
"description": "\"",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"electron:install": "cd electron && npm install",
"electron:build": "cd electron && npm run build",
"electron:dev": "cd electron && npm run dev",
"electron:package:linux": "cd electron && npm run package:linux",
"electron:package:mac": "cd electron && npm run package:mac",
"electron:package:win": "cd electron && npm run package:win"
},
"author": "Crosstalk Solutions, LLC",
"license": "ISC"
}