Build Your First Apps-Engine App

Prev Next

Apps-Engine apps run inside your Rocket.Chat workspace and extend it with slash commands, API endpoints, automations, and UI elements. This quickstart takes you from nothing to a deployed Hello World app. For the full guides, see the Apps-Engine documentation.

Prerequisites

  • Node.js (check the required version for your Rocket.Chat release) and Git.

  • A Rocket.Chat workspace for testing, with administrator credentials, a local development server or a workspace on an HTTPS domain.

  • Basic familiarity with TypeScript. See Getting Started with Apps-Engine for full environment details.

Step 1: Install the Apps-Engine CLI

npm install -g @rocket.chat/apps-cli

Verify the installation:

rc-apps -v

Step 2: Create the app

rc-apps create

The CLI prompts you for basic details (app name, description, author). It then generates a folder named after your app — for example, hello-world — containing the boilerplate app structure, including the app.json manifest and the main class file.

Step 3: Add the app logic

Open the generated main class file (for example, HelloWorldApp.ts) and log a message from the constructor:

export class HelloWorldApp extends App {

    constructor(info: IAppInfo, logger: ILogger, accessors: IAppAccessors) {
        super(info, logger, accessors)
        this.getLogger().debug('Hello, World!')
    }
}

Step 4: Deploy to your workspace

From the app folder, deploy with your workspace URL and admin credentials:

rc-apps deploy --url <server_url> -u <user> -p <pwd>

Run rc-apps deploy --help to see other authentication options, such as personal access tokens. Alternatively, rc-apps package builds a .zip file you can upload manually as a private app.

Expected result

In your workspace, open Marketplace > Private Apps,the Hello World app is listed. Open its logs (three-dot menu > View Logs) and find the constructor entry containing "Hello, World!".

On some Rocket.Chat versions, you must enable apps development mode before deploying manually: Manage > General > Apps > Enable development mode.

Next steps