Skip to content

Usama-Codez/WhatsChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗨️ WhatsChat

Connect Instantly, Communicate Securely, Empower Collaboration

Watch Demo on YouTube

Last Commit Repo Top Language Languages Count


📹 Demo

Watch the full walkthrough and technical explanation of WhatsChat on YouTube:

Watch the Demo

🔗 Click here to view the full demo


🚀 Overview

WhatsChat is a web app platform, for peer-to-peer communication built with Node.js, Express, and Socket.io. It supports:

  • 🔄 Instant messaging (WebSocket)
  • 🔐 Peer authentication
  • 🧩 File sharing (with previews, version control, and sync)
  • 💬 Chat with text message or voice, emojis, attachment
  • 🛠️ Hybrid P2P + Central Server architecture

Ideal for learning real-time systems, secure communication, and collaborative applications.


📦 Built With


📚 Table of Contents


🔧 Features

  • ✅ Communication via WebSockets
  • ✅ Encrypted Message transfers
  • ✅ File version control & preview before download
  • ✅ Chat with text, emojis, and file support
  • ✅ Peer authentication using password or key
  • ✅ Auto messages file sync and file history
  • ✅ Peer can act as both client and server

🚀 Getting Started

🛠 Prerequisites

Ensure the following are installed:


Installation

Follow the steps to install and run WhatsChat Locally:

  1. Clone the repository
git clone https://github.com/Usama-Codez/WhatsChat
  1. Navigate to the project directory
cd WhatsChat
  1. Install dependencies
npm install

Usage

Start the server:

npm start

Peers can join using default address:

http://localhost:3000

🧪 Testing

WhatsChat uses Mocha and Chai for testing.

Run tests using:

npm test

Encryption & Decryption

WhatsChat ensures secure communication by encrypting:

  • Chat messages

  • User authentication tokens

Encryption Features:

  • End-to-end encryption between peers. For encryption I have used AES and RSA algorithms combination.

  • Decryption is automatically done on the receiving side

Unauthorized access is denied without proper key exchange

🔎 You can find the encryption logic in:

utils/
├── encryption.js       # Core encryption/decryption logic
├── auth.js             # Key exchange and peer validation

🧠 More detailed explanation is available in the video demo: 🔗 Watch encryption explained ->

🔒 Security Features

  1. 🔐 End-to-End Encryption for text messages

  2. 🔑 Peer Authentication before each connection

  3. 🛡️ Multi-Factor Authentication (future enhancement)

  4. 🕵️‍♂️ Intrusion Detection System for file flooding (planned)

📈 Future Enhancements

  • Load Balancing via central server
  • Failover backup server
  • Peer metrics dashboard
  • File integrity verification with hashes

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contribution

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

🙋‍♂️ Developed By

Usama Akram

About

Peer-to-peer web app for chat, with Encryption and built using Node.js, Socket.io, and Express

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published