Realtime Collaborative IDE is a web-based platform that lets users collaborate on code in real time with built-in AI assistance. The app uses WebRTC, WebSockets, and Yjs to synchronize code edits, while a responsive chatbot panel helps answer programming questions directly from the editor.
- Live code collaboration with shared editing
- Real-time synchronization using WebRTC and Yjs
- WebSocket fallback for connection reliability
- Monaco Editor for advanced code authoring
- User awareness and session sharing
- AI code assistant/chatbot panel with abortable requests and clear-to-initial state
- Frontend: React, Tailwind CSS
- Backend: Node.js, Express
- Realtime synchronization: Yjs, y-webrtc, y-websocket
- Editor: Monaco Editor
- Database: MongoDB
- AI integration: Gemini via LangChain (
@langchain/google-genai)
- Node.js (v18+)
- npm or yarn
- MongoDB (local or Atlas)
- A Gemini API key for the chatbot:
GEMINI_API_KEY
git clone https://github.com/Deep-2108/RealtimeIDE-main.git
cd RealtimeIDE-mainInstall backend and frontend dependencies:
cd backend
npm install
cd ../frontend
npm installInstall the local y-webrtc signaling server dependencies too:
cd ../y-webrtc
npm installCreate a .env file in backend/ with at least:
MONGO_URI=your_mongodb_connection_string
GEMINI_API_KEY=your_gemini_api_key
GEMINI_MODEL=gemini-3.5-flashThe backend chatbot uses LangChain with the Google Gemini provider, so make sure GEMINI_API_KEY is configured before starting the server.
Start the signaling server:
cd y-webrtc
node bin/server.jsStart the backend:
cd ../../backend
node server.jsStart the frontend:
cd ../frontend
npm run devOpen the app at http://localhost:5173
- Open
http://localhost:5173in your browser after starting the frontend. - The homepage shows login/signup options. If you are not logged in, click Signup to create an account or Login if you already have one.
- Once logged in, use the Editor Page link to access the collaborative editor.
- The left sidebar is the File Explorer.
- Click + to create a new file and enter a file name.
- Click any file name to load its content into the editor.
- Use the item menu to Rename, Delete, or Change Access for a file.
- Files are fetched from the backend and require a valid login token.
- The central editor is a shared Monaco editor powered by Yjs and y-webrtc.
- Changes are synchronized in real time with other collaborators connected to the same file.
- The active users toolbar at the top shows other users currently editing the document.
- The editor auto-saves the active file every few seconds and also saves before navigating away.
- Use the Run Code button on the right panel to execute the current editor content.
- The app sends the code to the Piston execution API configured for C++ and displays the output below.
- The Output panel shows program output or any execution error returned by the runner.
- Enter custom input in the Stdin section before running code.
- The input is passed to the running program and reflected in the output results.
- If you are the creator of the current file, the Share File section appears in the right panel.
- Enter a collaborator's email and click Share to grant access through the backend sharing endpoint.
- Shared file access is managed by the backend route
api/files/share.
- The chatbot lives in the bottom-right panel as a floating bubble when collapsed.
- Click the bubble to expand the chat panel.
- Ask questions about code, compiler errors, project setup, or collaboration issues.
- Click Send to submit your query.
- If a request is running, click Stop to abort the API call.
- Click Clear to reset the chat to the initial assistant message.
- When the chat panel is collapsed, new assistant responses show an unread badge on the bubble.
- Confirm the signaling server is running on port
4444. - Make sure the browser can connect to
http://localhost:4444.
- Ensure
backend/server.jsis running andMONGO_URIis valid. - If port
5000is already in use, stop the conflicting process or change the port.
npx kill-port 5000Then restart the backend.
- The project includes a local
y-webrtcfolder for the signaling server. - The frontend connects to the backend at
http://localhost:5000and the editor is served by Vite.
Feel free to open issues and contribute! 🚀