Skip to content

Live collaborative code editor with a Monaco editor, multi-language execution, and peer-to-peer video chat. Perfect for pair programming and interviews.

Notifications You must be signed in to change notification settings

VeDaNsH-D/CodeStream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Stream

A Real-Time, Collaborative Code Editor in Your Browser.

License: MIT Tech: Node.js Editor: Monaco Sockets: Socket.IO

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/

Code Stream Demo GIF


Core Features

  • 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 stdin support, 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 .zip file at any time.

Technology Stack

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.

Project Structure

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

Getting Started

To run this project on your local machine, follow these steps.

1. Prerequisites

  • You must have Node.js and npm installed.
  • You need a RapidAPI account with a subscription to the free Judge0 API plan.

2. Clone the Repository

git clone https://github.com/VeDaNsH-D/CodeStream.git
cd CodeStream

3. Install Dependencies

This installs all packages required for the server and the build process.

npm install

4. Set Up Environment Variables

Create 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

5. Build the Frontend

This command minifies the frontend JavaScript, preparing it for use.

npm run build

6. Run the Application

Start the local server.

npm start

Your 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.


Deployment

This app is configured for easy deployment on a platform like Render.

  1. Push to GitHub: Ensure your complete project is in a GitHub repository.
  2. Create a "Web Service" on Render: Connect your GitHub repo.
  3. Use the following settings:
    • Build Command: npm install && npm run build
    • Start Command: npm start
  4. Add Environment Variable: In the Environment tab, set a variable with the Key API_KEY and your RapidAPI key as the Value.

Render will automatically deploy your application and provide a live https:// URL.


License

This project is open-source and available under the MIT License.

About

Live collaborative code editor with a Monaco editor, multi-language execution, and peer-to-peer video chat. Perfect for pair programming and interviews.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •