Bloc Chat

Bloc Chat is an online messaging forum that is capable of handling multiple users. Users can create new rooms and send messages directly to a selected room.

The project was a part of the Bloc Web Developer curriculum.

The application needed to be able to handle multiple use cases. The user needs to be able to see the list of available chatrooms, as well as create a new room as they desire. The user should be able to see all of the messages associated with each room. Each user should be able to display their username in each chat room and send messages to a chat room that are associated with their username.

The solution was to use Angular with a Firebase database to store the data. The database was broken up into a rooms table and a messages table. Each room had a key associated with it and each message had a roomId attribute that held the key to the room that it was associated with. The user’s username was stored in the browser’s cookies and added to the message object when a new message was created. In order to create a new room, I used Bootstrap’s Modal to prompt the user for a new room name. I used that same tool for when the user first gives their username to the browser.

Bloc Chat is able to have multiple chat rooms that any user an access and communicate through. Currently, the application only runs locally.

It would be good to have the application deployed so that it can be accessed by multiple clients. In that case, user authorization can be used so that each user has their own list of chat rooms. Then they can grant access to their chatroom to other users.