Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure P2P Encrypted Messaging

🔐 End-to-End Encrypted WhatsApp-Style Messenger

Built with React, Node.js, Socket.IO, and Web Crypto API


Features

  • P2P End-to-End Encryption — ECDH P-256 key exchange + AES-256-GCM message encryption
  • Real-time Messaging — Socket.IO WebSocket-based instant delivery
  • Typing Indicators — See when others are typing in real-time
  • Read Receipts — Double-check message delivery (✓ sent, ✓✓ delivered, ✓✓ blue = read)
  • Online/Offline Status — See who's online with last-seen timestamps
  • Reply to Messages — Quote and reply to specific messages
  • Burgundy (عنابي) Theme — Beautiful dark theme with rich burgundy accents
  • JWT Authentication — Secure token-based auth with bcrypt password hashing
  • SQLite Database — Lightweight, zero-config persistence
  • Group Chats — Create group conversations with multiple members

Tech Stack

Layer Technology
Frontend React 18, Vite, React Router, Lucide Icons
Backend Node.js, Express, Socket.IO
Database SQLite (better-sqlite3)
Auth JWT + bcryptjs
Encryption Web Crypto API (ECDH P-256 + AES-256-GCM)
Real-time Socket.IO (WebSocket)

Quick Start

# Install all dependencies
npm run install:all

# Run both server and client in development
npm run dev

Server runs on http://localhost:3001
Client runs on http://localhost:5173

Encryption Architecture

User A                          Server                         User B
  |                               |                               |
  |-- Generate ECDH Key Pair --→  |                               |
  |-- Store Public Key --------→  |  ←-- Store Public Key --------|
  |                               |                               |
  |-- Fetch B's Public Key ----→  |                               |
  |-- Derive Shared Secret        |         Derive Shared Secret--|
  |   (ECDH P-256)                |           (ECDH P-256)        |
  |                               |                               |
  |-- Encrypt (AES-256-GCM) --→  |  ←-- Decrypt (AES-256-GCM) ---|
  |   [IV + Ciphertext]          |       [Shared Secret + IV]    |

Messages are encrypted client-side before transmission. The server only sees ciphertext.

License

MIT

About

End-to-End Encrypted WhatsApp-Style Messenger Built with React, Node.js, Socket.IO, and Web Crypto API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages