Concepts

Before building an application or plugin, it is important to understand what is exactly meant by applications and plugins in Cumulocity IoT.

In this context, applications are based on the Cumulocity IoT UI framework and make up the Cumulocity IoT UI. By default, the Cumulocity IoT UI consists of three core applications, namely “Device Management”, “Administration” and “Cockpit”.

In turn, applications consist of plugins. A plugin represents any functionality you would like to add to an application. With a plugin, you can:

This is illustrated below:

Extension points for plugins

As an example, let us take a look at some plugins being used by the Cockpit application.

Info: You can extend the default applications of Cumulocity IoT (Administration, Cockpit, Device Management) with new functionality. You must create a duplicate of the core application before you can extend it. To create a duplicate of an application, you can either copy it via the UI in the Administration application or create a new application which uses the exact same plugins as the desired application.

Project structure

Whenever you create a new application or plugin, you have to comply with the following folder structure. Otherwise the application or plugin will not work.

The default folder structure of an application is as follows:

<<root folder>>
├── cumulocity.json
|	...
└── plugins
		└── <<plugin name>>
				├── cumulocity.json
				└── index.js
			...

Inside the root folder of your application, the application manifest is stored in the cumulocity.json file.

The folder plugins contains one folder per plugin contributed by the application. The plugin folder name together with the application name uniquely identifies the plugin. Inside each plugin folder, the plugin manifest is stored in another cumulocity.json file.

The format of the application manifest and the plugin manifest is described in Manifests.

If you only want to create a plugin and add it to an already existing application, use the exact folder structure described above:

<<root folder>>
└── <<plugin name>>
		├── cumulocity.json
		└── index.js
		...

Create an explicit root folder for your project. The Web SDK assumes that the parent folder of the root folder is readable by your operating system user.

Manifests

Application manifest

The application manifest describes where your application is stored and how it is exposed to Cumulocity IoT.

The following properties are available:

Info: The properties “contextPath” and “key” need to be unique. For “PRIVATE” applications, the properties “name” and “contextPath” need to be unique within your tenant only.

Plugin manifest

The plugin manifest describes how your plugin is shown in the Cumulocity IoT Administration application (name, description, category, gallery, list) and what files need to be built and loaded in order to run the plugin (ngModules, js, imports, css, less, copy).

Most of the content of the manifest file corresponds to the application API properties, described in the REST reference. Examples of manifest files can be found in the GitHub repository.