Objective

Building a chat tool with a simple command-line interface which supports multiple chat rooms.

Project Context

Most often than not, we run heavy GUI-based applications for the simplest of tasks. One such simple task is instant messaging or chatting. Chat tools enable users to start chatting with other users in real-time. It also enables users to transmit text messages, images, videos, and hyperlinks.

In this project, we aim to build a simple command-line chat tool which is easy to use and also has a very minimal interface.

Project Stages

  • Understanding how to use socket and threading modules in Python.
  • Implementing a simple client-server chat tool in Python.
  • Incorporating multiple chat rooms functionality into the chat tool.

The diagram below shows the basic architecture of the chat tool. The server should be connected to all the clients directly but should be able to categorize them into their respective chat rooms and broadcast messages only to the sender's chat room.

For example: If Client A sends a message, the message should only be broadcasted to clients B and C and not any other clients.

expected_outcome

High-level Approach

The diagram below shows a high level approach used to build and develop the chat tool. high_level_approach

The desired end result of the project is like this:

Primary goals

  • Understand socket programming how it can be used to build an application.
  • Understand multithreading and how it helps a program to maximum utilize the CPU time.
  • Build a fully functioning chat tool that allows multiple users to communicate with each other.
  • Incorporate multiple chat rooms(or groups) functionality into the chat tool.

Applications

  • Chat tools enable instant messaging and can be used in a number of scenarios.
  • Command-line tools are often preferred over GUI applications by software developers.

OVERVIEW

CLI Based Chat Tool

View Complete Project