Skip to content

romulodm/interzap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

89 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“° Project Description

This work was carried out in the Computer Networks discipline and aimed to familiarize students with programming network applications using sockets, formalizing a protocol for this. In short, we needed to build an application similar to Whatsapp following the protocol specification created by professor Dr. Pedro de Botelho Marcos presented in this link.


Figure: Print of what is displayed in the terminal when the client starts


πŸ”Ž Table of Contents

Architechture

Interzap's architecture is designed to support real-time communication between clients and servers using sockets. Below is an overview of the main components and how they interact:

interzap/
β”‚
β”œβ”€β”€ server/                  # Directory containing the server code
β”‚   β”œβ”€β”€ internal/            # Internal server logic
β”‚   β”‚   β”œβ”€β”€ chat_server.py   # Main server class that handles requests
β”‚   β”‚   β”œβ”€β”€ database.py      # Class for managing the SQLite database
β”‚   β”‚   β”œβ”€β”€ group.py         # Class for managing users in a group
β”‚   β”‚   └── user.py          # Secondary class for handling individual messages in a thread
β”‚   └── main.py              # Script to start the server
β”‚
β”œβ”€β”€ client/                  # Directory containing the client code
β”‚   β”œβ”€β”€ backup/              # Directory for storing client messages
β”‚   β”‚   β”œβ”€β”€ Client-000000.py # Example of how messages are stored
β”‚   β”œβ”€β”€ internal/            # Internal client logic
β”‚   β”‚   β”œβ”€β”€ chat_client.py   # Main client class
β”‚   β”‚   └── client.py        # Secondary class for managing messages and contacts
β”‚   β”œβ”€β”€ util/                # Directory for utility functions
β”‚   β”‚   └── convert_posix.py # Functions to convert POSIX timestamps to standard dates
β”‚   └── main.py              # Script to start the client
β”‚
β”œβ”€β”€ README.md                # This file
β”œβ”€β”€ host.py                  # File that defines (or not) the HOST_IP
└── requirements.txt         # Libraries and packages used

Features

βœ”οΈ Login

βœ”οΈ Register

βœ”οΈ Send individual message

βœ”οΈ Send group message

βœ”οΈ Show whether the message was delivered or read

βœ”οΈ Save messages from user who is offline (using SQLite)

βœ”οΈ Save client message history (using .json)

Usage

  • Run pip install -r requirements.txt
  • Run python server/main.py in the base directory to start the server
  • Run python client/main.py in the base directory (as many times you want) to open the clients that will consume the server
  • Be happy testing on the client 🀠

About

Terminal chat application using sockets, with support for individual and group messages.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages