Developer Guide

Extension Development

Learn how to create, build, and publish your own extensions for the ZentrixClient Launcher.

# 1. File Structure

An extension is a ZIP file containing the following required structure at the root:

my-extension/
├── manifest.json  (Required)
├── main.js        (Required - Entry Point)
└── (other files)

All files are optional except manifest.json and main.js. The ZIP should contain the contents of the folder, not the folder itself.

# 2. manifest.json

Defines metadata about your extension. This is used by the launcher to display information to the user.

{
  "id": "my-awesome-extension",
  "name": "My Awesome Extension",
  "version": "1.0.0",
  "description": "Adds a cool new feature.",
  "author": "YourName",
  "main": "main.js"
}
id

Unique identifier (lowercase, hyphens)

version

Semantic versioning (x.y.z)

# 3. main.js Hooks

The extension system runs your code in a sandboxed environment. You must expose specific hooks.

activate(api)

Called when the extension is enabled or the app starts.

deactivate()

Called when the extension is disabled or removed.

/* Example main.js */
exports.activate = async (api) => {
    api.ui.toast("Extension loaded!", "success");

    // Register a UI view
    api.ui.registerView('sidebar.bottom', () => {
        return React.createElement('div', null, "Hello!");
    });
};

# 4. Extension API

api.ui

  • toast(message, type) - Show a notification
  • registerView(slot, component) - Add UI to the launcher
  • openModal(component) - Open a modal dialog

api.storage

  • get(key) - Retrieve stored data
  • set(key, value) - Save data persistently
  • delete(key) - Remove data

api.network

  • fetch(url, options) - Make HTTP requests
  • on(event, callback) - Listen to network events

# 5. Packaging

1

Select all files

Select all files inside your extension folder (not the folder itself).

2

Compress to ZIP

Compress the selected files to a ZIP archive.

3

Rename extension

Rename the file to .vcextension (ZentrixClient Extension) for automatic recognition.

4

Upload

Upload your extension to the Extensions page for review.

# 6. Troubleshooting

Extension not loading

Check the console for errors (F12). Ensure manifest.json is valid JSON and all paths are correct.

API methods undefined

Make sure you're using the correct API version. ZentrixClient v2.0+ uses the API described above.

Extension rejected

Check your dashboard for feedback from reviewers. Common issues: missing manifest fields, broken functionality.