Chat App

Authors

  • Barte Sadlej (github: barteksad)

Description

Chat app written in Rust with Postgress db. Allows users to create new accounts and channels and communicate within channel. All unseed messages from last login are delivered once logged in again.

By default server stats with one user named ADMIN with password ADMIN

Usage

Server:

To run specify DB_URL to postgress database in chat-app/src/config

pub const DB_URL: &str = "postgresql://bs429589:iks@localhost:11212/bd";

and then run

cd chat-app/ && cargo run --bin server

Client:

run

cd chat-app/ && cargo run --bin client [name] [password]

press Ctrl+C to exit channel

How it looks like

alt text alt text

Functionality

  • Server creates channels provided as input arguments
  • Users provide nick-names and password while joining and can choose channels
  • Messages are visible across channel
  • One can either send a message or change the channel
  • Added logging and creating users

  • Loading and saving channels and users from database

  • Creating new channels and saving messages

  • Added meassages history and sending messages unseen from last user logging

  • everything from terminal

A proposal for division into parts

In first pars first four points,

In secound part, secound four points,

Libraries

  • Tokio : threads for each connection and TCP stream
  • Serde : for messages serialization
  • and lots of smaller ones