Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.72 KB

README.md

File metadata and controls

36 lines (27 loc) · 1.72 KB

P2P Chat

chat_page

A peer-to-peer chatting app! Ever wonder what happens to your messages in those other chat apps? They send them on a little adventure to some far-off server, and who knows what's going on there! But not here. With this app, it's direct and personal. You chat directly with your pals! It's like your messages are on a private express lane. 🚀 More security, more speed – that's what this app is all about! 😄

How to run?

  • run node server/server.js and open localhost:3000 in a browser to monitor the state of the peers
  • Open peers/Register/register.html in 2 browser tabs
  • Register 2 users and login
  • Add peer's username in one tab and the connection will start immediately!
  • Enjoy your peer-to-peer chat 🥳

Technology and Stack

  • NodeJS for the server
  • Pure javascript for clients
  • WebRTC for establishing a 2-way websocket connection
  • Centralized discovery server for Peer Discovery (using IP and port)
  • STUN:freeturn.net:3478 and TURN:freeturn.net:3478 for TURN and STUN servers

Diagrams

Server Peer Interaction

diagram_1 diagram_3

Peer connection creation

image

Screenshots

Login Page

login_page

Chat Page

chat_page