Real-Time Collaborative Code Editor built with Spring Boot, WebSockets, MongoDB, and Next.js.
CollabCode enables multiple developers to collaborate inside shared coding rooms with live code synchronization and real-time communication, providing an experience similar to collaborative IDE platforms.
- Multiple users can join the same room
- Instant code synchronization using WebSockets
- Live updates across all connected clients
- Room-based chat system
- Instant message delivery
- Team communication during collaboration
- Create collaboration rooms
- Join existing rooms using Room ID
- Persistent room storage
- Latest editor state stored in MongoDB
- Retrieve room contents anytime
- Prevents accidental code loss
- Low-latency communication
- STOMP messaging support
- Real-time event broadcasting
- Monaco Editor integration
- Multi-language support
- VS Code inspired interface
- Responsive UI
- Java 21
- Spring Boot
- Spring WebSocket
- Spring Data MongoDB
- STOMP Protocol
- SockJS
- Next.js
- React
- TypeScript
- Tailwind CSS
- Monaco Editor
- Framer Motion
- MongoDB Atlas
- Git
- GitHub
- Postman
- IntelliJ IDEA
CollabCode
│
├── backend
│ ├── controller
│ ├── service
│ ├── repository
│ ├── entity
│ ├── websocket
│ └── config
│
├── frontend
│ ├── app
│ ├── components
│ ├── hooks
│ ├── services
│ ├── lib
│ └── types
│
└── README.md
Client
│
▼
WebSocket / REST API
│
▼
Spring Controllers
│
▼
Service Layer
│
▼
MongoDB Repository
│
▼
MongoDB Atlas
User A edits code
│
▼
WebSocket Message
│
▼
Spring Boot Server
│
▼
MongoDB Update
│
▼
Broadcast via STOMP
│
▼
User B / User C receive update instantly
POST /roomsGET /roomsGET /rooms/{roomId}PUT /rooms/{roomId}DELETE /rooms/{roomId}/ws
/app/code
/topic/code/{roomId}
/app/chat
/topic/chat/{roomId}
git clone https://github.com/Adarsh2709/CollabCode.git
cd CollabCodeConfigure MongoDB connection:
spring.data.mongodb.uri=YOUR_MONGODB_URIRun application:
./gradlew bootRunBackend starts at:
http://localhost:8080
npm install
npm run devFrontend starts at:
http://localhost:3000