HomeDocsFeaturesAddon System
Features

Addon System

Extend the panel with custom addons from the marketplace.

bthavanishBy bthavanish

Addon System

Airlink supports addons that add features to the panel. Addons are loaded at startup and can add routes, views, commands, and configuration.

Addon Model

FieldTypeDescription
idIntAuto-incrementing ID
nameStringDisplay name
slugStringUnique identifier
descriptionStringDescription
versionStringVersion string
authorStringAuthor name
enabledBooleanWhether addon is active
mainFileStringEntry point (default: index.ts)

Addon Settings

Each addon can have key-value settings:

FieldTypeDescription
addonSlugStringAddon FK
keyStringSetting key
valueTextSetting value

Addon Architecture

Addons are loaded by the addon handler (src/handlers/addonHandler.ts) which:

  1. Reads addon manifests from the addons directory
  2. Loads enabled addons
  3. Registers their routes, views, and commands
  4. Manages addon lifecycle (enable, disable, reload, uninstall)

Addon Components

ComponentFilePurpose
ManifestaddonManifest.tsAddon metadata and configuration
HandleraddonHandler.tsLifecycle management
CommandsaddonCommands.tsCLI command registration
Config StoreaddonConfigStore.tsSettings persistence
Slot RegistryaddonSlotRegistry.tsExtension points
View ResolveraddonViewResolver.tsTemplate resolution
Component ResolveraddonComponentResolver.tsUI component injection

Managing Addons (Admin)

List Addons

GET /api/v2/admin/addons

Toggle Addon

POST /api/v2/admin/addons/:slug/toggle

Reload Addon

POST /api/v2/admin/addons/:slug/reload

Uninstall Addon

POST /api/v2/admin/addons/:slug/uninstall

Addon Permissions

Addons can register custom permissions in the addon.{slug}.* namespace. These are validated to ensure they stay within the addon’s namespace.

See admin/roles-and-permissions.md for details on the permission system.

Image Store

The panel includes an image store for discovering and installing server image definitions (eggs). The store fetches a catalogue of available images and lets admins install them.

GET /api/v2/admin/images/store/catalogue
POST /api/v2/admin/images/store/refresh
POST /api/v2/admin/images/store/install