Spanish Total.js
English
Documentation For AI agents
Contents

Your own catalogue

Publish your components in a catalogue file that appears in the Download components window next to the official components.

.md GitHub
On this page

A catalogue is a JSON file that lists components and the addresses of their files. Flow shows the official catalogue in the Download components window, and it can show a second catalogue of your own next to it, so your team installs your components the same way as the official ones.

The Download components window with a Demo group of three components from a custom catalogue

The catalogue file

The file is an array with one object for each component. It has the same structure as db.json in the official repository:

[
    {
        "id": "greeting",
        "group": "Demo",
        "name": "Greeting",
        "url": "https://components.example.com/greeting.html",
        "author": "Jane Doe",
        "icon": "ti ti-comment",
        "color": "",
        "version": "1",
        "kind": "",
        "readme": "Greets the incoming name. The greeting can contain variables, for example `{welcome}`."
    }
]
FieldWhat it does
idThe id of the component.
nameThe name in the window. Flow also uses it to find out whether the component is installed.
groupThe heading in the window. Components without a group are listed first, without a heading.
urlThe address of the component file. Flow downloads it when the user selects the component.
versionThe version. When it is higher than the installed version, the window shows an update badge.
authorThe author. An author that does not contain Total.js gets a Community badge.
iconThe icon in the window.
colorA color for the icon, for example #7A5CFF. Empty uses the color of the group.
kindA label, such as trigger, action or output.
readmeThe text of Read me, in Markdown.

Keep name, version and icon in the file equal to exports.name, exports.version and exports.icon of the component. Flow installs the component under the exports.id of the file.

Publish it

Put the catalogue and the component files on a web server. The browser of each user downloads them, so:

  • the addresses must be reachable from the browsers of your users;
  • on another domain than Flow, the server must allow cross-origin requests (CORS).

The public folder of Flow is one place for them: a file at public/catalogue/db.json is served at /catalogue/db.json by Flow itself.

Connect it to Flow

  1. Stop Flow.
  2. Add the address of your catalogue to the config file in the Flow folder:
components2 : https://flow.example.com/catalogue/db.json
  1. Start Flow again.

Open the designer, select Add, then Download components. Your components appear in their groups next to the official ones. For the other keys of the file, see Configuration file.

Release a new version

  1. Change the component file and raise exports.version, for example from 1 to 2.
  2. Raise version of the component in the catalogue to the same number.

In every FlowStream that has the old version, the window shows the update badge on the component. Selecting it installs the new file.

Made in Europe