Chattenger is a node server based web application that enables you to establish real-time communication with your friends across the globe(ofcourse,where internet is available !).
Techniques and languages that were used
- HTML
- CSS
- JS
- Jquery
- AJAX
- Socket.io
- Nodejs
- Webrtc
- Web crypto
- FileReader API
- Canvas filtering and image manipulation
- External API(like Giphy api,tenor api,deezer api,imgur api)
Get started in localhost
git clone https://github.com/kanhaiya-2000/Chattenger.git
navigate to the Chattenger directory and install necessary node modules(as mentioned in package.json file,you need npm preinstalled in your environment)
npm install
npm start
nodemon app.js
This will start the localhost server Now go to localhost:3000 in your browser
Features
Security of password for your room matters,Password and admin key for a room is now securely stored after hasing with passwordHASH.Chats,file-sharing and calls are end-to-end encrypted and their data are never stored on server end.Random encryption key and auth token are generated on creation of a room.Token is then shared with each member who joins the room to give them access to send and receive message in the room.
The quality of video call actually depends on the camera resolution of your device and internet connection(As applicable for all applications),you can make group video or voice calls with your room members.Screensharing option is also available on supported desktop browsers(chrome,firefox,opera or Edge).The video call has been optimised by restricting framerate and bandwidth(when bandwidth saver is turned on) so that device should not warm up extensively while call is in progress. kindly check here for your browser support before attempting to make a call.Recent versions of safari are now supporting webrtc. Call may not work if non-proxied UDP connection is blocked in browser setting.
A person who creates a group first is denoted as admin of that group,his/her login information is protected by the adminkey(that he/she provides during group creation),so ideally noone can login as admin unless he/she knows the admin key for that group.Besides,being an admin gives you access to change password for your group,change max number of users in room and remove any member in your group.
These are just added to give wonderful experience to chatting.You can delete your sent messages any time.
File sharing is based on blob and filereader API.Buffer are encrypted before sending it to other users in a room.Since there is no intermediate data center involved in sharing file,therefore you need to have good internet connection for making successful sharing of file(since it is direct data transfer among client browsers through the server so some data may get lost if you disconnect your internet (or get disconnected because of poor connection) and consequently file may get corrupted
You can send voice messages.
Image filter has also been added,you can apply or control filter properties like brightness,contrast,hue,saturation,opacity,blur,invert etc.You can also crop image before sharing.
Private message can be sent to a user in room by including @{USERNAME}
in message.
Now profile pic can be added and will remain saved to your browser even if you refresh your browser.You have options to change fonts,text-color and text-size(font-size) as per your convenience.These all styles and fonts will also remain saved (provided browser supports web storage).Few games were also added.Some other features include deleting sent messages,replying to a message etc.
Credits
socket.io and webrtc are the most important things that made this project relevantly saucy.My heartful thanks to #webrtc and #socket.io developers for building such cool technology.
Demo/pics
To explore yourself, Click here.