A pet project to learn about servers. Peer-Connect is a full-stack video calling web application inspired by Google Meet. This project was built to explore how real-time communication servers work and to practice system design through the implementation of an SFU (Selective Forwarding Unit) server.
Frontend
- React
- Vite
Backend
- Python
Key Libraries
What you need to run this project:
- Clone or fork the repository
git clone https://github.com/liusvincent/peer-connect- Go to the project directory
cd peer-connect- Install the frontend dependencies
cd frontend
npm install- Install the backend dependencies.
cd ../backend
python -m venv .venvActivate the virtual environment: macOS/Linux
source .venv/bin/activateWindows
.venv\Scripts\activateThen install the Python dependencies:
pip install -r requirements.txt- Generate a local TLS certificate
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 \
-keyout key.pem -out cert.pem \
-days 13 -nodes \
-subj "/CN=localhost"Then generate the SHA-256 fingerprint:
openssl x509 -in cert.pem -outform DER | openssl dgst -sha256 | awk '{print toupper($2)}'Paste the output into frontend/src/services/webtransport.ts
Note
The certificate's validity period must not exceed 14 days. Otherwise, the browser will reject the WebTransport connection during the handshake.
- Start the backend server
From the backend directory:
python main.py- Start the frontend development server
Open another terminal and run:
cd frontend
npm run dev- Open the local development URL shown by Vite in your browser
http://localhost:5173
Note
Because Peer-Connect uses WebRTC and WebTransport, your browser may require you to trust the locally generated certificate before a WebTransport connection can be established.
To be done... Coming soon
Peer-Connect uses an SFU server for multi-user video calls. Clients establish WebRTC connections with the SFU, which forwards media tracks between participants. WebTransport is used for communication between the client and server.
For a detailed explanation, see docs/architecture.md.
Additional documentation is available in the docs directory. It covers the system design, architectural decisions, design patterns, and overall code structure of the project.
This project is licensed under the MIT License. See LICENSE for details.