This is the server of a chat application, built by Flask framework of python. It listens to React clients for HTTP calls and maintains websocket connection to allow real time updates with them. The server supports the following actions:
- Logging in and signing up to the application
- Send and receive messages in private chats of 2 users, and group chats with multiple participants
- Create new groups
- Adding new members to groups
- Removing members from groups by its admin
- Self exit from group of a member
- Delete private chats and group chats
- Block and unblock users by others.
The server consists of 4 layers:
- Main - The module that is the first to receive API calls. It communicates with clients using both HTTP and Websocket protocols. The Websocket connection is implemented using the library socket.io.
- Routers layer - The modules the HTTP requests are referred to from the main module
- Business Logic Layer - The modules in which the HTTP requests are processed, and then directed to the data access layers.
- Data access layers - The modules that are called by the business logic modules in order to directly connect with Mongo Data base and JSON place holder web service
The server communicates with Mongo DB where it manages the data of users, chats, groups, memberships in groups of users, blocking of users
Below is the architecture of the server as described above:

Python 3.8.+
- pip install requests
- pip install pymongo