A peer-to-peer group video calling application built with SvelteKit (frontend), Spring Boot (backend), and Nginx (reverse proxy). Features real-time video/audio communication (full mesh) with secure HTTPS, and Dockerized deployment.
Note: Each room also supports multiple participants. All users in a room will connect to each other in a full mesh for group video calls.
flowchart TD
subgraph Client
A[Web Interface<br>Svelte 5]
B[WebRTC API]
C[STOMP/WebSocket Client]
end
subgraph Docker_Network
D[Nginx<br>80/443]
E[Spring Boot Backend<br>8000]
F[SvelteKit Frontend<br>3000]
end
subgraph External
G[STUN/TURN Server<br>3478]
end
A -- HTTP/WS --> D
C -- WebSocket --> D
D -- Proxy HTTP/WS --> E
D -- Serve Static --> F
B -- WebRTC --> G
- Real-time Video Calls: Peer-to-peer via WebRTC
- Room-based Calls: Private rooms for group video calls (full mesh)
- Modern UI: Built with SvelteKit
- SSL Support: Secure HTTPS via Nginx and custom certificates
- Dockerized: Easy deployment with Docker Compose
- Responsive Design: Works on desktop and mobile
WebRTC-Video-Call/
│
├── backend/ # Spring Boot backend (Java)
│ ├── src/
│ ├── pom.xml
│ └── Dockerfile
│
├── frontend/ # SvelteKit frontend (TypeScript)
│ ├── src/
│ ├── package.json
│ ├── Dockerfile
│ └── .env.example
│
├── nginx/ # Nginx reverse proxy config
│ ├── nginx.conf
│ ├── Dockerfile
│ └── ssl/
│ ├── certificate.pem
│ └── private_key.pem
│
├── docker-compose.yml # Multi-service orchestration
└── README.md
- Docker & Docker Compose
- Java 21+ (for backend local development)
- Node.js 24+ (for frontend local development)
- Maven 3.9+ (for backend local development)
-
Clone the repository
git clone https://github.com/AnishSarkar22/WebRTC-Video-Call.git cd WebRTC-Video-Call -
Configure Environment
- Edit
frontend/.env(copy from.env.example) and set your WebSocket URL if needed:VITE_WEBSOCKET_URL=wss://your-domain.com/ws - Edit
nginx/nginx.confand set your domain or useserver_name _;for all hosts.
- Edit
-
Create SSL Certificates (for HTTPS)
mkdir -p nginx/ssl openssl req -x509 -newkey rsa:4096 -keyout nginx/ssl/private_key.pem -out nginx/ssl/certificate.pem -days 365 -nodes
-
Build and Start All Services
docker-compose up --build
-
Access the Application
- HTTP:
http://localhost - HTTPS:
https://localhost
- HTTP:
socket.host=0.0.0.0
socket.port=8000
server.port=8000
server.address=0.0.0.0VITE_WEBSOCKET_URL=wss://your-domain.com/ws- Proxies
/wsand API requests to backend (backend:8000) - Serves frontend static files or proxies to frontend container (
frontend:3000,4173, or5173)
- backend: Spring Boot app on port 8000
- frontend: SvelteKit app (dev: 5173, preview: 4173, prod: 3000)
- nginx: Reverse proxy on 80/443, SSL termination, static file serving
- Spring Boot: REST API & WebSocket (STOMP) signaling server
- RoomService: Manages room membership and signaling
- WebSocketConfig: Configures STOMP endpoints
- SvelteKit: Modern reactive UI
- websocket.svelte.ts: Handles STOMP/WebSocket signaling
- webrtc.svelte.ts: Manages WebRTC peer connections
cd backend
./mvnw testcd frontend
npm install
npm run test- Open the app in your browser.
- Create or join a room.
- Share the room ID with other users.
- All users in the room will connect to each other for a group video call.
- Self-signed certificates for local development are in
nginx/ssl/. - For production, replace with certificates from a trusted CA.
- Spring Boot 3.2.6
- Svelte 5 and Sveltekit
- STOMP/WebSocket
- Nginx
This project is licensed under the MIT License.