CodeX
Real-time collaborative IDE with Monaco Editor, live code sync, team presence, WebRTC audio/video calls, and Gemini AI-powered code reviews in shared rooms.

< 45ms
Sync Latency
< 120ms
Audio Latency
500+ rooms
Concurrency
1.2s
Code Review Speed
Executive Overview
CodeX is a high-performance browser-based cloud IDE designed for remote developer pairs, peer code reviews, and technical interviews. It enables real-time operational transformation synchronization, interactive terminal execution, and automated AI code audits.
Problem Statement & Objective
Remote developer interviews and pair-programming sessions often suffer from synchronization lag, context switching between video tools and editors, and lack of instant code feedback.
System Architecture & Data Flow
Event-driven Node.js backend using Socket.IO for room state broadcast, WebRTC Mesh network for peer-to-peer audio/video streaming, Monaco Editor frontend binding, and isolated Docker execution sandboxes.
Database Design & Schemas
Redis in-memory state store for room session states, cursor coordinates, and active WebRTC peer handshakes, backed by MongoDB for persistent user projects and snippet history.
Key Engineering Features
- Sub-50ms Collaborative Operational Code Editing
- Peer-to-Peer WebRTC Audio/Video Streaming
- Instant Gemini AI Automated Code Audit & Fixes
- Isolated Docker Container Code Execution
- Multi-Language Syntax Highlighting & Auto-Completion
Primary Engineering Challenge
Managing race conditions and document divergence during concurrent multi-cursor code edits across fluctuating high-latency network conditions.
Implemented Technical Solution
Implemented operational transformation algorithms combined with sequence vector clocks, ensuring deterministic conflict resolution without data corruption.
Security Controls
Isolated untrusted code execution inside ephemeral Docker containers with strict memory limits (128MB), no root access, and blocked outbound network sockets.
Scalability Strategy
Decoupled WebSocket signaling servers using Redis Pub/Sub adapter to allow horizontal scaling across multiple Node.js processes.
Key Technical Takeaways
Offloading audio/video media streams to direct WebRTC peer channels drastically reduces server egress costs and lowers audio latency.
Future Roadmap & Improvements
Integrate real-time debugger breakpoints and support multi-file workspace folder hierarchies.