A high-performance, real-time collaborative cloud IDE with built-in Google Gemini AI pair programming, 1-click automated error debugging, live multi-user synchronization, and instant multi-language code compilation in the browser.
- 1-Click Terminal Error Diagnoser & Auto-Fixer: When compiler errors, syntax exceptions, or runtime crashes occur, the "Auto-Fix with AI" button instantly diagnoses root causes using Google Gemini 2.5 Flash and patches the Monaco Editor buffer in 1 click across all connected collaborators.
- In-Room Collaborative
@aiTeammate: Mention@aior/aidirectly in room chat. The AI assistant inspects the live editor buffer in real-time, explains complex logic, suggests Big-O optimizations, and produces test cases visible to the entire room simultaneously. - Quick Prompt Suggestions: Instant action chips (
@ai explain,@ai optimize,@ai write tests,@ai find bugs) to accelerate group pair programming and technical interview prep. - 100% Free AI Tier: Uses Google's free-tier Gemini API (no credit card required) with graceful fallbacks so the workspace never fails.
- 1-Click Theme Switcher: Toggle smoothly between deep dark mode and clean, high-contrast light mode directly from the top navigation bar.
- Synchronized Monaco Engine: Automatically switches Microsoft Monaco Editor between
vs-darkandlightthemes with matching gutters, selection highlights, and token colorization. - Persistent Preferences: Saves your theme choice in
localStorageso it stays active across page reloads.
- Interactive Drag Handles: Drag-to-resize the output terminal height (120px to 75% screen) and sidebar width (240px to 540px).
- Terminal Window Controls: Maximize terminal (85% height) for inspecting deep stack traces, minimize into a bottom bar, or clear in 1 click.
- Distraction-Free Mode: 1-click collapse/expand sidebar toggle for full-width code editing.
- Dedicated Chat & Users Tabs: Chat messages and AI responses enjoy full unconstrained vertical height with auto-scrolling.
- Zero-Latency Synchronization: High-throughput Socket.io pipelines streaming keystrokes, syntax edits, and code formatting across connected peers in sub-10ms.
- Monaco Editor Core Engine: Powered by Microsoft Monaco Editor (the foundation of VS Code) featuring intelligent autocomplete, bracket colorization, multi-cursor editing, and standard IDE shortcuts.
- In-browser code compilation and standard output/error telemetry for:
- JavaScript (Node.js ES6+)
- Python (Python 3.10)
- C++ (GCC 12)
- Java (OpenJDK 17)
- TypeScript, Rust, Go
- Built-in real-time team chat channel with timestamps, user color badges, and system toast alerts when collaborators join or leave.
- Sessions and latest code buffers are safely vaulted into MongoDB so users rejoining or entering late access the latest synchronized workspace.
| Layer | Technologies |
|---|---|
| AI Engine | Google Gemini 2.5 Flash (@google/generative-ai) — Free Tier |
| Frontend | React 19, Vite, Tailwind CSS v4, Monaco Editor (@monaco-editor/react), React Router v7, Lucide Icons, React Hot Toast |
| Backend | Node.js, Express, Socket.io |
| Database | MongoDB, Mongoose |
| Code Runner | Piston Cloud API / Native Compiler Sandbox |
Code-Room/
├── client/ # Frontend Application (React + Vite + Tailwind CSS)
│ ├── public/ # Static assets & logos
│ ├── src/
│ │ ├── api/ # Piston code execution & Gemini AI clients
│ │ │ ├── piston.js # Code runner API
│ │ │ └── ai.js # AI error diagnostic & auto-fix API
│ │ ├── components/ # Modular UI Components
│ │ │ ├── Navbar.jsx # Sticky glassmorphism header
│ │ │ ├── HeroSection.jsx # Hero banner & instant room launcher
│ │ │ ├── FeaturesBento.jsx # Bento grid feature cards
│ │ │ ├── InteractivePlayground.jsx# In-browser test runner sandbox
│ │ │ ├── AiFixModal.jsx # AI error explanation & 1-click patch modal
│ │ │ ├── HowItWorks.jsx # 3-step progression guide
│ │ │ ├── FAQ.jsx # Expandable accordion
│ │ │ ├── CallToAction.jsx # Bottom quick launcher banner
│ │ │ ├── CustomMousePointer.jsx # Floating cursor follower
│ │ │ └── Footer.jsx # Tech stack & branding footer
│ │ ├── pages/
│ │ │ ├── Home.jsx # Full interactive landing page
│ │ │ └── EditorPage.jsx # Live collaborative IDE, AI chat & terminal
│ │ ├── socket.js # Socket.io client initialization
│ │ ├── App.jsx # React routing setup
│ │ └── index.css # Tailwind CSS & global design tokens
│ └── package.json
├── server/ # Backend Application (Node.js + Express + Socket.io)
│ ├── models/ # Mongoose schemas (Room data persistence)
│ ├── services/
│ │ └── aiService.js # Gemini AI error debugger & @ai chat assistant
│ ├── index.js # Server entry point, Socket handlers & AI routes
│ └── package.json
└── README.md
- Node.js (v18.x or later)
- MongoDB (Local instance or MongoDB Atlas cluster URI)
- Google Gemini API Key (100% Free, no credit card required)
- Git
git clone https://github.com/pallaviii21/Code-Room.git
cd Code-Room- Navigate into the
serverdirectory:cd server - Install dependencies:
npm install
- Create a
.envfile inserver/:PORT=5000 MONGO_URI=your_mongodb_cluster_url FRONTEND_URL=http://localhost:5173 GEMINI_API_KEY=your_free_gemini_api_key # Get free at https://aistudio.google.com/app/apikey GEMINI_MODEL=gemini-2.5-flash
- Start the backend development server:
npm run dev
- Open a new terminal and navigate to
client:cd client - Install dependencies:
npm install
- Create a
.envfile inclient/:VITE_BACKEND_URL=http://localhost:5000
- Launch the Vite dev server:
npm run dev
- Open your browser and navigate to
http://localhost:5173/.
- Import the repository into Vercel.
- Set the Root Directory to
client. - Set Environment Variable:
VITE_BACKEND_URL=https://your-backend-service.onrender.com
- Deploy!
- Create a new Web Service on Render.
- Set the Root Directory to
server. - Set the Build Command to
npm installand Start Command tonpm start. - Configure Environment Variables:
PORT=5000MONGO_URI=your_mongodb_atlas_connection_stringFRONTEND_URL=https://your-frontend.vercel.appGEMINI_API_KEY=your_google_gemini_api_keyGEMINI_MODEL=gemini-2.5-flash
- Deploy!
This project is open source and available under the MIT License.