Tag this project with a star π
Vox Link is a real-time voice communication platform created and conceptualized by me, where users can connect in rooms or create their own rooms and talk in real time through voice calls directly from the browser.
Everything is done using WebRTC (Web Real-Time Communication), but in our case, it is particularly done with PeerJS, which facilitates development and is great for our purpose. The connection that allows communication between different browsers is P2P, and everything that travels is the stream of each user. However, as you might imagine, this can cause significant issues, as using a P2P connection decentralizes our application, causing the server to lose its autonomy over its own clients. Therefore, in parallel, it is important to have a WebSocket Server to control client states, as well as to signal the stabilization of connections and manage the traffic of other data, giving more autonomy to the server and "centralizing" the connection (it's worth noting that, despite everything, these are still two separate and distinct connections from each other). One of the biggest challenges is maintaining control over the client under these circumstances, as establishing this P2P connection means the server has no control over the data that travels between peers.
![](https://private-user-images.githubusercontent.com/115284250/323087792-5d1cd501-3827-4748-9e25-1b67c66bf2aa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTcyNzUsIm5iZiI6MTczODg5Njk3NSwicGF0aCI6Ii8xMTUyODQyNTAvMzIzMDg3NzkyLTVkMWNkNTAxLTM4MjctNDc0OC05ZTI1LTFiNjdjNjZiZjJhYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QwMjU2MTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MzgwNDdjMjZmOGI0NWUyOTg2YzJkMTg0YWE2YzAxNDJiN2MyNTRhMjkxMjRiZGIwYzg5MTFiNDMwM2RmM2NiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.xjqD67VyEwEjMD39b87rwN2xPJkKAveVF00KvU32kiA)
In the case of Vox Link, the stream that travels is audio, but video or similar could easily be added. With our application following the above flow, we ensure more control over the user, but it is recognized that yes, it is possible to improve especially the security. Since, using the above flow, users can freely transmit whatever they want, then other techniques can be implemented to give more autonomy to the server in this type of connection. Feel free to contribute to the project.
- Creation of independent rooms
- Limiting Users per room
- Field Verification
- Real-time voice communication
- Mute Microphone / Leave rooms
- Auto-Deletion of inactive rooms (< 0 users)
- Operates entirely in memory (no database needed)
- peer
- ejs
- express
- socket.io
- tailwindcss
- postcss
- Clone this repo with
git clone https://github.com/luiisp/vox-link
- Enter the directory with
cd vox-link
- Install the necessary dependencies using
npm install
- Start the development server with
npm run dev
Try opening in two different windows or on different devices.
The connection may not be established by browsers on mobile devices, such as cell phones, as they require SSL.