A real-time collaborative coding platform for conducting technical interviews with multiple participants.
- π Shareable Session Links - Create unique sessions and share with candidates
- β‘ Real-time Collaboration - Multiple users can edit code simultaneously
- π¨ Syntax Highlighting - Support for JavaScript and Python with Monaco Editor
- π Code Execution - Run code safely in the browser using WASM
- π Live Updates - Changes sync instantly across all connected clients
- Frontend: React + Vite, Monaco Editor, Pyodide
- Backend: Express.js, WebSockets (ws)
- Real-time: WebSocket for bidirectional communication
- Code Execution: JavaScript (eval), Python (Pyodide/WASM)
- Node.js 18+
- npm or yarn
git clone <your-repo-url>
cd coding-interview-platform# Install root dependencies
npm install
# Install backend dependencies
cd backend
npm install
cd ..
# Install frontend dependencies
cd frontend
npm install
cd ..Run both frontend and backend concurrently:
npm run devThis will start:
- Backend server on http://localhost:3001
- Frontend dev server on http://localhost:5173
# Build frontend
cd frontend
npm run build
cd ..
# Start backend server
npm startnpm testThe tests cover:
- Session creation and retrieval
- WebSocket connections
- Real-time code synchronization
- Language switching
docker build -t coding-interview-platform .docker run -p 3001:3001 coding-interview-platformAccess the application at http://localhost:3001
-
Create a Session
- Click "Create New Session" on the homepage
- A unique session ID will be generated
-
Share the Link
- Click "Copy Link" to copy the session URL
- Share it with other participants
-
Collaborate
- All participants can edit code in real-time
- Select language (JavaScript or Python)
- Run code to see output
-
Execute Code
- Click "Run Code" to execute in the browser
- JavaScript uses native eval
- Python uses Pyodide (WebAssembly)
coding-interview-platform/
βββ backend/
β βββ server.js # Express + WebSocket server
β βββ package.json
βββ frontend/
β βββ src/
β β βββ App.jsx # Main React component
β β βββ main.jsx
β β βββ App.css
β βββ package.json
β βββ vite.config.js
βββ tests/
β βββ integration.test.js
βββ Dockerfile
βββ package.json # Root package with scripts
βββ README.md
Create .env files if needed:
Backend (.env)
PORT=3001
Frontend (.env)
VITE_API_URL=http://localhost:3001
VITE_WS_URL=ws://localhost:3001
POST /api/sessions- Create a new sessionGET /api/sessions/:sessionId- Get session detailsGET /health- Health check
Client β Server
join- Join a sessioncode_change- Update codelanguage_change- Change programming language
Server β Client
init- Initial session statecode_update- Code changed by another userlanguage_update- Language changed by another user
- @monaco-editor/react (v4.6.0) - Monaco Editor React wrapper
- Same editor that powers VS Code
- Built-in syntax highlighting for 100+ languages
- IntelliSense and autocomplete
- Pyodide (v0.24.1) - Python runtime compiled to WebAssembly
- Runs Python directly in the browser
- No server-side execution needed
- Includes scientific Python packages
-
Railway (Easiest)
- Connect GitHub repository
- Auto-deploy on push
- Free tier available
-
Render
- Free web services
- Auto-deploy from Git
- Supports Docker
-
Heroku
- Easy setup with CLI
- Free tier (with limitations)
-
DigitalOcean App Platform
- $5/month starter
- Auto-scaling
-
AWS ECS / Fargate
- Most scalable
- Pay per use
# Install Railway CLI
npm install -g @railway/cli
# Login
railway login
# Initialize project
railway init
# Deploy
railway upFeel free to open issues or submit pull requests!
MIT
Built as part of the AI Dev Tools Zoomcamp by DataTalks.Club