Inspiration

I began developing Stat Tracker as soon as I was notified that Amazon was hosting a Hackathon with Alexa! I've had some previous experience with using Amazon AWS Services, and I realized that this would be the perfect competition to broaden my horizons.

I was able to develop an Amazon Alexa application, as well as a small web-app for users to view their stats at any time. I am incredibly happy that I was able to enter this Hackathon on time, it was a fantastic learning experience.

What it does

Stat Tracker is an application for the Amazon Alexa, with a small associated web-app, that allows users to keep track of any quantitative statistic they would like. How?

Open a new session:

The most user friendly way to interact with Stat Tracker is open a new session by saying:

  • "Alexa, open Stat Tracker"

Create Stat:

If a session has been started, just ask Alexa:

  • "Create a new stat"

Or if no session has been created, say:

  • "Alexa, ask Stat Tracker to create a new stat"

After this command, Alexa will ask a couple follow up questions, such as the name and initial value of the statistic.

Change Stat:

If a session has been started, just ask Alexa:

  • "Change a stat"

Or if no session has been created, say:

  • "Alexa, ask Stat Tracker to change a stat"

After which, she will ask for the name of the stat to change, and the new value of the stat.

Read Stat:

If a session has been started, just ask Alexa:

  • "Read a stat"

Or if no session has been created, say:

  • "Alexa, ask Stat Tracker to read a stat"

After which, she will ask for the name of the stat to read.

Web App

In addition to the Alexa app, I also developed a small web application that allows users to view and/or edit their stats.

Users can ask Alexa, (if a session has been started):

  • "What is my user key?"

After which, she will read you a short string that uniquely identifies your device. Users can view their stats by going to the following web-app:

https://StatTrackerAlexa.herokuapp.com/stats/USERID

Where USERID is replaced with a user's unique identification string.

How I built it

I built two small applications for this project.

For the Amazon Alexa app: I used javascript to write code for a nodejs script that is running on an AWS Lambda server. This code contains functionality to connect to a database hosted on AWS DynamoDB. This application interprets user input and makes changes to the database accordingly.

For the web-app: I used javascript to write code for a nodejs server that is running on Heroku. This server provides a simple front end client for users to access their stored statistics. This code contains functionality for users to interact with their skills on a mobile device or desktop. This application also interprets user input and makes changes to the database accordingly.

Challenges I ran into

While developing Stat Tracker, I ran into a variety of issues. Obviously, there are common programming challenges that present themselves in any type of situation, which I ran into. In addition, however, I ran into many unforeseen problems while learning about AWS's DynamoDB. Through my struggles I learned a great amount, and ended up writing better code because of it.

Accomplishments that I'm proud of

I am simply proud of the fact that I was able to actually complete a project and submit it to this Hackathon. Although the Hackathon was hosted for a long period of time, intense schoolwork consumed most of my time, so meeting the deadline was a goal for me.

What I learned

I learned a great deal while developing this application. Primarily, I learned how to make a solid Amazon Alexa application. Luckily, actually developing the Alexa app was easier for me than connecting to the database via the web-app.

What's next for Stat Tracker

Stat Tracker has an unreal amount of room to expand. I am sure users can already envision expansions while using the app. I plan on adding different types of statistics, different ways of interacting with them, and most importantly, visualizations.

Share this project:
×

Updates