A full-stack video conferencing application with real-time collaborative drawing features, built with React, TypeScript, Node.js, Socket.IO, and WebRTC.
- WebRTC-based peer-to-peer video calls with multiple participants
- Audio/Video controls - Toggle microphone and camera on/off
- Responsive design - Optimized for desktop and mobile devices
- Real-time participant management - See who's in the room
- Real-time drawing synchronization across all participants
- Multiple drawing tools:
- Customizable stroke colors (10 presets + custom color picker)
- Adjustable stroke widths (2px, 4px, 6px, 8px, 12px)
- Undo functionality
- Clear canvas option
- Screenshot capture - Save the current whiteboard state
- Toggle drawing mode - Switch between viewing and drawing
- User authentication - JWT-based secure authentication
- User profiles - Manage user information
- Room management - Create and join video rooms with unique codes
- Socket.IO for real-time bidirectional communication
- MongoDB for data persistence
- Redux Toolkit for state management
- Tailwind CSS for modern, responsive UI
- TypeScript for type-safe development
Before you begin, ensure you have the following installed:
- Node.js (v18.0.0 or higher)
- npm (v9.0.0 or higher)
- MongoDB (local installation or MongoDB Atlas account)
git clone https://github.com/jayzadafiya/JusTalk.git
cd JusTalk# Install all dependencies (root, client, and server)
npm run install:allCreate a .env file in the server directory:
# Server Configuration
PORT=5000
NODE_ENV=development
# Database
MONGODB_URI=mongodb://localhost:27017/justalk
# Or for MongoDB Atlas:
# MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/justalk
# JWT Secret (use a strong random string)
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
# CORS Configuration
CORS_ORIGIN=http://localhost:3000Create a .env file in the client directory (if needed):
VITE_API_URL=http://localhost:5000
VITE_SOCKET_URL=http://localhost:5000npm run devStart the server:
npm run dev:server
# Server will run on http://localhost:5000Start the client:
npm run dev:client
# Client will run on http://localhost:3000- React 18.2.0 - UI library
- TypeScript 5.3.3 - Type-safe JavaScript
- Redux Toolkit 2.0.1 - State management
- React Router 6.20.0 - Client-side routing
- Socket.IO Client 4.7.2 - Real-time communication
- Tailwind CSS 3.3.6 - Utility-first CSS framework
- Lucide React - Icon library
- Vite 5.0.8 - Build tool and dev server
- html2canvas 1.4.1 - Screenshot capture
- Express 4.18.2 - Web framework
- TypeScript 5.3.3 - Type-safe JavaScript
- Socket.IO 4.7.2 - Real-time communication
- MongoDB with Mongoose 8.0.3 - Database
- JWT 9.0.2 - Authentication
- bcryptjs 2.4.3 - Password hashing
- Helmet 7.1.0 - Security headers
- CORS 2.8.5 - Cross-origin resource sharing
POST /api/user/register- Register new userPOST /api/user/login- User loginGET /api/user/profile- Get user profile (authenticated)PUT /api/user/profile- Update user profile (authenticated)
POST /api/room/create- Create a new roomPOST /api/room/join- Join an existing roomGET /api/room/:code- Get room detailsGET /api/room/user/:userId- Get user's rooms
POST /api/doodle- Save drawing stateGET /api/doodle/:roomId- Get room's drawing historyDELETE /api/doodle/:roomId- Clear room's drawings
GET /api/health- Server health status
join-room- Join a video roomuser-joined- Notify when user joinsuser-left- Notify when user leavesdisconnect- Handle user disconnect
webrtc:offer- Send WebRTC offerwebrtc:answer- Send WebRTC answerwebrtc:ice-candidate- Exchange ICE candidates
media-state-changed- Toggle audio/video stateget-participants- Get current room participants
doodle:start- Start drawing strokedoodle:draw- Continue drawing strokedoodle:end- End drawing strokedoodle:undo- Undo last actiondoodle:clear- Clear the canvasdoodle:sync-request- Request drawing syncdoodle:sync-response- Receive drawing sync
- Sign up or log in
- Navigate to "Create Room"
- Enter room details
- Share the room code with participants
- Sign up or log in
- Navigate to "Join Room"
- Enter the room code
- Allow camera and microphone permissions
- Click the Pen icon to enable drawing mode
- Select your preferred color from the color picker
- Choose stroke width from the width picker
- Draw on the canvas - changes sync in real-time
- Use Undo to remove last stroke
- Use Clear to reset the canvas
- Click Camera icon to capture screenshot
- Click X icon to disable drawing mode
- JWT-based authentication
- Password hashing with bcryptjs
- Helmet.js for security headers
- CORS configuration
- Input validation with express-validator
- Environment variable protection
Camera/Microphone not working:
- Ensure browser has permissions for camera and microphone
- Check if other applications are using the camera
- Try using HTTPS (required for WebRTC in production)
Connection issues:
- Verify MongoDB is running
- Check if ports 3000 and 5000 are available
- Ensure CORS_ORIGIN is correctly configured
Drawing not syncing:
- Check Socket.IO connection status
- Verify room code is correct
- Check browser console for errors
- Follow the existing folder structure
- Use TypeScript for type safety
- Follow React best practices and hooks patterns
- Use Redux for global state management
- Implement error handling in all async operations
- Set
NODE_ENV=production - Use strong
JWT_SECRET - Configure proper
CORS_ORIGIN - Use MongoDB Atlas for database
- Enable HTTPS for WebRTC
Built with β€οΈ by Jay Zadafiya