BotBarbello: The Ruby + Slack Chatbot

Project Overview
Carnegie Mellon University  |  Duration: 3 weeks  |  Project Type: Individual

The goal was to program a bot for Slack using Sinatra, a Ruby framework, that works by retrieving data from a PostgreSQL database deployed on Heroku. This was an academic project undertaken at Carnegie Mellon University for the course 'Programming Web Prototypes.' BotBarbello is a fitness bot that would be the best buddy of any guy aspiring to be a bodybuilder. He gives workout suggestions based on targeted muscle groups such as shoulder, abs etc., equipment type such as dumbbells, stability ball etc. and workout type such as Pilates ,Yoga etc.

The Problem
I was an aspiring conversational interface designer who wanted to learn how to build a chatbot. Having gained the programming skills needed to code my own web prototype with HTML, CSS and JS, I was now eager to add chatbot programming to my arsenal.

The Solution
I took on the challenge of building a Slack chatbot with Sinatra, a Ruby framework. The strength of my chatbot lay in taking advantage of Slack's powerful bot-building tools. My interest in fitness made this chatbot a tool that aspiring bodybuilders would benefit greatly from.

My Role
Conversational UI Designer and Programmer
Programming Language: Ruby Framework Sinatra
Tools: TextMate, Adobe Illustrator, Adobe Photoshop and Adobe InDesign

My Process
Conversational UI Workflow Design  |  Data Diagram  |  Programming  |  User Testing  |  Refinement
I started off with designing the workflows that BotBarbello would be handling. This was followed by the data diagram which was crucial to develop a clear understanding of the structure of the PostgreSQL database tables in which responses would be stored and the Ruby endpoints and functions that interact with them. These formed the basis for programming after which several rounds of user testing was done to refine the conversational user interface.
The pale grey boxes contain the workflows that the user wants to carry out, the yellow boxes contain the actions required from the user and the blue boxes contain BotBarbello’s actions.
The white boxes are the tables in the PostgreSQL database deployed on Heroku that BotBarbello accesses to retrieve workout videos and inspirational quotes and body transformation stories from. Botbarbello works through slash commands and by recognizing and responding appropriately to sentences starting with the keywords in his vocabulary.
Screenshots of interactions
with BotBarbello
Type a message starting with 'hi' or 'hello' or 'hey' to be greeted with
the introductory message.
Slash Command '/inspire' that would display a random inspiring message
from a famous bodybuilder.
This slash command '/inspire' in this screenshot shows a quote from
the legendary Mike Tyson!
It is possible to specify the bodybuilder you want a quote from by simply typing '/inspire' followed by their name which has been added to a list of recognizable parameters. So in this case, the command is '/inspire rock'.
'/inspire ali' shows an inspiring quote from the great Mohammed Ali!
The Slash Command '/beforeafter' shows before and after pictures of famous bodybuilders who have undergone inspiring body transformations.
Typing 'start' displays an introduction and a 'Start Workout' button which makes the process of following a streamlined approach to selecting a workout category super easy.
On clicking the ‘Shoulders’ button, a randomly selected shoulder
workout video is displayed.
Typing '/workout' displays a randomly selected workout video. This enables the user to quickly get a workout when he is feeling adventurous and open to trying something he might not be ready for, thus pushing him to step out of his comfort zone.
Typing '/workout cardio' displays a randomly selected cardio workout video.
Typing '/workout dumbbell' displays a randomly selected dumbbell workout video.
Typing '/workout barbell' displays a randomly selected barbell workout video.
Typing ‘help’ gives you tips on the different ways you can interact with and
gain value out of BotBarbello.
This was my final project for the 7 week Ruby class at which I was introduced to this programming language. It got me thinking about all the different ways in which conversational user interfaces such as SMS, Slack and Messenger bots could create value for users. Wanting to choose a useful domain, this time I chose fitness since it is an important part of my life. Mental health, time management and intercultural etiquette are examples of some other domains for which I would be interested in designing chatbots. 

You may also like

Field Service Supervisor App
June, 2014
Geospatial Data Manager App
December, 2015
The Art of Breathing Life Into Paper
July, 2013
Live Mine Photo Capture App
July, 2015
IoT Scenarios for Business Jet Interiors
February, 2016
AR Workforce Management App Scenarios
January, 2017
Leap: GPS Accuracy Enhancer App
August, 2014
Cube: Institutional Asset Management Portal
January, 2017
HTML + CSS + JS Prototyping
October, 2016
Power Paper Prototyping
September, 2016
Back to Top