project-nomad/electron/assets/README.md
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

15 lines
618 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Electron App Icons
Place the following icon files here for the packaged desktop app:
| File | Size | Platform |
|-----------------|-------------|----------------|
| `icon.png` | 512×512 px | Linux (AppImage, deb) |
| `tray-icon.png` | 32×32 px | System tray (all platforms) |
| `icon.icns` | macOS bundle | macOS |
| `icon.ico` | Multi-size ICO | Windows |
The `tray-icon.png` is also used as a fallback tray icon during development.
If it is missing, Electron will use a blank 1×1 image and the tray entry will
still appear (just without a visible icon).