This repository contains the implementation of a Real-Time Collaborative Workspace system, developed as part of a backend-focused assessment.
The project demonstrates the design and development of a production-grade backend service with secure authentication, role-based access control, real-time communication, and scalable architecture.
A lightweight frontend client is included to consume and validate backend functionality.
Primary Focus: Backend Architecture
Secondary Component: Frontend (integration client only)
The system provides a backend platform that enables:
- Secure user authentication
- Role-based access to shared workspaces
- Real-time collaboration events
- Asynchronous background job processing
- Cloud-ready deployment
This is conceptually similar to a simplified collaborative coding or development workspace.
The backend is designed with a clean, modular, and scalable architecture.
- JWT-based authentication with refresh tokens
- Role-Based Access Control (Owner, Collaborator, Viewer)
- RESTful APIs for:
- Projects
- Workspaces
- Invitations and roles
- Real-time collaboration using WebSockets (Socket.IO)
- Event-driven design (Redis-ready)
- Asynchronous job processing using queues
- OpenAPI (Swagger) documentation
- Secure configuration via environment variables
- Cloud deployment readiness
- Node.js
- Express.js
- MongoDB (Atlas)
- JWT (Authentication)
- Socket.IO (Real-time communication)
- BullMQ (Background jobs)
- Redis (optional, for scaling)
- Swagger API Documentation : - https://real-time-collaborative-backend-x37b.onrender.com/api-docs/
- Backend url : - https://real-time-collaborative-backend-x37b.onrender.com/
- Authenticate users
- Interact with backend APIs
- Establish WebSocket connections
- Demonstrate workspace-level real-time events
- React.js
- Axios
- React Router
- Context API
- Socket.IO Client
- Basic CSS
- User registers and logs in
- Backend issues access and refresh tokens
- User accesses dashboard and projects
- User enters a workspace
- Backend enforces permissions using RBAC
- Real-time events are broadcast to connected users
- Background jobs are processed asynchronously
- WebSocket connections are established after authentication
- Backend acts as the single source of truth
- Events include:
- User join / leave
- Activity updates
- Mocked file or cursor events
- Architecture supports horizontal scaling
- Node.js v18 or higher
- MongoDB Atlas
- (Optional) Redis
cd server
npm install
npm run start
cd client
npm install
npm start
- The project is designed to be deployed on cloud platforms.
- Backend can be deployed as a Node.js service (e.g., Render)
- Frontend can be deployed as a static site
- Environment variables are managed securely via the platform
- Docker support is optional and not mandatory
- Deployment links can be added here after deployment.
- Backend-first development approach
- Clear separation of concerns
- Modular and maintainable codebase
- API-first design
- Real-time and async capabilities built into the core
- Frontend UI is minimal by design.
- Avanced collaborative editors and UI enhancements are out of scope
- Focus is on backend quality, scalability, and correctness
This project demonstrates the design and implementation of a real-time collaborative backend system, emphasizing secure authentication, role-based access control, real-time communication, and scalable architecture.