felipehfj / Group-Chat-Private-Chat-Application-using-MEAN-And-Socket.io

Creating Group Chat and Private Chat Application using Socket.IO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Group-Chat-Private-Chat-Application-using-MEAN-And-Socket.io

I have implemented GroupChat Application using MEAN Stack and for real time communication like sending messages ,joining and leaving rooms ,I have used Socket.IO which is a library for Real Time Web Applications.The purpose of the project is to become capable of using socket.io for RTC(Real Time Communication).

Technologoies Used:

  • Node.js(server side)
  • Express.js(server side)
  • Angular(client side)
  • MongoDB(for storing of data)
  • Angular Material Design (Front end)
  • Socket.IO ( for RTC)

Socket.IO

  • Socket.IO is a powerful library for real time web applications.It enables real time,bidirectional and event based communication between the browser and the server
  • It is built on top of Websockets API and Node.js.
  • It is mostly dependent on NPM.
  • It is fast and reliable.Whenever any event occurs the server will get that event and emit the event to particular connected client.

Login and Signup

  • There is Login and Signup options for the user.I have used JWT Authentication for the user authentication.If you are not familiar with JWT then please check out this first [https://github.com/mohitsood5934/Implementing-JWT-using-Node.js] image
  • Now firstly we have to signup ,so that we can login in to our application image
  • Now we can see,user"s record is successfully stored in the database. image
  • Now we can login in to our application image

After successfull login in to the applicaion

image

  • Routes
    • localhost:4200/chat GroupChat
    • localhost:4200/privatechat Private Chat

GroupChat(Fully Implemented)

  • From here onwards most of the things will be done by the use of sockets.
  • We can see total users online displayed is null because ,user did not join any room till now.It will be shown once the user joined room.

Joining of the Room and sending messages to each other

  • Users can join the room by pressing Join Room button

First User

image

Second User

image

Leaving of the Room

  • Users can leave the room by pressing Leave Room button

First User

image

Second User

image

  • Private Chat will be implemented soon

Thanks and Regards Mohit Sood

About

Creating Group Chat and Private Chat Application using Socket.IO


Languages

Language:TypeScript 52.4%Language:HTML 25.9%Language:JavaScript 21.1%Language:CSS 0.6%