Giter Club home page Giter Club logo

chatup's Introduction

chatUp (terimnal-based)

logo ChatUp is a simple terminal-based chat application implemented in C++. It allows users to communicate with each other in real-time.

Feautures

  • Login with a 42 account (exclusively to users with valid Intra accounts. If you don't have an Intra account, you can still register and log in using the traditional account creation method.)
  • User Registraion: Users can create an account by registering with a username and password. The passwords are securely hashed using Libsodium library.
  • User Login: Registered users can log in to the application using their credentials.
  • Random Colors: When users join the chat, they are assigned random colors to distinguish their messages.
  • SQLite Database: The application uses an SQLite database to store user information, including usernames and hashed passwords.

Prerequisites

Before running ChatUp, ensure that you have the following dependencies installed:

  • C++ Compiler supporting C++11
  • SQLite library

Installation

  1. Install the libsodium library with the provided Makefile:
make install-dependencies
  1. Build the application
make
  1. run the application
./chatup <port_number> <name>

Usage

Run the server application usin the following command:

./chatUp <port> <server_name>

Replace port with the desired port number on which you want the server to listen for incoming connections. Replace server_name with a desired name that will show up to connected users in the chat when the server sends a message. Example: ./chatUp 5000 server Open another terminal window or tab (separate from the one running the server). In the new terminal, use the nc command to connect to the server. The command should be in the following format:

 nc <server_ip_address> <server_port>

Replace server_ip_address with the IP address of the machine running the chat server and server_port with the port number specified when starting the server.

Example: nc 192.168.0.100 5000

After executing the nc command, you should be connected to the chat server. The application will prompt you to either register or log in.

Follow the on-screen instructions to create a new account or enter your existing credentials to log in.

Once logged in, you can start sending and receiving messages through the chat application.

Database

The application uses an SQLite database to store user information. The database file is named ChatUp.db and will be created automatically upon running the application. If you want to reset the database, you can use the following command:

make drop

this will remove the ChatUp.db file, and a new database will be created the next time you run the application.

Preview

preview

Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.

chatup's People

Contributors

ainzsoup avatar

Stargazers

 avatar Fatima-Ezzahrae Diraa avatar Abdelkarim Chedmi avatar Anas Lamaiz avatar Oumar Mimouni avatar hodor avatar SAAD EDDYNE EL ABDARI avatar  avatar Zakaria Oukaddour avatar Wadie. avatar Ayman Baioumy avatar

Watchers

 avatar

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.