Extensions

Extensions provide additional functionality or custom UI to your SAYMON installation.

Extension installation

The list of installed extensions is available to all users via the current user menu (User login  Extensions), but the data inside is limited to their permissions and object access.

To add a new extension just click the image or image button, or visit saymon.tech/extensions page.

image

In the opened folder, go to the page of the extension you are interested in and follow the steps described in the installation manual.

Custom extensions

SAYMON users can develop their own web applications, expanding or using SAYMON possibilities.

In order to include such applications in SAYMON server it is necessary to:

  1. Add the extensions section to the server configuration file and specify the path to the folder with extensions in the path parameter. For example, "/opt/saymon-extensions":

    "extensions": {
        "path": "/opt/saymon-extensions"
    }
  2. Place the content of each application in a separate folder inside the root one. For example, /opt/saymon-extensions/my-extension. This folder will be the entry point into the client part of the application, available by the following URL: <SAYMON_server_address>/extensions/my-extension.

  3. Add the section location ^~ /extensions to the /etc/nginx/sites-enabled/saymon file and specify the folder from extensions.path in the alias parameter:

    # SAYMON Extensions folder.
        location ^~ /extensions {
           alias /opt/saymon-extensions/;
           try_files $uri $uri$args $uri$args/ @extension;
           autoindex on;
        }

To be available in the list of all extensions, displayed in the SAYMON web interface, an extension must contain the file package.json or meta.json (data from meta.json has higher priority).

Format and fields of the meta.json file:

Parameter Description

author

Author of the extension.

date

Release date of the installed extension.

description

Short description of the extension.

homepage

Link to the homepage of the extension.

icon

Direct link to the icon of the extension. By default the file icon.png from the extension folder is used.

name

Name of the extension.

Names of extensions from third-party developers cannot start with the word SAYMON.

nameInUrl

Part of the link to the page with the extension. It matches the name of the folder containing the file index.html of the extension. <SAYMON_server_address>/extensions/<nameInUrl>

urlToMeta

Direct link to the latest version of the meta.json file to check for updates.

version

Version of the installed extension.

Example of the meta.json file:

{
    "author": "SAYMON User",
    "date": "2020/12/31",
    "description": "Very useful custom extension",
    "homepage": "https://saymon.tech/extensions/my-extension/",
    "icon": "https://saas.saymon.info/extensions/my-extension/favicon.ico",
    "name": "My Extension",
    "nameInUrl": "my-extension",
    "urlToMeta": "https://saymon.tech/extensions_meta/my-extension/meta.json",
    "version": "1.0.1"
}