Habot - Your Friendly Habit Coach (Azure Hackathon)
Tags: azuretrialhack, azure, ai
Published: 2022-03-08 21:29:08

### Overview of My Submission
When this hackathon opened, I was ploughing through the excellent book [Atomic Habits](https://jamesclear.com/atomic-habits) by James Clear.

Good habits are key for us to build happy lives and, conversely, bad habits can ruin them. But good habits are hard to build and bad habits hard to break - seems like we need a helping hand.

The purpose of this hackathon entry was to build a helpful chatbot to coach you through building or breaking habits. Habot (your friendly habit-bot) will keep you on track, monitor your progress and give you helpful advice when you begin to falter - all a little "tongue in cheek" of course.

####[https://habot.azurewebsites.net/](https://habot.azurewebsites.net/)

Let's take a look at some of the key features of Habot:

---

#### 1. Single Signon with Outlook Credentials

Using your Outlook OAuth credentials you can easily sign up with Habot, and it'll greet you by name and with a smile.

![Login](https://github.com/lucas-matt/habot/blob/main/imgs/x0.gif?raw=true)

---

#### 2. Creating your first habit

The first thing you'll be asked to do once you log in is to create a habit.

Habot is intelligent, and can infer one of a number of habits from what you say. For example, it can understand that "I want to begin going to the gym" is the same as "I want to start exercising more".

![Create Habit](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o71nf3n2vfh62pxrp8f8.png)

Once your habit is confirmed, you'll get a cheery dance until next time.

![Create Complete](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ds0ohn8l293gyhtwyt8f.png)
 

---

#### 3. Check-in and Progress

Each day you'll need to check in with Habot (I had hoped to use push notifications here, but alas no spare time). When you check in, Habot will keep track of your metrics.

Habot will also give you charts to more clearly demonstrate your progress. It also has emotions, so will feel a little sad if you aren't doing as well as hoped.

![Check In](https://raw.githubusercontent.com/lucas-matt/habot/main/imgs/x2.gif)


---

#### 4. Getting Help

If you're having a hard time keeping up with your habits, Habot has some advice for you depending on the problem that you're facing.

![Need Help](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9fknlx7uma2jtx8j7dkx.png)
 
Habot will also show you inspirational videos to help you get back on track.

![Help Given](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/irl9wlhbi5elznw4u7i1.png)
 

### Submission Category: 

Wacky Wildcards


### Link to Code on GitHub

{% github https://github.com/lucas-matt/habot %}

### Additional Resources / Info

The project has a number of parts to it, and is built with the following technologies:

The **Azure Bot Framework**, to drive the chatbot.

![Azure Bot Framework](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pcsbvtr2904ayz8yq6xo.png)

A **Vue.js** application for the UI, with the web-chat control built in.

![Vue](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0tj7o1wr18iturp8gfs1.png)
 
 
A **Rust** with Rocket backend to collect metric information and build charts.

![Rust](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/93ykgikk2vojc8j4b8oj.png)
 

**Azure CosmosDB** (Mongo flavour) to store metric information.
 
![Cosmos](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqfcb0j9q2gv0i6ujrfu.png)