This repository contains a full stack application with identified bugs in the React frontend and WebSocket backend. The goal is to fix these bugs as part of a practical task for an interview process.
- Client is sending infinite API requests to the server in the
/user
path. - Sending a message to the server through the input box results in flooding with responses.
- Client should send only one API request to the server on
/user
path throughout its lifecycle. - Sending a message to the server through the input field should result in the server replying back with the same message only once via WebSocket (Socket.IO).
-
Repository Setup:
- Create a public Git repository and upload the initial codebase (With bugs) in the
main
branch. - Duplicate the
main
branch and create a new branch nameddev
.
- Create a public Git repository and upload the initial codebase (With bugs) in the
-
API Bug Fix:
- Create a new branch named
fix/api
to fix the REST API bug. - Implement necessary changes to ensure only one API request is sent to
/user
.
- Create a new branch named
-
Pull Request for API Fix:
- Make a pull request for the bug fix on the
dev
branch.
- Make a pull request for the bug fix on the
-
WebSocket Bug Fix:
- Create another branch named
fix/websocket
to fix the WebSocket bug. - Ensure that the server responds back with the message sent via WebSocket only once.
- Create another branch named
-
Pull Request for WebSocket Fix:
- Make another pull request for the WebSocket bug fix on the
dev
branch.
- Make another pull request for the WebSocket bug fix on the
Important
You must follow a clean code architecture as well as make sure to include comments if necessary.
After following these steps, the bugs in the application should be resolved. The Git repository link can be submitted for further review.