Skip to content

nija/hb-chatty

Repository files navigation

hb-chatty

Build Status Coverage Status Join the chat at https://gitter.im/nija/hb-chatty

Chat Infra Diagram

Chatty

Chatty is a web app, created by Nija Mashruwala, which is used to chat with other users and an interactive chat bot. It is architected to mimic most enterprise production web microservices.

Learn more about the developer here.

Contents

Technologies Used

Features

Current

  • REST API for all server interactions
  • Chatbot responds to basic politeness
  • Chatbot retrives weather information
  • Chatbot retrieves movie information
  • Chatbot comes with a help feature
  • Basic end-to-end ping-type healthcheck exists
  • Extensive monitoring healthcheck exists
  • Multi-users and multi-client
  • All screens are updated in close to real-time
  • GUI works on mobile clients; site is responsive
  • Multiple ways to retrive new messages - by last updated time and by the last n messages

Future

  • Upgrade to Python3
  • The app will go through basic security hardening
  • Users will be able to tell Chatbot to remind them of events
  • GUI will have a log in flow
  • Data rentention is enforced

Infrastructure

Chatty is implemented with a microservice architecture pattern. Because of the uncoupled design, it's trivial to separate the event bus or chatbot for placement on external hosts, or allocate a separate process to handle each component. As the chat data is designed to be ephemeral, and the chat server will recreate the database schema when necessary, no data recovery steps are needed.

APIs

Chatty has a full-featured and robust REST API, which allows for command-line interactions, development of third-party custom clients, and extra functionality not seen on the front-end GUI (user creation, room creation, etc). The bot uses Chatty's API to post responses.

The chat bot uses the Wunderground API to display weather information by zipcode and the Open Movie Database API to display movie information. The chat bot can also generate natural language stories using Markov Chains. This implementation uses Alice in Wonderland and Through the Looking Glass as story data.

Event Bus

The chat server uses a custom, one-way Publish-Subscribe event bus to communicate events to the bot. The chat server publishes an event to the bus, which then handles the distribution of the event to the listeners subscribed to the event type. Currently, the bot is the only listener.

Reliability

The web app is close to production-ready in that monitoring and healthcheck hooks exist, code coverage is around 80%, and continuous integration has been set up. The last steps are to lock down parts of the API, and set up continuous deployment using Travis-CI and Heroku.

About

Hackbright final project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published