Inspiration
It is estimated that tens of millions of tons of food are wasted in the United States annually. Some of this waste may be attributed to confusion around the dates commonly printed on the foods we buy and throwing them out before necessary. According to the Food Safety and Inspection Service of the U. S. Department of Agriculture, the Best By, Use By & Sell By dates do not refer to the safety of the food, but rather its flavor or quality. (See details below.) Food Manager refers to those dates as “package dates.”
Each of us can take steps to reduce the waste and give more food to the hungry. Food Manager helps you take the first step.
The 7 features of Food Manager will enable you to more efficiently manage your foods so that you need to throw out less food and can donate more. With a little effort, it’s a win-win!
What it does
It enables you to:
- Save foods to your virtual Food Manager Pantry with package dates, specifying one of the three commonly used kinds - Best By, Use By, or Sell By.
- Find foods that are about to reach their package dates within any number of weeks you request so you can use or donate them.
- Find foods that have exceeded their package dates.
- Find a specific food in the Food Manager Pantry. Alexa will also tell the package dates for items of that food that have not yet exceeded those dates, and whether there are any items beyond their package dates.
- Remove a food that has been eaten.
- Empty your Food Manager Pantry of foods that are past their package dates.
- Get a list of all the foods in your Food Manager Pantry.
How I built it
After purchasing an Amazon Echo last December, I became interested in learning how it worked. The tutorials on the Amazon site and the free resources on DynamoDB led me to take the next step and start building Food Manager. I created a Lambda function, built my Alexa skill on the Developer Console and created my DynamoDB table. I built three tables before I found the one that worked.
Challenges I ran into
- Learning how to build an Alexa Skill in the first place. For example, the voice interface required a different approach to input validation than a typical graphical user interface.
- Learning JavaScript & DynamoDB to the degree necessary to create this skill. Since I had never used JavaScript before, in addition to the tutorials, I also consulted some reference books on JS. Even then, I reached out to anyone I thought knowledgeable on JS and noSQL databases to help. I finally got pointed in the right direction from a presentation writing JavaScript code at a MeetUp. near me. Within two weeks I finished writing it and spent the last two refining it for submission to Amazon.
- Learning how to do some basic things, such as updating or deleting a record, was a challenge in DynamoDB. The available resources did not seem to address my needs. My previous experience with using a MySQL database did not seem to help very much.
Accomplishments that I'm proud of
Figuring out some major hurdles regarding entering multiple items of the same kind of food and using a noSQL database for the first time.
What I learned
- JavaScript. I started learning it to build this skill In January.
- DynamoDB sufficiently well to build this skill.
- Probably, most importantly, the potential of this interface. My experience in the healthcare system, both as a doctor & patient, has me thinking of ways that a voice interface, such as Alexa, could make the processes better for both patient and health care provider.
What's next for Food Manager
- It would be great if the user could see the foods in their pantry in the Alexa app while they are grocery shopping, like the built-in Shopping List. Then they could check whether they have a jar of pickles at home or whether to buy another one. That would require some changes from Amazon I believe.
- I'm also thinking of doing the food input in a conversational style. I had been undecided which to use for this initial version, the process currently in the skill or the conversational approach. Since the latter would take more time for each food rather than the current method, I opted for the current method.
- I would like to be able to track how much food gets donated.
Built With
- alexa-skills-kit
- amazon-dynamodb
- javascript


Log in or sign up for Devpost to join the conversation.