Coder Social home page Coder Social logo

markkop / essence-helper-jovo Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 63 KB

A voice app that provides information about ZenithVR MMORPG

Home Page: https://www.amazon.com/dp/B09T6XJ3NT

JavaScript 14.34% TypeScript 83.36% Shell 2.30%
alexa alexa-skills-kit alexa-app google google-assistant google-actions jovo jovo-framework voice-assistant voice-app

essence-helper-jovo's Introduction

๐ŸŽ™๏ธ Essence Helper

https://img.shields.io/static/v1?label=made%20with&message=jovo&color=272f48&logo=data:https://www.jovo.tech/favicon.ico https://img.shields.io/static/v1?label=google%20assistant&message=compatible&logo=googleassistant&color=brightgreen https://img.shields.io/static/v1?label=amazon%20alexa&message=compatible&logo=amazonalexa&color=brightgreen

Essence Helper is a voice app compatible with Google Assistant and Amazon Alexa that retrieves information about ZenithVR MMORPG.

This project is made using Jovo Framework with the goal to avoid duplicate logic and code while developing the skill for Alexa and Google Assistant.

Before discovering this framework, I've developed the same skill for both platforms using their own SDKs:

Previous Alexa Skill repository:
https://github.com/Markkop/essence-helper-alexa-skill
Previous Google Action repository:
https://github.com/Markkop/essence-helper-google-action

Get the skill

Setup

  • Install Jovo CLI with npm install -g @jovotech/cli
  • Install and setup ASK CLI following these instructions.
  • Install and setup Gactions CLI following these instructions
  • I suggest installing it with npm i -g @assistant/gactions instead of the zip file as indicated in the guide above.
  • Run npm install in the root folder of the project

Develop

Locally only

  • Run jovo run
  • Press . to open web interface
  • Interact with the app by sending requests to Jovo Debugger.

Using local code with remote console

Test

Unit Testing

To run unit tests for the jovo app itself simply run npm run test

Alexa Dialog Replays

To simulate requests directly to the Alexa Skill, run npm run test:dialog.
This will run ask dialog -r replay_file.json for each dialog replay file inside test/alexa/dialog-replays.
Make sure to deploy the dev or prod endpoint according to the testing you want to make.

For replaying a single file, run ./scripts/alexa-dialogs.sh -f <filename> as in ./scripts/alexa-dialogs.sh -f launch, for example.

Google Assistant Testing

To simulate requests to the Google Action, first setup a service account by following these instructions.
Then run npm run enable-activity-controls only once.
Finally you can run npm run test:google To able to run the latest draft version, the test rewrites the app preview everytime you run the test suite.
If you want to keep running tests without changes in the action model and settings, you may skip this rewriting.
Run npm run test:google:norewrite in this case.

Deploy

Platform

Running npm run deploy:<platform>:<stage> will deploy the model and platform settings within three steps:

  • It will first get files from remote console and put them in the build folder
  • Then it will build files from Jovo Models and other custom settings adding and replacing files in build folder
  • Finally it will deploy the files in the build folder to the platform console

Note: we get them first to keep some of the settings we have already set in previous builds and/or keep settings we've inputted in the console.

The difference between stage dev and prod is the endpoint we're setting for the app.
With the dev endpoint, we're able to have all the requests routed to our Jovo App instance locally and therefore test our code using the platform console or device.
Just make sure to run jovo run once to copy the Jovo Webhook Endpoint and save it as an env variable (JOVO_WEBHOOK_URL)

Note: the only reason to use the Jovo Webhook Endpoint from an env variable and not the default project setting variable is because of Alexa's regions endpoint settings that have to be set in a customized manner as coded at jovo.project.js. Although Alexa Console says that the NA endpoint is optional, if setting it empty the webhook won't work.

Code

Running npm run deploy:code will deploy the code to the AWS Lambda function using Jovo integration with Serverless CLI and AWS Lambda integration.
You might need to install Serverless CLI: npm i -g serverless and configure it
Then you will need to export your AWS Credentials or configure serverless with the following command:

serverless config credentials \
  --provider aws \
  --key AKIAIOSFODNN7EXAMPLE \
  --secret wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

essence-helper-jovo's People

Contributors

markkop avatar

Stargazers

 avatar  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.