As our team sat down and deliberated possible ideas for our Unihack project, we thought of a variety of features which could be implemented by a Facebook Messenger bot using the newly released development tools.

It soon became obvious that all of our separate bot functionalities could be implemented as one platform which would easily streamline the API application process, following the newly emerging architecture model of microservices.

From there Heya was born, one Messenger bot to rule them all...

What it does

Facebook Messenger is a heterogeneous platform, it exists across all mobile, web and desktop devices, recently meeting a milestone of 1 billion active users. If we were to create our platform within a Messenger bot, it would greatly reduce the barrier to entry for a new user. Rather than downloading a whole new app, they just send a message to a bot.

A user can ask Heya a variety of questions, from setting reminders which Heya will then bring up at a later time, asking what the weather is currently like, to even finding out what are the local Pokemon to catch in Pokemon Go! In fact, by the end of the hackathon the team was already using the reminders feature to organise themselves.

Our platform was created with elasticity and extensibility in mind, if there is a function that can be fulfilled by a bot, it can be easily implemented by parsing the context and content of user's inputs.

How we built it

Our bot backend was written in Node.js, including some experimentation with the cutting edge ES6, and asynchronous Javascript. This light-weight approach allowed for our project to be rapidly and easily deployed to Heroku, making sure all of our product could be tested and utilised as soon as possible.

Using, the Natural Language Processing framework, we were able to train our bot for new queries with ease. Essentially allowing us to translate from user stories to meaningful inference straight away, and by training the model this just got better. From there it was as simple as writing a handler for each type of query or intent that we learnt. The handler is as simple as can be, with some of our examples only spanning a few lines thanks to our smart intent handling.

Challenges we ran into

At first our ideas for our final product were vague and we had difficulty in refining in our product from a bot with certain specific functions. This lead us to our breakthrough of a platform to host microservices.

To assure all messages arrived on time and in order to the correct clients, careful use of asynchronous Javascript was used, which proved to be quite tricky at times.

Accomplishments that we're proud of

We are proud of the simple, yet powerful framework we have created. By just learning a type of query and deciding how to handle it and bundling this all together in the Messenger ecosysem we created a system that can be as general or specialised as you like. We are also proud of how our own implementation, Heya, interacts with users and provides real useful functionality.

What we learned

We learnt how far natural language processing has come, and how wide ranging the uses are for personal bots. Through experimenting with Javascript ES6, we saw first hand the growing pains of new technologies but also experienced the expressive power that it brings.

What's next for heya-bot

Internet of Things is a great next step for this platform, Node.js is one of the best platforms for integrating IoT into a project and as such Heya has the capacity to interact with a variety of IoT devices. For example, Heya could alert you to someone arriving at your door through a smart home hub powered by a device such as a Raspberry Pi. It could also use this hub to not only sense but change your environment, such as turning on cooling on a hot day. The IoT possibilities are endless!

Additional microservices could be implemented, such as instant currency exchange or time zone conversion to setup an international meeting, appealing to and being invaluable to different users. All of this, without the need to clutter a phone with additional apps or the huge challenge of creating and supporting apps for many platforms.

Slack integration would also be a great set of functionality for the future of the platform.

Built With

Share this project: