Git Product home page Git Product logo

voxa's Introduction

Voxa

Build Status Coverage Status Documentation npm Gitter

A fsm (state machine) framework for Alexa skills, Google actions, Facebook Messenger and Telegram bots using Node.js

Summary

Voxa is a Node.js MVC framework that provides a way to organize a voice application into a state machine. Even the most complex voice user interface (VUI) can be represented through the state machine and it provides the flexibility needed to both be rigid when needed in specific states and flexible to jump around when allowing that also makes sense.

Why Voxa vs other frameworks

Voxa provides a more robust framework for building Alexa skills, Google Actions, and Facebook Messenger and Telegram Bots. It provides a design pattern that is not found in other frameworks. Critical to Voxa is to provide a pluggable interface and support to all of the latest features from the official frameworks of each voice platform, like ASK and actions-on-google.

Features

  • MVC Pattern
  • State or Intent handling (State Machine)
  • Easy integration with several Analytics providers
  • Easy to modify response file (the view)
  • Compatibility with all SSML features
  • Works with companion app cards
  • Supports i18n in the responses
  • Clean code structure with a unit testing framework
  • Easy error handling
  • Account linking support
  • Several Plugins

Installation

Install from npm

npm install --save voxa

Usage

const {
  AlexaPlatform,
  GoogleAssistantPlatform,
  FacebookPlatform,
  VoxaApp,
} = require('voxa');

// Controllers use views to send responses to the user
const views = {
  en: {
    translation: {
      LaunchIntent: {
        tell: 'Hello World!',
      },
    },
  },
};

const facebookAppParams = {
  pageAccessToken: 'pageAccessToken',
};

// initialize the voice apps
const voxaApp = new VoxaApp({ views });
const alexa = new AlexaPlatform(voxaApp);
const google = new GoogleAssistantPlatform(voxaApp);
const facebook = new FacebookPlatform(voxaApp, facebookAppParams);

// respond to a LaunchIntent
voxaApp.onIntent('LaunchIntent', (event) => {
  return { reply: 'LaunchIntent' };
});

// lambda handlers
exports.alexaHandler = alexa.lambda();
exports.googleHandler = google.lambda();
exports.facebookHandler = facebook.lambda();

Tests

An extensive test suite with more than 90% code coverage

npm run test

JS Code linting

npm run lint

Resources

voxa's People

Contributors

armonge avatar omenocal avatar chrux avatar rmberrios avatar heneryville avatar wuelcas avatar cvaca7 avatar michael-krebs avatar mathmass avatar lvelasquezm avatar snyk-bot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.