node package manager

voxa

Voxa

Build Status Coverage Status Documentation npm Gitter

A fsm (state machine) framework for Alexa apps using Node.js

Summary

Voxa is an Alexa skill framework that provides a way to organize a skill 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. It provides a design pattern that wasn’t found in other frameworks. Critical to Voxa was providing a pluggable interface and supporting all of the latest ASK features.

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 Voxa = require('voxa');
 
// Controllers use views to send responses to the user
const views = {
  LaunchIntent: { tell: 'Hello World!' },
}
 
// initialize the skill
const skill = new Voxa({ views })
 
// respond to a LaunchIntent
skill.onIntent('LaunchIntent', (event) => {
  return { reply: 'LaunchIntent' };
});
 
// lambda handler
exports.handler = skill.lambda();
 

Tests

An extensive test suite with more than 90% code coverage

npm run test

JS Code linting

npm run lint

Resources