This directory contains the Electron wrapper for New API, providing a native desktop application with system tray support for Windows, macOS, and Linux.
The Electron app requires the compiled Go binary to function. You have two options:
Option A: Use existing binary (without Go installed)
# If you have a pre-built binary (e.g., new-api-macos)
cp ../new-api-macos ../new-apiOption B: Build from source (requires Go) TODO
cd electron
npm installRun the app in development mode:
npm startThis will:
- Start the Go backend on port 3000
- Open an Electron window with DevTools enabled
- Create a system tray icon (menu bar on macOS)
- Store database in
../data/new-api.db
# Ensure Go binary exists in parent directory
ls ../new-api # Should exist
# Build for current platform
npm run build
# Platform-specific builds
npm run build:mac # Creates .dmg and .zip
npm run build:win # Creates .exe installer
npm run build:linux # Creates .AppImage and .deb- Built applications are in
electron/dist/ - macOS:
.dmg(installer) and.zip(portable) - Windows:
.exe(installer) and portable exe - Linux:
.AppImageand.deb
Default port is 3000. To change, edit main.js:
const PORT = 3000; // Change to desired port- Development:
../data/new-api.db(project directory) - Production:
- macOS:
~/Library/Application Support/New API/data/ - Windows:
%APPDATA%/New API/data/ - Linux:
~/.config/New API/data/
- macOS: