A Real-Time, Collaborative Code Editor in Your Browser.
Code Stream is a web-based, real-time collaborative code editor built for on-the-fly pair programming sessions and technical interviews. It requires no user accounts or data storage. Simply create a room, share the URL, and start coding. All session data is ephemeral, held in memory, and completely wiped when the last person leaves the room.
[Live Demo] -> https://codestream-vf8j.onrender.com/
- Real-Time Syncing: Code, create, rename, and delete files with changes synced instantly across all participants.
- Remote Code Execution: Securely compile and run code in C, C++, Java, JavaScript, and Python with
stdinsupport, powered by the Judge0 API. - Monaco Editor: Integrates the powerful editor that drives VS Code, providing a premium editing experience with rich syntax highlighting and intelligence.
- Dual Theme: A sleek UI with a full light/dark mode toggle. Your preference is saved in your browser for your next visit.
- Video & Screen Sharing: Built-in peer-to-peer video/audio chat and screen sharing powered by WebRTC for seamless communication.
- Anti-Cheat & Activity Log: A persistent dashboard logs important events like users joining/leaving, running code, and large paste detection (>50 characters).
- Zero-Config Setup: No databases, no user accounts. Just a lightweight Node.js server and a single HTML file.
- Project Download: Download the entire workspace as a
.zipfile at any time.
| Category | Technology | Purpose |
|---|---|---|
| Frontend | HTML, Tailwind CSS | Structure and styling of the user interface. |
| JavaScript (ES6+) | Handles all client-side logic, UI events, and state management. | |
| Monaco Editor | The core code editing component. | |
| Socket.IO Client | Establishes and manages the real-time connection to the server. | |
| WebRTC | Enables direct browser-to-browser video, audio, and screen sharing. | |
| JSZip | Packages project files into a .zip for download. |
|
| Backend | Node.js | The JavaScript runtime environment for the server. |
| Express.js | A minimal framework to serve the frontend files. | |
| Socket.IO Server | The heart of collaboration; manages rooms and message broadcasting. | |
| Services | Judge0 API | Secure, sandboxed execution of user-submitted code. |
| Render | The cloud platform for deploying the application. |
The project is organized for a professional build and deployment workflow.
/code-stream-project
|
|-- /public # All static files served to the client
| |-- index.html
| |-- main.min.js # (Auto-generated by the build process)
|
|-- /src
| |-- main.js # Readable frontend JavaScript source code
|
|-- package.json # Project dependencies and scripts
|-- server.js # The Node.js backend server
|-- .env # (Local Only) For storing the API key
To run this project on your local machine, follow these steps.
- You must have Node.js and npm installed.
- You need a RapidAPI account with a subscription to the free Judge0 API plan.
git clone https://github.com/VeDaNsH-D/CodeStream.git
cd CodeStreamThis installs all packages required for the server and the build process.
npm installCreate a file named .env in the root of the project.
Add your RapidAPI key to this file. Remember to use API_KEY as the variable name.
API_KEY=your_actual_rapidapi_key_here
This command minifies the frontend JavaScript, preparing it for use.
npm run buildStart the local server.
npm startYour application should now be running at http://localhost:3000.
Note: For full video/audio functionality locally, you may need to set up a self-signed SSL certificate and run the server over HTTPS, as browsers have strict security policies. The feature is guaranteed to work on a deployed https:// URL.
This app is configured for easy deployment on a platform like Render.
- Push to GitHub: Ensure your complete project is in a GitHub repository.
- Create a "Web Service" on Render: Connect your GitHub repo.
- Use the following settings:
- Build Command:
npm install && npm run build - Start Command:
npm start
- Build Command:
- Add Environment Variable: In the Environment tab, set a variable with the Key
API_KEYand your RapidAPI key as the Value.
Render will automatically deploy your application and provide a live https:// URL.
This project is open-source and available under the MIT License.
