Secure real-time messaging with client-side RSA-OAEP encryption.
- 🔒 End‑to‑End Encryption: Client‑side RSA‑OAEP for all messages and media.
- ⚡ Real‑Time Chat: Built on Socket.IO for instant messaging.
- 📁 Encrypted Multimedia: Secure image & video sharing.
- 🗝️ Per‑User Keys: Generates key pairs in-browser; private keys never leave client.
- 🔄 Offline Resilience: Messages queued & synced when back online.
- Live Preview: https://e2ee-chat-six.vercel.app
- Source Code: https://github.com/RJRYT/e2ee-chat
| Layer | Technology |
|---|---|
| Frontend | React, React Router, Tailwind CSS |
| Backend | Node.js, Express |
| Real‑Time | Socket.IO |
| Database | MongoDB |
| Encryption | Web Crypto API (RSA‑OAEP) |
Message flow:
- User generates RSA key pair in browser.
- Public key stored in MongoDB; private key remains client‑side.
- On send: message encrypted with recipient’s public key, sent via Socket.IO.
- Recipient decrypts with private key, displays plaintext.
- Node.js >= 16
- npm or yarn
- MongoDB instance (local or Atlas)
# Clone the repo
git clone https://github.com/RJRYT/e2ee-chat.git
cd e2ee-chat
# Install dependencies
npm install
# or
yarn install# Start backend (port 5000)
cd server
npm run dev
# Start frontend (port 3000)
cd ../client
npm run devOpen http://localhost:3000 to use.
- Register: Sign up with username & password.
- Key Generation: Client auto‑generates RSA key pair.
- Add Contacts: Enter another user’s username to chat.
- Chat: Send text, images or videos securely.
- Offline: Messages sent while offline sync when reconnected.
Contributions welcome! Please fork the repo, create a feature branch, and submit a pull request.
- Fork it
- Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add YourFeature') - Push to branch (
git push origin feature/YourFeature) - Open a pull request
Released under the MIT License. See LICENSE for details.