Simple greet app tutorial

Let’s write simple app ‘greet’. This app should contain at least one facet “someone” and one command “greet” in this facet.

Create app structure

Project structure to create.

  • greet-app
    • pom.xml
    • src
      • main
        • groovy
          • global.groovy
          • someone
            • someone.groovy
        • resources
          • descriptor.json
          • assets
            • someone-channel-logo.svg
          • channel
            • channel-type.json



We need descriptor for the app that defines facets, app identity and other configuration of the app.

  "id": "greet",
  "version": 0,
  "facets": [
      "id": "someone",
      "name": "Greet Someone",
      "requires": [
      "iconName": "plugin:greet:someone-channel-logo.svg"

As you can see we define app with id = “greet” and version = 0.

This app contain one facet with id = “someone”. FullFacetId will be “greet.someone”

Facet name is “Greet Someone”. It requires “default.default” facet. When we add facet “greet.someone” to the channel facet “default.default” will be added with it.

Channel with this facet will have someone-channel-logo.svg icon from our assets folder. Common pattern is: “plugin:${appId}:${assetFileName}.svg”

Leverice Webhook Bot



We can add .svg icons here to use it in the facet descriptors as channel icons. Use fill=”currentColor” to inherit channels’ tree icon colors.


<svg xmlns="" width="16" height="16" viewBox="0 0 16 16">
    <g fill="currentColor" fill-rule="evenodd">
        <path fill="#475F7B" d="M12.817 10.922l-.102 2.394c-.03.386-.232.73-.555.943l-2.417 1.598c-.143.095-.307.143-.472.143-.118 0-.236-.024-.348-.074-.142-.063-.725-.66-1.751-1.794 2.14-.749 4.064-1.83 5.645-3.21zM15.014 0c.31 0 .625.01.946. 6.762-5.187 10.438-9.474 11.891l-.266.088-3.321-3.317C4.166 5.562 8.01 0 15.014 0zM1.878 8.762l-.019.058C.732 7.8.136 7.218.074 7.077c-.119-.269-.093-.575.069-.82L1.74 3.84c.214-.323.557-.525.943-.555l2.387-.102C3.66 4.765 2.576 6.675 1.878 8.762zm10.204-3.538c-.722 0-1.306-.584-1.306-1.306 0-.721.584-1.306 1.306-1.306.721 0 1.306.585 1.306 1.306 0 .722-.585 1.306-1.306 1.306z"/>
        <path fill="#FFB300" d="M4.482 13.66c.183-.183.48-.183.663 0 . 0 .663l-1.53 1.53c-.092.092-.212.138-.332.138-.12 0-.24-.046-.331-.138-.183-.183-.183-.48 0-.663zm-2.805-2.805c.183-.183.48-.183.663 0 . 0 .663l-1.53 1.53c-.092.092-.212.137-.332.137-.12 0-.24-.045-.331-.137-.183-.183-.183-.48 0-.663z"/>
        <path fill="#FA321E" d="M3.743 12.257c-.183-.183-.48-.183-.663 0L.137 15.2c-.183.183-.183.48 0 .663. 0 .24-.046.331-.137l2.943-2.943c.183-.183.183-.48 0-.663z"/>

groovy scripts


You can use this file to add command to the all channels in your workspace.

If you want it write further implementation in this file and don’t create facet specific groovy files.

For your custom apps you can combine this file with other facet specific groovy files.


Use this file to implement the “greet.someone” facet scoped business logic.

File name can differ with facet name and there are can be many files.

But path to the file must match to the pattern “/src/main/groovy/${facetId}/”


def greet(name) {
 send "Hello, $name!"

Just add this to your groovy file to define “/greet” command with string “name” parameter.

channel types


This is the place for the channel type descriptors. Skip it for this tutorial.

build zip archive to deploy

run “mvn clean assembly:single” to build the app. You can find it in the newly created “target” folder.


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""



    <name>${project.artifactId}: Tutorial Greeting App</name>



You create the greet app for you Leverice workspace. Lets Deploy an app into the workspace!