openfeedback

0.1.1 • Public • Published

OpenFeedback

OpenFeedback is a fast, open-source framework for dealing with custom designed feedback schemas based on JSON Schema. It uses ElasticSearch for storage and indexing and exposes an optional RESTful API based on the SCRUD methods.

Build Status Test Coverage


Installation

Instal ElasticSearch and then OpenFeedback:

npm install --save openfeedback

Usage

Create a JSON Schema and launch an Express-based API server:

const OpenFeedback = require("openfeedback");
let app = new OpenFeedback();
 
// Create a new JSON Schema called feedback
// Accepts a required body {string} property 
let feedback = app.addSchema("feedback", {
  type: 'object',
  properties: {
    body: {
      description: "A feedback",
      type: 'string',
      minimum: 10
    }
  },
  required: ['body']
});
 
// Start a RESTful API on port 28408
app.connect({ port: 28408 });

Access schema based on SCRUD (Search, Create, Read, Update, Delete) interface:

  • Search: GET localhost:28408/schema-name/?q=body:*word"
  • Create: POST JSON localhost:28408/schema-name/
  • Read: GET localhost:28408/schema-name/id
  • Update: PUT JSON localhost:28408/schema-name/id
  • Delete: DELETE localhost:28408/schema-name/id

Why OpenFeedback?

OpenFeedback is great at storing and indexing customer feedback and general responses all on a very simple API either internally or as a RESTful API. You can create any schema compatible with JSON Schema and get your feedback API up and running within a matter of minutes.


License

MIT

Package Sidebar

Install

npm i openfeedback

Weekly Downloads

3

Version

0.1.1

License

MIT

Last publish

Collaborators

  • schahriar