Skip to content

Pilot project to use Alexa to access WFP data for the Asia Pacific region

Notifications You must be signed in to change notification settings

ReliefApplications/wfp_alexa_backend

Repository files navigation

Backend Alexa WFP

This project is made of two parts. The main and first one is handling the requests made by Amazon Alexa in order to execute some actions. As of now, most of the actions are getting data from google sheet files and aggregate them according to the parameters the user asked for.

It is also possible to control a dashboard with the voice. The dashboard is accessible here.

The .json of the Alexa skills kit is saved in vui.json.


The second part is a socket server that will be used to broadcast the data to the dashboard from the google files without having the front part to do multiple request per second in order to get the changes.

Build

In order to deploy the two servers at the same time on the reliefappstest server, a gulp file has been created. It will create a dist folder that will then be pushed to the server.

gulp build will only copy the files needed in the dist folder and gulp push will only push the files to the server.

Deployment on test server

You can use gulp deploy to build and push to the server.

Local deployment

The two projects are dockerized so if you want to run them locally you simply have to execute the command ./docker-build.sh.

Further help

For the Amazon Skill part : Amazon - Create the Interaction Model for Your Skill

For the self hosting part : Amazon - Host a Custom Skill as a Web Service

For the alexa-app package doc : npm alexa-app

Dependencies and languages

- alexa-app: 4.2.2
- babyparse: 0.4.6
- express: 4.16.3
- request: 2.88.0
- socket.io: 2.1.1
- socket.io-client: 2.1.1
- ssml-builder: 0.4.3

Architecture with use cases

SSL Certificate

In order to use your own server to host the backend for Alexa, you have to certify your host. You can use this documentation form Amazon.

The certificate for the https url does expire on the 15th of January 2019. Don't forget to renew it.

Docker

This project works with Docker.

To start coding in a safe environment, please launch the docker container with the following command:

sudo docker-compose up devapp

If it's the first time, please run

sudo ./docker-build.sh

About

Pilot project to use Alexa to access WFP data for the Asia Pacific region

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •