Skip to content

aminGhafoory/peerchat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PeerChat - Terminal-Based WebRTC Chat

PeerChat is a lightweight, terminal-based peer-to-peer chat application built using WebRTC and Pion. It allows two users to chat directly without a central server.

πŸš€ Features

βœ… Peer-to-peer communication using WebRTC
βœ… Secure, serverless chat
βœ… Simple CLI commands to create and join rooms
βœ… Works over the terminal


πŸ“¦ Installation

Clone the repository and build the binary:

git clone https://github.com/aminGhafoory/peerchat.git
cd peerchat
go build -o peerchat main.go

πŸ”— Usage

1️⃣ Create a New Chat Room

Run the following command to start a new WebRTC session and generate an Offer SDP:

peerchat new

πŸ”Ή Copy the SDP Offer and send it to the person who wants to join.


2️⃣ Join an Existing Chat Room

If someone has already started a chat session, use this command and paste their SDP Offer:

peerchat join

πŸ”Ή After joining, you will get an Answer SDP. Share this back with the initiator to establish the connection.


πŸ“Œ Notes

  • PeerChat requires both users to manually exchange SDP offers/answers.
  • This implementation does not include a signaling server. You must share SDPs manually (e.g., via another chat app).
  • Future versions might include automatic signaling using WebSockets or QR codes.

πŸ‘¨β€πŸ’» Contributing

Pull requests and improvements are welcome! If you find a bug, please open an issue.


πŸ›  Built With

  • Go
  • Pion WebRTC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published