Coder Social home page Coder Social logo

vitaliisvietkov / ucode-uchat Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 147.78 MB

Implementation of a real-time messaging application for the UCODE IT ACADEMY project using TCP socket programming. Working only on UNIX systems.

Makefile 0.54% C 90.69% CSS 8.77%
tcp socket gtk gtk3 ucode ucode-connect ucode-student ucode-marathon unit-city unit-factory

ucode-uchat's Introduction

UCODE-uchat

This is my implementation of the real-time messaging application for the UCODE IT ACADEMY project. It is important to note, that it works only on the UNIX systems.

Impulse logo

Used tools

GTK+CairoCSSSQLiteXML

  • gtk3 library was used to create user interface.
  • Gtk3 sublibrary cairo was used to draw most of pictures in the application.
  • CSS was used to style gtk widgets.
  • SQLite was used as a database.
  • XML files were used to create a couple of widgets.
  • base64 algorithm is used to encrypt images before sending them via socket communication from client or server. I used the open source code by Joe DF (https://github.com/joedf).

Installation

Important! You need to already have installed GTK library on your device, so if you do not - install it first.

  1. Download/clone the repo and move to the directory.
  2. To build the project type make in the terminal.
  3. First, you need to run the server, so type ./uchat_server PORT where PORT is some number starting from 1030.
  4. Now, you can run the client part which will be connected to the mentioned server and i recommend you to create a new terminal window for this. Type ./uchat IPv4 PORT where IPv4 is your address in the local network (if you are going to use client part on the same machine that server, type 127.0.0.1) and PORT is a number that you entered in the third step.

To delete project enter make uninstall and to rebuild the project - make reinstall.

Implemented features

Client part

  • Basic authentication by username and password. A new user can log in and sign up using corresponding buttons on the authorization form at the start of the app. After the registration password will be encoded using improved Caesar encrypting algorithm without the possibility of decoding. During the authorization encrypted password from the log in form wil be compared with the password in the data base.


    Registration1 Registration with error

  • Reconnection. If the uchat app lost connection with the server, client will constantly try to reconnect. Appropriate messages will be displayed.


    Reconnection gif

  • The user can delete, edit and copy the text from the message after it send. In the message the time of its sending is displayed.


    Message interaction

  • Image sending. The user can select a message for attachment and send it. Size of the image must be less than 5mb, in other case an appropriate message will be displayed. Large images will be sized down and after sending both recipient and sender can open it in the original size if its less then 1920x1080 pixels or in the mentioned size.


    Image sending

  • Avatar change. Each user can change the default profile picture. The selected object will be sized to the square, but not cut.


    First avatar----->Second avatar

  • Search. The user can type a name of another one and start conversation with him or her. After selecting a new room, it will be added to the chats list in the left and on the recipient side it will be displayed only after message arriving. If there are no messages in the room, it will not be displayed after next authorization at all.


    Search gif

  • Choosing a theme. In setting, user can change colors of the application from standard black and white to another pink and white.


    Theme1Theme2

  • Changing a language. In setting, user can change language of the application to Russian, Ukrainian or English. The last one is default.


    Language

  • Modifying profile information. In the 'edit user' form user can change all information about him/her but not password. The 'description' field was implemented for the future feature, but there were no time for it.


    Edit user form

Server part

  • Concurrency. For each user information processing are responsible different threads.
  • uchat_server works as a daemon, listening to the specified port.
  • All necessary data is saved into the database. SQLite database was used. Each image is firstly encrypted using base64 algorithm and only then sent to the server where inserted to the database.

ucode-uchat's People

Contributors

olegsavich avatar vitaliisvietkov avatar vveklenko avatar

Watchers

 avatar

Forkers

hoathienvu8x

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.