Back to Parent

Outcome


Who is Ginger?

Ginger is a Slackbot to maintain your grocery list. You can just slack her @gin about any additions and updates on your grocery list and she promptly keeps your list in check. Better still, when you mark things done on your list, she rewards you with a great recipe that you could cook from the things you bought.

What can she do?

Ginger is for anyone who wishes to be organised about their grocery list. If you feel lost at times in a super market wondering what you actually need, Ginger is for you.

You can ask Ginger to:

  • Add to your list by slacking her (for example) ‘add eggs, butter, tuna, bread, kale’
  • Edit things on your grocery list by slacking her (for example) ‘edit 1 to large eggs’
  • Delete things on your list by slacking her (for example) ‘delete 2’
  • Ask her to show your list at any time by slacking her ‘show list’
  • Mark things done on your list by slacking her ‘mark done 3,4’

When you mark things done on your list, she makes the update promptly and rewards you with a great recipe using (in this example) bread or kale.

Ginger’s personality

Ginger is smart, efficient and organized. You will notice that when you interact with her. She’s prompt with all her job and ensures there’s no confusion. She is always forgiving of any errors that a person might make - for example if you say ‘delete 14’ she will immediately check with you - ‘did you mistype?’ - allowing you to re-enter. She’s that friend who you go to to sort things out - calm and composed, always there for you but still keeps you from messing things up.

She’s also a food lover, so she loves sharing recipes with the things you bought. Well, she also takes pride in doing just a bit more than what you asked!

Watch Ginger in action

Show Advanced Options

How does Ginger work?

Ginger integrates two APIs and a few internal databases to function:

  • Slack's API to post message in response to the user.
  • It uses Yummly's API to query recipes for any one randomly selected item that the user marks done.
  • User database, grocery list database and done items database to store information about which user has what items in their grocery list and what was marked done.

Data Diagram

This is the structure of the databases and APIs lying underneath Ginger's working:

Workflow current
Show Advanced Options

Workflow

This is the current workflow for Ginger:

Workflow current
Show Advanced Options

The Code behind Ginger

Ginger has been coded in Ruby on the Sinatra framework.

Following are the Gems used for Ginger:

Show Advanced Options

Following is the main application app.rb for Ginger:

Show Advanced Options

Following is the helper file that handles all the command responses Ginger gives :

Show Advanced Options

A more detailed documentation is available on Github.


Future Possibilities

Ginger could be expanded for better functionality in the following ways:

Ginger could be integrated with APIs that allow ordering of groceries. This would make Ginger a one stop solution for those who want to maintain grocery lists, shop for groceries online and receive recipes.

Ginger's forgiving capabilities can be expanded with an undo command that allows the user to go back one or more steps. This would be useful in accidental cases of deletion, addition, editing and ordering.

Another interesting feature for extended user engagement could be a food quiz. In the scenario when the user has not interacted for (may be) a week, the bot could push a small visual quiz about food preference (example: a vegetarian dish over a non vegetarian one, or a fish dish over a beef one) and these preferences could be stored in an additional table which could be used to filter better recipes for the user.

These are some of the features that were plotted on a effort/priority matrix which could be used as reference for future development:

Priority matrix
Show Advanced Options

Reflections

The Programming for Online Prototyping course was an interesting journey which allowed us to explore multiple platforms and 'learn by doing' in an unknown territory.

I learnt that while bots may seem simple, the execution behind them can be fairly complex. Even more interesting was trying to build a personality for the bot - thinking of all the responses from a personality perspective was helpful in providing unique user experiences through different bots.

Also, during API selection it was critical to study carefully what the APIs provide as compared to their websites and which functionalities are free and which ones are paid for. If one is working with a fairly new API, things are likely to change quickly and affect how the app works.

If I have one takeaway from this course, it's this: practice let's you make more intelligent mistakes rather than the easier ones. One should never be afraid of an error - fixing errors is more learning than writing code.

References

  • The Slack API has brilliant documentation and can be found here.
  • The Yummly API allows one to search through recipes by ingredients, by dietary restrictions and many other parameters. It's documentation can be found here.
  • Other discoveries I made which were very useful while making this bot can be found at the tail end of this document here.
  • The icons for this bot were sourced from the noun project. Here I credit the creators for the icons I used: Woman created by Hea Poh Lin, List created by Ben Markoch, Cook book anonymous, add by Created by Alexander Smith.

Thanks

I would like to thank Professor Daragh Byrne for constant encouragement and extremely detailed instructions through class lectures, demos, exercises and online resources that he has created. For anyone building bots and other web based zero UI services, his online repo is an invaluable resource:

https://github.com/daraghbyrne/onlineprototypes2016repo/tree/master/code-samples

Drop files here or click to select

You can upload files of up to 20MB using this form.