This is a simple MERN stack project that utilizes WebRTC technology to enable real-time communication between two clients in a peer-to-peer fashion. The project has a React front-end and Express back-end, and the back-end is only used as a signalling server to send ICE candidate data between two clients.
Before running the project, you need to have the following installed on your machine:
- Node.js (v14 or higher)
- NPM (v7 or higher)
- MongoDB (v4 or higher)
To get started with the project, follow the steps below:
- Clone the repository by running the following command in your terminal:
git clone https://github.com/your-username/webrtc-project.git
- Navigate to the project directory:
- Install the dependencies:
This will start the React front-end on port 3000
To use the application, follow the steps below:
-
Open the application in two different tabs or browsers.
-
In the first tab or browser, enter a username and click the
Connect
button. -
In the second tab or browser, enter a different username and click the
Connect
button. -
Once both clients are connected, click the
Call
button in one of the clients to initiate a call. -
The other client will receive the call and can choose to accept or reject it.
-
If the call is accepted, both clients can now communicate with each other in real-time.