A modern, lightweight screen sharing and real-time chat application designed for seamless collaboration. Built with cutting-edge web technologies including React 19, TypeScript, WebRTC (PeerJS), and Socket.IO for instant peer-to-peer connections.
- Features
- Tech Stack
- System Requirements
- Installation
- Running the Application
- Usage Guide
- Browser Compatibility
- Architecture
- Troubleshooting
- Contributing
- License
- 🚀 Instant Room Creation: Generate unique 8-character codes for instant room setup
- 👥 Multi-user Support: Support for multiple concurrent participants in a single room
- 🖥️ HD Screen Sharing: Crystal-clear screen sharing via WebRTC with PeerJS
- 💬 Real-time Chat: Instant messaging with all room participants
- 🎯 User Presence Awareness: See who's in the room with live status indicators
- 🎨 Dark/Light Theme: Seamless theme switching with persistent user preference
- 📱 Responsive Design: Optimized for desktop, tablet, and mobile browsers
- 🔗 One-Click Invite: Copy and share room links instantly
- 👤 Custom User Names: Set and change your display name anytime
- ⚡ Smooth Animations: Polished UI with smooth transitions and interactions
- 🔐 Peer-to-Peer Security: Direct connections between users with no data relay
- 📊 Real-time Synchronization: Instant state updates across all participants
- 🎛️ Advanced Controls: Comprehensive meeting controls for professional use
- 🌐 Cross-platform Support: Works across major browsers and operating systems
- 🔄 Graceful Disconnection: Automatic cleanup on network interruptions
- Framework: React 19 with TypeScript for type-safe development
- Routing: TanStack Router for powerful client-side routing
- State Management: Zustand for lightweight, performant state handling
- Styling: TailwindCSS 4.0 for utility-first CSS and responsive design
- UI Components: Shadcn UI & Radix UI for accessible, customizable components
- Icons: Lucide React for beautiful, consistent iconography
- Build Tool: Vite for lightning-fast development and optimized production builds
- WebRTC: PeerJS for simplified peer-to-peer connections
- Signaling: Socket.IO for real-time bidirectional communication
- Server: Node.js-based signaling server for connection management
- Package Manager: pnpm for fast, reliable dependency management
- Code Quality: ESLint for code linting and Prettier for code formatting
- Testing: Vitest for unit testing framework
- Version Control: Git for source code management
- OS: Windows 10+, macOS 10.14+, or Linux (Ubuntu 18.04+)
- Node.js: Version 18.0.0 or higher
- RAM: 2GB minimum
- Disk Space: 500MB for installation and dependencies
- Node.js: Version 20.0.0 or higher
- RAM: 4GB or more
- Bandwidth: 1Mbps minimum for screen sharing
- Browser: Latest Chrome, Edge, or Firefox
- pnpm: 10.27.0 or higher (recommended)
- Or: npm 9.0.0+ or yarn 3.0.0+
git clone https://github.com/rumsan/snapmeet.git
cd snapmeet-ulUsing pnpm (recommended for faster installation):
pnpm installOr using npm:
npm installOr using yarn:
yarn installEnsure all dependencies are installed correctly:
pnpm list peerjs socket.io-client zustandYou should see the version numbers for each package.
The application requires two separate servers to function properly:
- Frontend Development Server - Serves the React application (port 3000)
- Signaling Server - Manages WebRTC connections (port 3001)
Run both servers simultaneously with a single command:
pnpm dev:allThis uses concurrently to start both services. Watch for confirmation that both are running:
- Frontend:
Local: http://localhost:3000 - Backend:
Signaling server running on port 3001
For more control and easier debugging:
Terminal 1 - Start Frontend:
pnpm devTerminal 2 - Start Signaling Server (in the same project directory):
pnpm serverBuild and preview the application:
# Build for production
pnpm build
# Preview the production build
pnpm previewOnce both servers are running, open your browser and navigate to:
http://localhost:3000
You should see the SnapMeet home page with the name entry form.
-
Enter Your Name
- Type your preferred display name in the input field (2-50 characters)
- This name will be visible to all participants
-
Create Room
- Click the "Go Live" button
- A unique 8-character room code is generated automatically
- You'll be taken to the meeting room
-
Invite Participants
- Click the copy icon next to the room code to copy the full URL
- Share the link via email, chat, or messaging app
- Participants can either use the link directly or enter the room code manually
-
Enter Your Name
- Type your display name in the input field
-
Enter Room Code
- Paste or type the 8-character room code in the "Join Existing Room" field
- Or click a shared link to auto-fill the room code
-
Join the Meeting
- Click the "Join Room" button
- Wait for peer connections to establish (usually 1-2 seconds)
- You'll see other participants appear in the participants panel
Starting Screen Share:
- Click the "Share Screen" button in the meeting controls
- A browser dialog will appear showing available screens/windows
- Select the screen or window you want to share
- Click "Share" in the dialog
Sharing System Audio (Chrome/Edge only):
- When selecting what to share, check the "Share tab audio" checkbox
- This allows others to hear audio from your shared content
Stopping Screen Share:
- Click the "Stop Sharing" button
- Your screen will immediately stop being shared to others
View Another User's Screen:
- Look at the Users List panel on the right side
- Click on a user's card or avatar
- Their screen stream will appear in the main display area
- Switch between users by clicking different user cards
View All Participants:
- The users list shows all connected participants
- Green status indicator means they're active
- Click on any user to see their screen (if they're sharing)
Send a Chat Message:
- Click the "Chat" button in the meeting controls
- The chat panel will open on the right side
- Type your message in the input field
- Press Enter or click "Send"
- Your message appears instantly for all participants
Chat Features:
- Messages show sender's name and timestamp
- Automatic scrolling to latest messages
- Message history persists during the session
- Works independently of screen sharing status
Available Controls:
- Share Screen: Toggle screen sharing on/off
- Chat: Open/close the chat panel
- Mute/Unmute: Control your audio (if implemented)
- Settings: Access room and display settings
- Copy Link: Share the room URL with others
- Leave Room: Exit the meeting and return home
- Click the "Change Name" button during a meeting
- Enter your new display name
- Click "Update"
- Your new name appears immediately to all participants
- Click the "Leave" button in the meeting controls
- Confirm the action if prompted
- All connections will be closed
- You'll return to the home page
- Other participants will see you as disconnected
- Enter: Send chat message
- Esc: Close chat panel or exit room (confirm required)
- Tab: Navigate through UI elements
- ✅ Chrome 60+ (Recommended for audio sharing)
- ✅ Edge 79+ (Recommended for audio sharing)
- ✅ Firefox 55+
- ✅ Safari 13+ (Limited audio sharing)
| Feature | Chrome | Edge | Firefox | Safari |
|---|---|---|---|---|
| Screen Sharing | ✅ Full | ✅ Full | ✅ Full | ✅ Limited |
| Audio Sharing | ✅ Yes | ✅ Yes | ✅ Limited | |
| Chat | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| WebRTC | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Chrome/Edge (Recommended):
- Best overall compatibility
- Support for sharing tab audio
- Hardware acceleration for smooth playback
Firefox:
- Full feature support
- Select "Share entire screen" for system audio
Safari:
- May require screen recording permission
- Audio sharing not supported
- Works for receiving shared screens
Most browsers require permission for screen sharing:
- When you click "Share Screen", a permission dialog appears
- Click "Allow" or "Share" to grant permission
- Permissions are remembered per session
If blocked, check your browser settings:
- Chrome: Settings → Privacy and security → Site settings → Screen sharing
- Firefox: about:preferences#privacy → "Permissions" → Screen Sharing
- Edge: Settings → Privacy, search, and services → Site permissions
- Safari: System Preferences → Security & Privacy → Screen Recording
┌─────────────────────────────────────────────┐
│ Browser (Frontend) │
│ ┌──────────────────────────────────────┐ │
│ │ React 19 Application │ │
│ │ ┌────────────────────────────────┐ │ │
│ │ │ TanStack Router │ │ │
│ │ │ - Home Page │ │ │
│ │ │ - Meeting Room │ │ │
│ │ └────────────────────────────────┘ │ │
│ │ ┌────────────────────────────────┐ │ │
│ │ │ Zustand Store │ │ │
│ │ │ - Room State │ │ │
│ │ │ - User Management │ │ │
│ │ │ - Chat Messages │ │ │
│ │ └────────────────────────────────┘ │ │
│ └──────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────┐ │
│ │ WebRTC & Communication │ │
│ │ ┌────────────────────────────────┐ │ │
│ │ │ PeerJS (WebRTC) │ │ │
│ │ │ - P2P Screen Sharing │ │ │
│ │ │ - Direct Media Streams │ │ │
│ │ └────────────────────────────────┘ │ │
│ │ ┌────────────────────────────────┐ │ │
│ │ │ Socket.IO Client │ │ │
│ │ │ - Signaling Messages │ │ │
│ │ │ - Chat Relay │ │ │
│ │ │ - User Events │ │ │
│ │ └────────────────────────────────┘ │ │
│ └──────────────────────────────────────┘ │
└─────────────────────────────────────────────┘
↓ WebSocket ↓
┌─────────────────────────────────────────────┐
│ Node.js Signaling Server │
│ ┌──────────────────────────────────────┐ │
│ │ Socket.IO Server │ │
│ │ - Room Management │ │
│ │ - User Registration │ │
│ │ - Signaling Messages Relay │ │
│ │ - Chat Message Broadcasting │ │
│ │ - Connection Events │ │
│ └──────────────────────────────────────┘ │
└─────────────────────────────────────────────┘
- Room Creation: User creates room → Frontend generates ID → Server stores room → Client joins
- User Joining: Client sends join request → Server adds to room → Broadcasts to others
- Screen Sharing: User requests share → Browser captures screen → Offers via PeerJS → Others connect
- Chat Message: User types message → Socket.IO sends to server → Server broadcasts to all participants
- Screen Viewing: User clicks participant → Establishes peer connection → Stream received
src/
├── routes/ # TanStack Router routes
│ ├── __root.tsx # Root layout
│ ├── index.tsx # Home page
│ └── room.$roomId.tsx # Meeting room
├── components/ # React components
│ ├── meeting-room.tsx # Main room component
│ ├── meeting-controls.tsx # Control buttons
│ ├── chat-panel.tsx # Chat interface
│ ├── users-list.tsx # Participants list
│ └── ui/ # Shadcn UI components
├── hooks/ # Custom React hooks
│ ├── use-webrtc.ts # WebRTC peer management
│ └── use-screen-share.ts # Screen sharing logic
├── stores/ # Zustand state management
│ └── meeting-store.ts # Central application state
├── lib/ # Utilities
│ ├── utils.ts
│ └── user-storage.ts
└── styles/ # Styling
└── css/
Symptom: "Connection refused" or "Cannot reach server" message
Solutions:
-
Verify both servers are running:
pnpm dev:all
-
Check ports 3000 and 3001 are not in use:
# macOS/Linux lsof -i :3000 lsof -i :3001 # Windows netstat -ano | findstr :3000
-
Firewall may be blocking connections - temporarily disable or add exceptions
-
If using VPN, try disconnecting and reconnecting
Symptom: "Share Screen" button is disabled or fails to start
Solutions:
- Verify your browser supports screen sharing (see Browser Compatibility)
- Grant permission when prompted:
- Look for permission dialog from browser
- Click "Allow" or "Share"
- Update your browser to the latest version
- Try a different browser (Chrome/Edge recommended)
- Restart the browser if permissions were previously denied
Symptom: Button shows "sharing" but others see black screen
Solutions:
- Verify WebRTC connection established (check console for errors)
- Try stopping and restarting screen share
- Check network connection - ensure good bandwidth
- Look for errors in browser console (F12 → Console tab)
- Try with a different window/screen
- Restart both servers and rejoin room
Symptom: Messages disappear or don't appear for others
Solutions:
- Check Socket.IO connection status
- Verify signaling server is running:
pnpm server - Try refreshing the page (F5)
- Check browser console for errors
- Ensure message input is not empty
- Restart the signaling server
Symptom: Frequently disconnected or "reconnecting..." message
Solutions:
- Check your internet connection stability
- Move closer to WiFi router if on WiFi
- Restart both servers
- Rejoin the room
- Check browser console for timeout errors
- Verify no network bandwidth throttling
Symptom: Delayed screen updates, laggy interactions
Solutions:
- Close other bandwidth-consuming applications
- Reduce the number of concurrent connections
- Ensure adequate internet bandwidth (1Mbps minimum)
- Try lowering browser hardware acceleration settings
- Restart the browser and servers
- Check for peer connection errors in console
Symptom: Permission dialog appears but permission is blocked
Solutions:
- Check browser privacy settings for screen sharing permissions
- Enable screen sharing permission for localhost:3000:
- Chrome: Settings → Privacy and security → Site settings → Screen sharing
- Make sure you're not in a private/incognito window (may restrict permissions)
- Restart the browser
- Try a different browser
Symptom: Red errors appearing in browser console (F12)
Solutions:
- Note the error message completely
- Check if it's a non-critical warning (many are safe to ignore)
- Critical errors typically prevent feature functionality
- Common errors:
- "Cannot read property of undefined": Refresh the page
- "WebSocket connection failed": Check signaling server
- "PeerJS error": Try restarting the room
If issues persist:
- Check the Console: Press F12 → Console tab for error messages
- Review Network Tab: F12 → Network tab to check connection status
- Verify Setup: Ensure all steps in Installation and Running sections are complete
- Test Locally First: Verify it works on localhost before troubleshooting further
- Browser DevTools: Use browser DevTools to debug WebRTC connections
We welcome contributions! To contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- 📹 Video calls with audio/video
- 📁 File sharing between participants
- 🎨 Collaborative whiteboard
- 🔴 Session recording
- 🔐 Room passwords and access control
- 📈 Usage analytics and statistics
- 👤 User authentication and profiles
- 💾 Message history and persistence
- 🎬 Screen recording with transcoding
- 🌍 Multi-language support
- 📱 Mobile native applications
- 🔔 Desktop notifications
Happy collaborating with SnapMeet! 🚀