The Inspiration Behind Twenty One

Alexa and the Twenty One skill are going to help people lead healthy lives while having fun doing it.

Living a healthy lifestyle is difficult -- especially for those that have kids, are tempted by convenience foods or struggle finding time in their day to get in a quick workout. The struggle is real people!

We've all tried using health apps, diet plans and workout trackers to count calories and stay in shape. But let's face it, most of these solutions are inconvenient and require a lot of effort to produce results. With Alexa making her way into our homes, cars and other connected devices, the Twenty One skill is now available to help lead healthier lives while having some fun doing it.

Are you ready to get healthy? Here's what the Twenty One skill does ...

In a Nutshell

Your mission is to earn 21 healthy lifestyle points every day for the rest of your life.

And Alexa will help inspire you along the way. When you invoke the Twenty One skill, Alexa starts by getting to know you. Twenty one will ask you a couple of questions that personalize your experience. You may then choose from four categories, Diet, Exercise, General and Health. Alexa can guide you through the categories, or you can simply tell Twenty One what you accomplished as you move through your day.

Each time you contribute to a healthy habit, you earn points. Alexa will track your points and keep you updated on your daily total. Try to score 21 points everyday by doing simple things like drinking water, exercising, maintaining a low stress level or reading a book.

But watch out! Alexa will also ask you to share unhealthy habits -- like how much junk food you've eaten. Or if you've spent too much time sitting, this is a gotcha and will detract from your total score. And, if you're up for some friendly competition, Alexa will even tell you how well you're performing compared to others in your home state.

This Skill Was Built with Node, AWS and Love

Twenty one was built using using Node.js and Amazon's AWS-ASK library.

I also leveraged DynamoDB for all of the database tracking. Of course, no serious project is built without a bunch of time, blood, sweat and tears. (I did actually get a pretty nasty paper cut when scrolling through my Twenty One notebook one late evening. And one day, after thinking that I had cleared all of the major bugs, a really nasty bug popped it's head up, and, well I was pretty upset.)

What Kept Me Up at Night

This skill feels deceptively simple.

However, in reality, there were UX challenges that required quite a bit of thought and iteration to get right. At first, the skill simply went through each of the questions in any of the given categories. However, after testing, that approach felt tedious and didn't provide the user experience that I wanted. Feedback from friends and family inspired me to integrate a "quick add" feature that solved the problem.

With the quick add feature, users simply say, "Alexa, ask Twenty One to add vegetables" -- resulting in a one point increment for the vegetable category on that day. Alternatively, users can can, "Alexa, ask Twenty One to add 2 servings of fruit" -- resulting in a 2 point increment for the fruit category on that day.

I am Stoked

Twenty One is my first published skill in the Alexa marketplace.

Am I allowed to be proud? I dunno ... As a surfer, I can tell you that I am super stoked. I guess I'm proud of the impact that this skill will have on the everyday lives of Alexa users. I'm also proud of the platform that I've created for this skill. My goal is to re-use many elements of this platform for future skill development.

I Learned a Ton

The development of Twenty One taught me quite a bit about the flexibility of the Alexa platform.

Leveraging Node.js to develop the skill, I learned how to take full advantage of callback functions that keep the skill running efficiently. I also learned how to leverage DynamoDB to create a very efficient "single record per user" database. In addition, there were a number of Node.js language features that I had not previously used, such as IndexOf, for arrays.

What's Next

We're going to take the Twenty One skill global!

Version 1.0 is setup for the United States. In future versions, we'll optimize this skill for other countries and embrace all of the challenges that come with that endeavor. In addition, we want to add a recommendations engine. Twenty one will provide you with recommendations that will help guide users on their path to healthy lifestyles. Peace out, people -- I have more testing to do ...

Built With

Share this project:

Updates