Skip to content

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

Notifications You must be signed in to change notification settings

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