A Zoom-like video calling application built with Spring Boot, React+Vite, WebRTC, and MongoDB.
- ✅ Real-time video and audio calling
- ✅ Room-based system with code and password
- ✅ Multiple participants support
- ✅ WebRTC peer-to-peer connections
- ✅ Mute/unmute audio
- ✅ Turn video on/off
- ✅ Responsive UI with modern design
- ✅ No authentication required
- Spring Boot 3.5.6 - REST API and WebSocket server
- MongoDB - Database for room management
- WebSocket - Real-time signaling
- Maven - Dependency management
- React 19 - UI library
- Vite - Build tool and dev server
- React Router - Client-side routing
- WebRTC - Video/audio communication
- CSS - Styling
Before running the application, ensure you have:
- Java 21 or higher
- Node.js 18 or higher
- MongoDB (running on localhost:27017)
- Maven
- Modern web browser with WebRTC support
Make sure MongoDB is running on localhost:27017.
Windows:
mongodMac/Linux:
sudo systemctl start mongodOr use MongoDB Compass or Docker:
docker run -d -p 27017:27017 --name mongodb mongo:latestNavigate to the backend directory:
cd backendBuild and run the Spring Boot application:
./mvnw spring-boot:runOr on Windows:
mvnw.cmd spring-boot:runThe backend server will start on http://localhost:8080
Navigate to the frontend directory:
cd frontendInstall dependencies:
npm installStart the development server:
npm run devThe frontend will start on http://localhost:5173
-
Open your browser and navigate to
http://localhost:5173 -
Create a Room:
- Click "Create Room" tab
- Enter a room name (optional)
- Enter a room code (optional - auto-generated if empty)
- Set a password
- Enter your name
- Click "Create Room"
-
Join a Room:
- Click "Join Room" tab
- Enter the room code
- Enter the password
- Enter your name
- Click "Join Room"
-
In the Video Call:
- Your video appears with a blue border
- Other participants' videos appear in the grid
- Use the control buttons to:
- 🔊 Mute/Unmute microphone
- 📹 Turn video on/off
- 📞 Leave call
-
POST
/api/rooms/create- Create a new room{ "roomCode": "ABC123", "password": "secret", "roomName": "My Meeting" } -
POST
/api/rooms/join- Join an existing room{ "roomCode": "ABC123", "password": "secret", "username": "John" } -
POST
/api/rooms/leave- Leave a room{ "roomCode": "ABC123", "username": "John" }
- WebSocket Endpoint:
ws://localhost:8080/ws/signaling
Message Types:
join- Join a roomoffer- WebRTC offeranswer- WebRTC answerice-candidate- ICE candidate exchangeleave- Leave a room
Video/
├── backend/
│ └── src/main/java/com/video/demo/
│ ├── config/ # Configuration classes
│ ├── controller/ # REST controllers
│ ├── dto/ # Data transfer objects
│ ├── handler/ # WebSocket handlers
│ ├── model/ # MongoDB models
│ ├── repository/ # MongoDB repositories
│ └── service/ # Business logic
│
└── frontend/
└── src/
├── components/ # React components
├── styles/ # CSS files
├── App.jsx # Main app component
└── main.jsx # Entry point
- Ensure MongoDB is running on port 27017
- Check
application.propertiesfor correct MongoDB configuration
- Check if backend is running on port 8080
- Verify CORS settings allow localhost:5173
Windows System Settings:
- Open Settings → Privacy & Security → Camera
- Enable "Let apps access your camera"
- Enable "Let desktop apps access your camera"
- Repeat for Microphone settings
Browser Settings (Chrome/Edge):
- Click the lock/camera icon in address bar (next to URL)
- Allow Camera and Microphone for
http://localhost:5173 - Refresh the page
Alternative: The app will automatically join without camera/mic if permissions are denied. You can still see other participants.
Other Issues:
- Check if camera/mic is being used by another application
- Try closing other video apps (Teams, Zoom, Skype)
- Use HTTPS in production (WebRTC requirement)
- Check browser console for WebRTC errors
- Ensure both users have stable internet connection
- Verify firewall is not blocking WebRTC connections
- Update
application.propertieswith production MongoDB URL - Configure proper CORS origins
- Build:
./mvnw clean package - Run:
java -jar target/demo-0.0.1-SNAPSHOT.jar
- Update API URLs in components
- Build:
npm run build - Deploy
dist/folder to your hosting service
- Use HTTPS (required for WebRTC)
- Configure TURN servers for NAT traversal
- Set up proper authentication
- Add rate limiting and security measures
The application uses public STUN servers:
stun:stun.l.google.com:19302stun:stun1.l.google.com:19302
For production, consider adding TURN servers for better connectivity behind restrictive firewalls.
This project is open source and available for educational purposes.
For issues or questions, please check:
- Browser console for frontend errors
- Backend logs for server errors
- MongoDB logs for database issues
Enjoy your video calls! 🎥