A full-stack, end-to-end encrypted chat application with real-time messaging, built with Node.js/Express and React/Vite.
It uses JWT for authentication(access,refresh token), AES for encryption and ECDH for Asynchronous keys exchange.
ChatSecureV1 can be found here
End-to-End Encryption: AES encryption with Diffie–Hellman–derived shared secrets.
Simultaneous Key Exchange: Both clients broadcast public keys immediately to reduce handshake latency.
Real-Time Messaging: Powered by Socket.IO.
Ephemeral Message Storage: Messages are stored on server until delivery (or up to 15 days if undelivered).
User Authentication: JWT-based sessions with bcrypt-hashed passwords.
Group & Private Chats
Offline Support: IndexedDB caching with Dexie.js.
Backend: Node.js, Express, Mongoose, Socket.IO
Frontend: React, Vite, Tailwind CSS, DaisyUI, Zustand
Database: MongoDB
Auth & Security: bcrypt, JSON Web Tokens, dotenv
Offline Caching: Dexie.js
Node.js v16+
npm v8+
MongoDB instance (local or cloud)
git clone https://github.com/Yoganand20/ChatSecureV2.git
cd ChatSecureV2cd backend-cs2
npm installcd ../frontend-cs2
npm installCreate a .env file in backend-cs2/:
PORT=5005
MONGODB_URI=<your_mongodb_uri>
JWT_ACCESS_SECRET=<your_jwt_access_secret>
JWT_REFRESH_SECRET=<your_jwt_refresh_secret>
JWT_ACCESS_EXPIRE=<your_jwt_access_expiry>
JWT_REFRESH_EXPIRE=<your_jwt_refresh_expiry>
BCRYPT_ROUNDS=<cost_factor_of_bcrypt_salt_gen>
NODE_ENV=<"development"||"production">Start the Backend
cd backend-cs2
npm run devStart the Frontend
cd frontend-cs2
npm run devOpen your browser at http://localhost:5173.
This project is licensed under the MIT License. See the LICENSE file for details.


