.. _starter-kit:
This project is designed to be a simple template for your new skills. With some well thought defaults that have proven useful when developing real life skills.
It has the following directory structure
.
├── README.md
├── config
│ ├── env.js
│ ├── index.js
│ ├── local.json.example
│ ├── production.json
│ └── staging.json
├── gulpfile.js
├── package.json
├── serverless.yml
├── services
├── skill
│ ├── MainStateMachine.js
│ ├── index.js
│ ├── variables.js
│ └── views.js
├── speechAssets
│ ├── IntentSchema.json
│ ├── SampleUtterances.txt
│ └── customSlotTypes
├── test
├── server.js
By default your skill will have the following environments:
- local
- staging
- production
What environment you're is determined in the config/env.js
module.
This is where your code to handle alexa events goes, you will usually have a State Machine definition, this will include :ref:states <controllers>
, :ref:middleware <statemachine-skill>
and a :ref:Model <models>
, :ref:views-and-variables
This should be a version controlled copy of your intent schema, sample utterrances and custom slots.
An http server for your skill configured to listen on port 3000, this should be used for development only.
Just a common place to put models and libraries
You write tests right?
A gulp runner configured with a watch task that starts your express server and listens for changes to reload your application.
The serverless framework is a tool that helps you manage your lambda applications, assuming you have your AWS credentials setup properly this starter kit defines the very minimum needed so you can deploy your skill to lambda with the following command:
$ sls deploy
- If you are using node.js for the first time, install node:
- Install
nvm <http://nvm.sh/>
_,curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
, - Install node 4.3,
nvm install 4.3
-
Install gulp globally,
npm install -g gulp
-
Install
ngrok <https://ngrok.com/download>
, andadd it to your local bin <https://gist.github.com/wosephjeber/aa174fb851dfe87e644e>
-
Clone the
voxa <https://github.com/VoxaAI/voxa>
_ repository -
Create a new skill project using the
samples/starterKit
directory as a basis -
Make sure you're running node 4.3, this is easiest with
nvm <https://github.com/creationix/nvm>
_ -
In your skill directory, install node dependencies using
npm install
-
Create a
config/local.json
file usingconfig/local.json.example
as an example -
Run the project with
gulp watch
-
At this point you should start
ngrok http 3000
and configure your skill in the Amazon Developer panel to use the ngrok https endpoint.