1212
GitHub - itstar-tech/mattermost-apps: A demo of what Mattermost plugins can do. · GitHub
Skip to content

itstar-tech/mattermost-apps

 
 

Repository files navigation

Mattermost Plugins Monorepo

Build Status Code Coverage Release HW

Maintainer: @hanzei Co-Maintainer: @jfrerich

This is a monorepo containing multiple Mattermost plugins demonstrating various capabilities. It uses Bazel as the build system for efficient builds and dependency management across all plugins.

Plugins

Demo Plugin (demo/)

The original demo plugin demonstrating the capabilities of a Mattermost plugin. It implements all supported server-side hooks and registers a component for each supported client-side integration point.

Demo2 Plugin (demo2/)

A second demo plugin with identical functionality but unique plugin ID for testing and development purposes.

Each plugin has its own directory with:

  • server/ - Go server-side code
  • webapp/ - React/TypeScript client-side code
  • assets/ - Plugin assets (icons, etc.)
  • public/ - Static public files
  • plugin.json - Plugin manifest

Building the Plugins

This monorepo uses Bazel as the build system. To build the plugins:

Prerequisites

  • Bazel
  • Go 1.19+
  • Node.js 20.x

Building

  1. Build all plugins:

    bazel build //:all_plugins

    This generates .tar.gz files for all plugins ready for distribution.

  2. Build individual plugins:

    # Build demo plugin
    bazel build //demo:plugin_bundle
    
    # Build demo2 plugin  
    bazel build //demo2:plugin_bundle
  3. Build specific components:

    # Build only a server component
    bazel build //demo/server:server_binaries
    
    # Build only a webapp component
    bazel build //demo/webapp:webapp_bundle
  4. Run tests:

    # Run Go tests for a specific plugin
    bazel test //demo/server:server_test
    bazel test //demo2/server:server_test
    
    # Run webapp tests
    bazel test //demo/webapp:test_config
    bazel test //demo2/webapp:test_config

Monorepo Structure

├── demo/                    # Demo Plugin
│   ├── assets/
│   ├── public/
│   ├── server/
│   ├── webapp/
│   ├── plugin.json
│   └── BUILD.bazel
├── demo2/                   # Demo2 Plugin
│   ├── assets/
│   ├── public/  
│   ├── server/
│   ├── webapp/
│   ├── plugin.json
│   └── BUILD.bazel
├── BUILD.bazel              # Root build configuration
├── MODULE.bazel            # Bazel module configuration
└── package.json           # Shared Node.js dependencies

Adding New Plugins

To add a new plugin to the monorepo:

  1. Create a new directory (e.g., my-plugin/)
  2. Copy the structure from demo/ or demo2/
  3. Update the plugin.json with unique ID and name
  4. Create a BUILD.bazel file following the existing pattern
  5. Add the new plugin to //:all_plugins target in root BUILD.bazel

Note that plugins are authored for the Mattermost version indicated in the min_server_version within each plugin.json, and may not be compatible with earlier releases of Mattermost.

Releasing this plugin

A new minor version of this plugin is released with every feature release of Mattermost. The new version should be cut until Code complete.

About

A demo of what Mattermost plugins can do.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 62.8%
  • JavaScript 29.0%
  • Starlark 7.1%
  • Other 1.1%