webhook / webhook-cms

The CMS layer for Webhook.com
http://www.webhook.com
MIT License
178 stars 41 forks source link

Webhook Overview

This repository is for the Webhook CMS layer. There are several other repositories in Webhook's core.

If you are interested in self-hosting Webhook, check the instructions here.

Webhook CMS

The Webhook CMS is the CMS layer of Webhook.com. Essentially it is a one-page Ember app based upon Ember App Kit. It uses an ES6 Module Transpiler which allows for ES6 module syntax. The code for the Ember app is in the app directory.

The CMS provides two primary functions.

How to install for local development

Important: You need a working Webhook site account to develop on the CMS.

Steps to install:

Widgets in the form builder

Webhook uses a form builder to construct the various data entry forms users will use in the CMS. We call the different fields the Formbuilder allows "widgets".

The config/environment.js file names every widget the Form Builder allows. Each widget is organized into a controlType and a controlTypeGroup. Below is an example of the number widget:

{
  name     : 'Number',       // display name for widget
  widget   : 'number',       // id for widget
  iconClass: 'icon-list-ol', // icon for the button used in the Form Builder.
  valueType: null            // 'object' is the only supported non-null value type
}

The widget id field determines the proper template and code to execute in the CMS. If the value you are going to store is not a string or number, you must use the 'object' valueType. There are three differnt templates for each widget all located in the app/templates/widgets directory.

Validation for all widgets is done in app/utils/validators.js.

Handlebar helpers

Helpers are located in app/helpers.