DevRoom - Real-time Chat for Developers
DevRoom is a Visual Studio Code extension that enables real-time chat rooms directly inside your editor. Create or join chat rooms to collaborate with other developers instantly, without leaving VS Code.
Features
- 🚀 Create Rooms Instantly - Generate a unique room ID with one click
- 🚪 Easy Room Joining - Join existing rooms using a simple room ID
- 💬 Real-time Messaging - Chat with multiple developers simultaneously
- 🔄 Auto Reconnect - Automatic reconnection on network issues
- 🎨 VS Code Theme Support - Seamlessly integrates with your editor theme
- ⚡ Lightweight - Minimal performance impact on your editor
Installation
From Source
- Clone this repository
- Run
npm install in the root directory
- Run
npm run build to build the extension
- Press F5 to open a new VS Code window with the extension loaded
From VSIX Package
- Download the latest
.vsix file
- In VS Code, go to Extensions view
- Click "..." menu → "Install from VSIX..."
- Select the downloaded
.vsix file
Usage
Opening DevRoom
Click the DevRoom icon (💬) in the Activity Bar on the left side of VS Code.
Creating a Room
- Click the "Create Room" button in the DevRoom sidebar
- A unique room ID will be generated (6-8 characters)
- Share this room ID with others to invite them
- The chat panel will open automatically
Joining a Room
- Click the "Join Room" button in the DevRoom sidebar
- Enter the room ID shared by another developer
- The chat panel will open and connect you to the room
Sending Messages
- Type your message in the input field at the bottom of the chat panel
- Press Enter or click "Send"
- Your message will be broadcast to all participants in real-time
Connection Status
The top-right corner of the chat panel shows the connection status:
- 🟢 Connected - Active connection to the server
- 🟠 Reconnecting - Attempting to reconnect
- 🔴 Disconnected - Connection lost
- 🔴 Error - Connection error
Setup
Prerequisites
- Node.js 18.x or higher
- VS Code 1.70.0 or higher
Building the Extension
# Install dependencies
npm install
# Build the extension
npm run build
# Watch mode for development
npm run watch
Running the WebSocket Server
The extension requires a WebSocket server to handle real-time communication.
Local Development
# Install server dependencies
cd server
npm install
# Start the server
npm start
The server will start on http://localhost:3000 by default.
Production Deployment
Deploy the server to any Node.js hosting platform:
- Heroku:
git push heroku main
- Render: Connect your GitHub repo
- Fly.io:
fly deploy
- Railway: Connect your GitHub repo
After deployment, set the server URL as an environment variable or modify src/socketClient.ts line 21 with your production server URL.
Development
Project Structure
devroom/
├── src/
│ ├── extension.ts # Extension entry point
│ ├── DevRoomViewProvider.ts # Sidebar view
│ ├── ChatPanel.ts # Chat webview panel
│ └── socketClient.ts # WebSocket client
├── media/
│ ├── chat.css # Chat panel styles
│ ├── view.css # Sidebar styles
│ └── chat-icon.svg # Activity bar icon
├── server/
│ ├── index.js # WebSocket server
│ └── package.json # Server dependencies
├── package.json # Extension manifest
├── tsconfig.json # TypeScript config
└── esbuild.js # Build configuration
Debug Mode
- Open the project in VS Code
- Press F5 to start debugging
- A new VS Code window will open with the extension loaded
- Make sure the WebSocket server is running (
cd server && npm start)
Testing
Important: VS Code only allows one Extension Development Host at a time.
Method 1: Extension + Test Client (Recommended)
- Start server:
cd server && npm start
- Press F5 to launch extension in debug mode
- Create a room in the extension and note the room ID
- Open
test-client.html in a web browser
- Enter the room ID in the test client and click Connect
- Send messages from both the extension and browser to verify real-time sync
Method 2: Two Browser Test Clients
- Start server:
cd server && npm start
- Open
test-client.html in two different browser tabs
- Enter the same room ID in both tabs
- Test messaging between the tabs
Method 3: Extension + Command Line (Advanced)
- Start server and launch extension (F5)
- Install wscat:
npm install -g wscat
- Connect via CLI:
wscat -c ws://localhost:3000/room/yourRoomId
- Send JSON messages manually
Configuration
Server URL
By default, the extension connects to ws://localhost:3000. To change this:
- Edit
src/socketClient.ts
- Modify line 21 with your production server URL
- Rebuild the extension
Packaging
To create a .vsix package for distribution:
# Install vsce if not already installed
npm install -g @vscode/vsce
# Package the extension
npm run package
This creates devroom-1.0.0.vsix in the root directory.
Publishing
To publish to the VS Code Marketplace:
- Create a publisher account at https://marketplace.visualstudio.com/
- Get a Personal Access Token from Azure DevOps
- Login with vsce:
vsce login <publisher-name>
- Publish:
vsce publish
Requirements
- VS Code 1.70.0 or higher
- Node.js 18.x or higher
- Active internet connection for real-time chat
Known Issues
- Messages are not persisted (cleared on disconnect)
- No user authentication in v1.0
- Room history not available
- Maximum 50 users per room recommended
Roadmap
Future enhancements planned:
- User identity (usernames, avatars)
- Message persistence and history
- File sharing capabilities
- Code snippet formatting
- Slash commands
- Voice chat integration
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
License
MIT License - See LICENSE file for details
Support
For issues, questions, or suggestions, please open an issue on GitHub.
Credits
Created by Nishan Bishwokarma
Enjoy collaborating with DevRoom! 🚀