Code Room is an unbelievably fast online code editor and compiler which allows you for real time collaboration.
- Multi-language Support: Compile code in multiple programming languages.
- Monaco Editor: Enjoy the same code editing experience as in VS Code, with features like indentation, syntax highlighting, and IntelliSense.
- Real-time Collaboration: Code together with others in real-time.
- Integrated Chat: Communicate seamlessly with your fellow collaborators.
- Supported Language : JavaScript, Python, C++
Ensure Docker and Docker Compose are installed on your machine.
-
Clone the repository:
git clone <link of this repo> cd CodeRoom
-
Configure environment variables: Ensure your
.envfile in the root directory has your MySQL and JWT configuration:# For MySQL Database DB_HOST=mysql DB_USER=root DB_PASS=password DB_NAME=users DB_TABLE_NAME=userstable # For OTP Database DB_OTP_TABLE_NAME=otpverification OTP_EMAIL_SENDER=<me@gmail.com> # For OTP Nodemailer OTP_APP_PASSWORD=<Application password> OTP_EXPIRY=5 # For JSON Web Token JWT_SECRET=your_jwt_secret_key_here JWT_LIFETIME=1hr
-
Start all services (Frontend, Backend, MySQL):
docker compose up --build
-
Open in your browser:
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:5001
- Frontend:
Ensure Node.js and MySQL are installed locally.
-
Start MySQL Service on your machine and ensure database
usersexists. -
Start Backend Server:
cd server npm install npm start(Note: Set
DB_HOST=localhostin.envwhen running locally outside Docker) -
Start Frontend App:
npm install --legacy-peer-deps npm run dev
-
Open in browser:
http://localhost:5173/
- React for Frontend UI
- Node.js and Express for Backend API
- MySQL for Database Management
- Tailwind CSS for Styling
- bcryptjs for Password Hashing
- JWT (JSON Web Token) & Nodemailer OTP for Authentication
- Monaco Editor for VS Code-like editing and IntelliSense
- Socket.io for real-time collaborative editing & chat
- Dockerized Execution Sandbox: Automatically pulls and isolates code execution environments using official lightweight images:
- JavaScript:
node:20-alpine - Python:
python:3.12-alpine - C++:
gcc:13-bookworm
- JavaScript:
Ostrich-egg
Adarsha
Pranaya-sht
XGPher35
This is a Third Semester project.
