Step 1: Initial Setup and Project Structure

by Jan König on Apr 17, 2019

Migrate an Alexa Skill from ASK SDK to Jovo: Initial Setup and Project Structure

Learn about the differences of an Alexa Skill project built with the Jovo Framework compared to the Alexa Skills Kit (ASK) SDK. In this step, we will install the Jovo CLI, create a new Jovo Framework project, and test out a first "Hello World" with the Jovo Debugger.

Creating a Jovo Project

You can find the full code example on GitHub.

As the Jovo Framework comes with a different folder structure than typical ASK CLI projects, the easiest way to get started and play around is to create a new Jovo project.

Usually, this is done by using the Jovo CLI. You can install it like this:

You can then use the jovo new command to create a new project:

This will create a Jovo project into a newly created QuizGame folder. You can go into the folder like this:

Let's take a look at the folder structure.

Understanding the Jovo Project Structure

Learn nore about the Jovo project structure here.

You can find the differences of an ASK SDK project and a Jovo Framework project in the illustration below:

ASK SDK vs Jovo Framework Folder Structures

The Jovo Framework also consists of a test folder, but right now, the following folders and files are most interesting for us:

In a later section (Optional: Deploy to the Alexa Developer Console), we will create an additional platforms folder which will consist the skill.json and Alexa Interaction Model files that you know from ASK SDK projects.


Learn more about the project.js file here

The Jovo Project Configuration includes essential information about your project. For a fresh Jovo project, it looks like this:

This specifies which platforms (e.g. alexaSkill and googleAction) ,including natural language understanding (nlu) services, should be used for this Jovo project. If you want to keep your voice app Alexa-only, you can delete or comment out the googleAction element.

This also includes an endpoint, which is later translated into your personal Jovo Webhook URL that can be used for local prototyping.

For now, this is everything we need. Besides these elements, the project.js file offers additional features that are especially helpful for teams that want to work with staging environments. Learn more in the Jovo Docs.

src folder

This is where the app logic is happening. This is the equivalent of the lambda/custom folder in a typical ASK SDK project.

It usually contains the following files:

  • app.js: We will be mostly looking at this file, which contains all our app logic.
  • config.js: App configurations can be added here. More on this later.
  • index.js: You usually don't have to touch this file.

In steps 3: Migrating Intents and Handlers and 4: Migrating the App Logic, we will take a closer look at the contents of the src folder, especially the app.js and config.js files for app logic and configuration.

models folder

Learn more about the Jovo Language Model here.

The Jovo Language Model files are located in the models folder. Those files (like en-US.json in our example) can then be translated into an Alexa Interaction Model (or a Dialogflow Agent for Google Assistant) by using the Jovo CLI.

We will take a deeper look in Step 2: Migrating the Alexa Interaction Model).

A First Hello World

Let's do some testing first to understand how local development works with the Jovo Framework, which offers a local development server and the Jovo Debugger for fast testing.

This way, you don't have to upload your code to a server (or AWS Lambda) every time you make a change. Just run the following command:

By copying the webhook URL into a browser window, you can access the Jovo Debugger, which you can also open by typing . in your terminal after running the server. With a click on the LAUNCH button, you can test the functionality of the "Hello World" Jovo template:

Jovo Debugger Hello World

If you already have an Alexa Skill project in the Alexa Developer Console, you can copy your webhook URL and paste it into the endpoint section to test your code with a device. If you don't have an existing Skill project, no worries, we can create one in the next section.

Optional: Deploy to the Alexa Developer Console

If you don't already have an existing Skill project in the Alexa Developer Console, you can use the Jovo CLI to create a new Alexa Skill.

Use the following two commands for this:

The build command will create a platforms folder, which contains an alexaSkill folder with all the platform-specific elements like .ask and skill.json, which you know from your typical ASK SDK projects:

Jovo Alexa Skill Folder

This also includes the Alexa Interaction Model in alexaSkill/models, which was translated from the Jovo Language Model file.

The deploy command then uses these files and uploads them to the Alexa Develope Console. If you don't have a Skill ID specified in your .ask/config file, it will create a new Alexa Skill project. Note: The Jovo CLI uses ASK CLI for deployment. Learn how to set it up here.

Next Step

This is it. We took a look at a Hello World Jovo project and then created our first Alexa Skill with the Jovo CLI. In the next step), we will update the language model to be able to quickly test the Skill.

Step 2: Migrating the Alexa Interaction Model

Jan König

Co-founder at Jovo

Comments and Questions

Any specific questions? Just drop them below or join the Jovo Community Forum.

Join Our Newsletter

Be the first to get our free tutorials, courses, and other resources for voice app developers.