- ReactJS library for UI
- Signal Protocol Implementation for E2EE
- Axios for AJAX calls
- LocalStorage to store/fetch Pre-key bundle and Chats/Conversations
- Web Sockets Implementation for Instant Messaging
nodemon start
- Login
- Chat Window
- Contact List
- Message Box
- GET - api/users/login/userName - Returns User Object of the given User
- GET - api/users/users/userId/role - Returns Users Array other than the given User with given role
- Establishing WS Connection:
let webSocket = new WebSocket("ws:https://localhost:3000/chat")
- Event Listeners of the webSocket Object:
webSocket.onopen = () => {
console.log(‘WebSocket Client Connected’);
webSocket.send('Hi this is web client.');
};
webSocket.onmessage = (e) => {
console.log(‘Received: ’ + e.data);
};
webSocket.close = () => {
console.log('WebSocket Client Closed.’);
};
- InMemorySignalProtocolStore.js (and helpers.js) are taken for storage purpose from Signal Github (link mentioned in resources)
- libsignal-protocol.js (also from Signal Github) implements the protocol
- Signal Gateway - Created by me to integrate React with Signal. It performs the Initialization, Encryption and Decryption functionality when required on Frontend. Check the file in src/signal/SignalGateway.js for detailed code.
Note: If you do not clear local storage, then you can recover your old conversations post re-login since these are saved in their respective decrypted form. No data is stored on the server. Kindly view the tutorial for more details.