Introduction

Objectives#

We want to build a group chat room with the following behaviour:

when a user enters the room:

  • user is assigned a random username
  • admin-bot sends a message to the everyone in group to welcome the user
  • user is added to display of online users

when a user sends a message:

  • run a profanity check on the sent message (think about the kids that might see it!)
  • if there is no profanity, send the message to the group
  • if there is profanity, admin-bot sends a message to the user notifying that the message was not sent.

when a user leaves the room (disconnection):

  • admin-bot sends a message to the everyone in group to indicate that the user has left the room
  • user is removed from display of online users

In addition, in the users display and the chat messages we also want:

  • to display the user's origin country (which we find out by checking the IP addresses) alongside their username.
  • to update the number of active users currently in the chat

Instructions#

To start, checkout the github repository with the starter code here

For reference:

The completed code can be found here

A live demo of the working app can be found here