A basic whatspp like chat application for frontend for sending, recieving messages from various user with simple google auth
- Clone this repo using
git clone - Go inside the folder and do
npm installto install the dependencies - Once done with installing do
npm startto start the server - simultaneously start the backend server with
npm start, both server should be start to properly use this project
-
Redux to handle complex states and maintaining state like
- Read,
- Last messages
- Fetch chats
- Store chats with last message
-
Send, Update and Get all the previous Messages
-
Filter chats based on Read and Unread last messages
-
Get All the user with you are talking and show it in UI
-
Pagination for List of users
-
Reverse pagination for messages
-
Social Authentication with Google Auth
-
Key(Keyboard) based navigation -
keyUPandkey downfor going up and down in the chat and setting focus,enter keyoutside chat window to open the chat of the user,enter keyinside chat window to send messages. -
Count of No. of Unread messages
-
Mark as read option without actually reading the chat
- Used
REST APIsto implement these functionalities while best case is combination of REST APIs and Websocket to efficiently uses - Used Combination of
React HooksandReduxfor storing chats, and handling state for User Information(list of user with last messages) and messages withuseState(),useEffect(),useRef(), redux-toolkit functionalities - Used Polling to send and recieve messages with Reverse OnScroll Pagination and update the state with React Hooks with minimal Re-render
- Used React-router for routing purposes with default route when user has not logged in as
/and/chatswhen loggedin - Used tailwind css for styling purpose
- Maintained minimilistic design with focus on user experience.
- Efficiently use Polling and Websocket for better user experience
- Design Improvements
- Efficiently setup a scalable backend for better functionality
- Efficiently use Pagination with all edge cases
- Use of hooks like
useMemo(),React.momo(),useCallback()to reduce the re-renders - Efficient uses of Redux functionalities and remove redux usage if not required
- Others