PeerChat is a real-time peer-to-peer (P2P) communication platform that enables users to chat, make video calls, share files, and even screen-share without relying on centralized servers. Built using WebRTC and PeerJS, PeerChat ensures fast, direct, and end-to-end encrypted communication between users.
Unlike traditional messaging apps that route data through third-party servers, PeerChat allows direct connections, enhancing speed, security, and privacy. Users can create or join rooms dynamically, ensuring private and secure conversations.
🔹 1. Secure Peer-to-Peer Messaging
· Users can send and receive encrypted messages using AES encryption, ensuring privacy.
· The encryption key is dynamically generated based on the room ID.
🔹 2. Video Calling with WebRTC
· Users can initiate high-quality, low-latency video calls with their peers.
· Calls are established directly between users, bypassing servers for better performance.
🔹 3. Screen Sharing
· PeerChat allows users to share their screens during a video call.
· Useful for remote collaboration, presentations, and tech support.
· Automatically detects when screen sharing ends and resets the UI accordingly.
🔹 4. File Sharing
· Users can send and receive files (images, documents, etc.) through the chat interface.
· Received images are displayed directly in chat, while other files can be downloaded.
🔹 5. Room-Based System
· Users can join existing rooms via a unique room ID or create new rooms dynamically.
· The room ID is generated automatically if not provided in the URL.
· This enables private and temporary chat sessions without requiring user accounts.
🔹 6. Automatic UI Adjustments for Mobile & Desktop
· Screen sharing is disabled on mobile for a better user experience.
· Font sizes and UI elements adjust dynamically based on device type.
· HTML, CSS, JavaScript – Core structure and styling.
· PeerJS – Simplifies peer-to-peer WebRTC connections.
· CryptoJS (AES Encryption) – Secures messages with encryption.
· PeerJS Server – Used to facilitate initial peer discovery (not required for data transmission).
· WebRTC STUN/TURN Servers – Helps establish P2P connections when users are behind NAT/firewalls.
1️⃣ User opens PeerChat – The system generates a unique room ID.
2️⃣ Another user joins the room – A direct peer-to-peer connection is established.
3️⃣ Real-time chat & video calls – Messages, files, and media are exchanged directly.
4️⃣ End-to-end encryption ensures data remains private and secure.
5️⃣ Users can disconnect anytime, and all session data is lost once they leave.
🔹 Private & Secure Messaging – Avoid centralized servers like WhatsApp or Discord.
🔹 Remote Collaboration – Teams can share screens and chat instantly.
🔹 Online Study Sessions – Students can chat and share notes in real time.
🔹 Customer Support – Businesses can assist clients via direct video calls.
🔹 No servers required → Faster, more private communication.
🔹 No login needed → Just join a room and start chatting.
🔹 Secure encryption → Keeps conversations private.
🔹 Open-source & customizable → Modify and extend based on your needs.