Skip to content

xd-Abi/babaclat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ—จ๏ธ Babaclat Chat

Cover

Babaclat is a peer-to-peer (P2P) chat application built in Rust, using the power of libp2p and Tokio for asynchronous network communication. It's a decentralized chat tool that allows you to connect with other local peers using gossipsub and mDNS protocols!

๐Ÿš€ Installation & Setup

Follow these steps to build and run Babaclat on your machine:

git clone https://github.com/xd-Abi/babaclat.git
cd babaclat
cargo run --release

๐Ÿ’ก How It Works

  1. ๐Ÿ†” Set Up Your Identity: On the first run, Babaclat will generate a unique identity for you and save it locally. This helps in uniquely identifying you in the network.

  2. ๐Ÿ“ก Join the Local Chat Network: The app automatically connects to peers in your local network using mDNS and starts discovering other Babaclat users.

  3. โœ‰๏ธ Send & Receive Messages: You can send a message by typing it into the console. Messages are broadcasted using gossipsub, and all connected peers will receive your messages.

  4. ๐Ÿ–งPeer-to-Peer Communication: Babaclat is a true P2P chat application, meaning it requires at least two nodes running on different computers within the same network. If no other node is found, the app wonโ€™t be able to send or receive messages.

  5. ๐Ÿ‘ฅ Show Who's Online: When a new peer joins or leaves, a notification is shown in the chat.

๐Ÿ“œ Command Guidelines

  1. Start Chatting: Once you run the app, you'll be prompted to enter your nickname. The default is Falcon.
  2. Send a Message: Just type your message in the console and press Enter. It will be broadcast to all the connected peers.
  3. User Join/Leave Notifications: The app will show notifications when users join or leave the chat.

๐Ÿ”ง Technical Details

  • libp2p is used for peer-to-peer communication.
  • mDNS is used for peer discovery on the local network.
  • gossipsub is the messaging protocol that handles message propagation.
  • tokio provides the async runtime.
  • serde is used for serializing and deserializing messages.

About

๐Ÿ—จ๏ธ A P2P chat application build in rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages