Getting Started

This guide walks you through integrating Abydonian into your desktop application for license management and automatic updates.

1Create a Product

Log into the Abydonian admin dashboard and create a product with editions (e.g. Free, Pro). Each edition defines features and a maximum number of machines that can be activated.

Note the product slug — you'll use it in all API calls (e.g. nexadeck).

2Generate a Machine ID

Your application needs a stable, unique identifier for each machine. Common approaches:

  • Hardware ID (e.g. motherboard serial, MAC address hash)
  • UUID stored in the app's local data directory on first run
  • OS-specific machine ID (e.g. /etc/machine-id on Linux)

The machine ID is a string you pass to the license API. It does not need to follow any specific format.

3Activate a License

When a user enters their license key, call the activate endpoint to register the machine:

const response = await fetch("https://your-domain.com/api/license/activate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    licenseKey: userEnteredKey,
    machineId: getMachineId(),
    productSlug: "nexadeck",
    machineName: os.hostname(),
    platform: process.platform,
  }),
});

const data = await response.json();

if (data.success) {
  // Store the license key locally for future validation
  saveLicenseKey(userEnteredKey);
} else {
  showError(data.error);
}

4Validate on Startup

On each app launch, call the validate endpoint to check the license status and get the current feature set:

const response = await fetch("https://your-domain.com/api/license/validate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    licenseKey: getSavedLicenseKey(),
    machineId: getMachineId(),
    productSlug: "nexadeck",
  }),
});

const data = await response.json();

if (data.valid) {
  enableFeatures(data.features);
  console.log("Edition:", data.editionName);
} else if (data.canActivate) {
  // Machine not activated yet — activate it
  await activateMachine();
} else {
  // License invalid — show error or fall back to free tier
  showLicenseError(data.error);
}

5Configure Auto-Updates (Tauri)

If your app is built with Tauri, point the updater plugin at the update endpoint:

// tauri.conf.json
{
  "plugins": {
    "updater": {
      "endpoints": [
        "https://your-domain.com/api/update/nexadeck/{{target}}/{{arch}}/{{current_version}}"
      ]
    }
  }
}

Tauri will automatically check for updates and prompt users when a new version is available.

6Publish Releases from CI

Set up your CI pipeline to call the release publishing endpoint after building your app:

  1. Create an API key in Admin → API Keys with the releases:write scope.
  2. Store the API key as a CI secret (e.g. ABYDONIAN_API_KEY).
  3. Add a publish step to your workflow:
curl -X POST https://your-domain.com/api/releases/publish \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ABYDONIAN_API_KEY" \
  -d '{
    "productSlug": "nexadeck",
    "version": "1.2.0",
    "channel": "STABLE",
    "releaseNotes": "Bug fixes and improvements",
    "releases": [
      {
        "platform": "MACOS",
        "arch": "ARM64",
        "downloadUrl": "https://releases.example.com/nexadeck-1.2.0-macos-arm64.tar.gz",
        "signature": "'$UPDATE_SIGNATURE'"
      }
    ]
  }'

7Handle Deactivation

Allow users to deactivate their machine (e.g. when signing out or uninstalling) to free up a machine slot:

const response = await fetch("https://your-domain.com/api/license/deactivate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    licenseKey: getSavedLicenseKey(),
    machineId: getMachineId(),
  }),
});

const data = await response.json();

if (data.success) {
  clearSavedLicenseKey();
  console.log("Machine deactivated");
}

Next Steps