Skip to content

bilbof/clubhouse-zendesk

Repository files navigation

Clubhouse-Zendesk

Description

This contains an unofficial Clubhouse integration with Zendesk, that you can add to your own Zendesk instances. This app was developed by a third party and is not associated with Clubhouse (other than using their API).

You can install the app into your Zendesk from the Zendesk Apps Marketplace.

This app was built using Zendesk's App Scaffold.

Screenshots

Getting Started

Dependencies

Setup

  1. Clone or fork this repo
  2. Change (cd) into the clubhouse-zendesk directory
  3. Run npm install

To run your app locally in Zendesk, you need the Zendesk Apps Tools (ZAT).

You'll also need to run a couple of command-line Node.js-based tools that are installed using npm. For a node module to be available from the command-line, it must be installed globally.

To setup these and other dependencies, run these commands:

gem install zendesk_apps_tools
npm install --global webpack foreman karma-cli

Note: Foreman was originally created as a Ruby tool. If you prefer, you can install it by gem install foreman instead.

Running locally

Note: This app currently depends on zat v1.35.12 or greater.

Foreman allows you to easily run multiple processes in one tab. One process is zat server --path=./dist, which serves the app in a way that can be run in a supported Zendesk product. The second is webpack --watch to rebuild the project whenever you save changes to a source file.

To run these processes, run

nf start

or run the individual commands from the Procfile in separate terminals.

Note: If you installed the Ruby version of foreman, you'll need to use foreman start.

Application structure

dist

The dist directory is the folder you will need to package when submitting your app to the marketplace. It is also the folder you will have to serve when using ZAT. It includes your app's manifest.json file, an assets folder with all your compiled JavaScript and CSS as well as HTML and images.

lib

The lib directory is where the source code for the app shims and compatibility methods live. While you may modify or remove this code as required for your app, doing so is not recommended for beginners.

spec

The spec directory is where all your tests and test helpers live. Tests are not required to submit/upload your app to Zendesk and your test files are not included in your app's package, however it is good practice to write tests to document functionality and prevent bugs.

src

The src directory is where your raw source code lives. The App Scaffold includes different directories for JavaScript, stylesheets, templates and translations. Most of your additions will be in here (and spec, of course!).

.eslintrc

.eslintrc is a configuration file for ESLint. ESLint is a linting utility for JavaScript. For more information on how to configure ESLint, see Configuring ESLint.

karma.conf.js

karma.conf.js is a configuration file for Karma. Karma is a JavaScript test runner. This file defines where your source and test files live. For more information on how to use this file, see Karma - Configuration File.

package.json

package.json is a configuration file for NPM. NPM is a package manager for JavaScript. This file includes information about your project and its dependencies. For more information on how to configure this file, see package.json.

webpack.config.js

webpack.config.js is a configuration file for webpack. Webpack is a JavaScript module bundler. For more information about webpack and how to configure it, see What is webpack.

Initialization

The App Scaffold's initialization code lives in src/index.js. For more information, see inline documentation.

API Reference

The App Scaffold provides some classes under /lib to help building apps.

I18n

The I18n (internationalization) module provides a t method and Handlebars helper to look up translations based on a key. For more information, see Using the I18n module.

Storage

The Storage module provides helper methods to interact with localStorage. For more information, see Using the Storage module.

View

The View module provides methods to simplify rendering Handlebars templates located under the templates folder. For more information, see Using the View module.

Parameters and Settings

If you need to test your app with a parameters section in dist/manifest.json, foreman might crash with a message like:

Would have prompted for a value interactively, but zat is not listening to keyboard input.

To resolve this problem, set default values for parameters or create a settings.yml file in the root directory of your app scaffold-based project, and populate it with your parameter names and test values. For example, using a parameters section like:

{
  "parameters": [
    {
      "name": "myParameter"
    }
  ]
}

create a settings.yml containing:

myParameter: 'some value!'

If you prefer to manually input settings every time you run foreman, edit the Procfile to remove the --unattended option from the server command.

Testing

The App Scaffold is currently setup for testing with Jasmine (testing framework) and Karma (test runner). To run specs, run

karma start

Specs live under the spec directory and can be configured by editing the karma.conf.js file.

Deploying

To check that your app will pass the server-side validation check, run

zat validate --path=./dist

If validation is successful, you can upload the app into your Zendesk account by running

zat create --path=dist

To update your app after it has been created in your account, run

zat update --path=dist

Or, to create a zip archive for manual upload, run

zat package --path=dist

taking note of the created filename.

For more information on the Zendesk Apps Tools please see the documentation.

Useful Links

Links to maintaining team, confluence pages, Datadog dashboard, Kibana logs, etc

About

Clubhouse integration with Zendesk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published