Configuration

Configuration File

Complete reference for the deskforge.config.json file.

Example Configuration

{
  "name": "My App",
  "author": "Your Name",
  "version": "1.0.0",
  "description": "My awesome desktop app",
  "url": "https://myapp.com",
  "appId": "com.example.myapp",
  "icon": "./icon.png",
  "platforms": ["mac", "windows", "linux"],
  "window": {
    "width": 1200,
    "height": 800,
    "minWidth": 800,
    "minHeight": 600,
    "resizable": true,
    "frame": true,
    "transparent": false
  },
  "features": {
    "autoUpdate": true,
    "tray": false,
    "menuBar": true,
    "notifications": true,
    "deepLinks": false
  },
  "advanced": {
    "userAgent": "MyApp/1.0",
    "allowedDomains": ["myapp.com", "api.myapp.com"],
    "nodeIntegration": false
  },
  "codeSigning": {
    "mac": {
      "enabled": true,
      "teamId": "ABCDE12345",
      "identity": "Developer ID Application: Your Name"
    },
    "windows": {
      "enabled": true,
      "certificatePath": "./cert.pfx"
    }
  },
  "build": {
    "outputDir": "dist",
    "compression": "maximum",
    "asar": true
  }
}

Required Fields

name

Type: string (1-100 characters)

Application name displayed to users.

author

Type: string (1-200 characters)

Author or company name.

version

Type: string (semantic version)

Semantic version (e.g., 1.0.0)

url

Type: string (valid URL)

Web app URL to load in the desktop app.

appId

Type: string (reverse domain notation)

Unique identifier in reverse domain notation (e.g., com.example.app)

platforms

Type: array (at least one platform)

Target platforms: mac, windows, linux

Window Configuration

"window": {
  "width": 1200,        // 400-4000px
  "height": 800,        // 300-3000px
  "minWidth": 800,      // Optional, min 200px
  "minHeight": 600,     // Optional, min 200px
  "resizable": true,    // Allow window resizing
  "frame": true,        // Show window frame
  "transparent": false  // Transparent window
}
widthnumber (400-4000)

Initial window width in pixels.

heightnumber (300-3000)

Initial window height in pixels.

resizableboolean

Whether the window can be resized.

frameboolean

Show native window frame (title bar, close button).

Features Configuration

"features": {
  "autoUpdate": true,      // Enable auto-updates
  "tray": false,           // System tray icon
  "menuBar": true,         // Application menu bar
  "notifications": true,   // Desktop notifications
  "deepLinks": false       // Custom URL scheme
}
autoUpdateboolean

Automatically check for and install updates.

trayboolean

Add a system tray icon.

menuBarboolean

Show the application menu bar.

notificationsboolean

Enable desktop notifications.

deepLinksboolean

Register custom URL scheme (e.g., myapp://).

Advanced Configuration

"advanced": {
  "userAgent": "MyApp/1.0",              // Custom user agent
  "allowedDomains": ["myapp.com"],       // Allowed domains
  "csp": "default-src 'self'",           // Content Security Policy
  "nodeIntegration": false                // Enable Node.js in renderer
}

Warning: Enabling nodeIntegration can pose security risks. Only enable if absolutely necessary.

Code Signing

Code signing is required for distribution on macOS and recommended for Windows.

"codeSigning": {
  "mac": {
    "enabled": true,
    "teamId": "ABCDE12345",
    "identity": "Developer ID Application: Your Name"
  },
  "windows": {
    "enabled": true,
    "certificatePath": "./cert.pfx",
    "certificatePassword": "password"
  }
}

Tip: Store certificate passwords in environment variables, not in the config file.

Build Configuration

"build": {
  "outputDir": "dist",        // Output directory
  "compression": "maximum",   // 'normal' or 'maximum'
  "asar": true                 // Package as ASAR archive
}
outputDirstring

Directory where build artifacts will be saved.

compression'normal' | 'maximum'

Compression level for installers. Maximum compression reduces file size but increases build time.

asarboolean

Package app files into an ASAR archive for faster loading and obfuscation.