A real-time collaborative text editor where multiple users can edit the same document simultaneously. Built with React, Express.js, and WebSocket, this project allows instant updates across all connected clients, providing a seamless editing experience.
- Real-time collaboration: Changes made by any user are instantly reflected across all other users.
- WebSocket communication: Persistent WebSocket connections enable efficient, low-latency communication.
- Simple, intuitive UI: Built with React to ensure a responsive and user-friendly experience.
- Live document updates: Clients receive document updates in real-time as changes occur.
- React: Frontend framework to create the interactive text editor interface.
- Express.js: Server-side framework to handle WebSocket connections and serve the app.
- WebSocket: For real-time communication between the client and server.
- Cors: Used for handling cross-origin resource sharing (CORS) to allow requests from different domains.
To run this project locally, follow these steps:
Clone the repository to your local machine:
git clone https://github.com/Haddajii/Real-time-collaborative-text-editor.git
cd Real-time-collaborative-text-editorNavigate to the client folder and install the required dependencies:
cd client
npm installNext, navigate to the server folder and install the required dependencies:
cd ../server
npm installStart the server with the following command:
npm startThe server will run on http://localhost:5001.
Go back to the client folder and start the React app:
cd ../client
npm startThe frontend will be served on http://localhost:3000.
To test the collaborative editing, open the application in multiple browser tabs or different devices. As you make edits in one tab, the changes will instantly appear in all other open tabs or devices connected to the same server.
Open the app in two or more browser tabs or devices. Start typing in one tab and see the updates reflected live on the other tab. Each user can make their own changes, and they will instantly be visible to all connected users in real-time.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to fork this repository and submit pull requests for bug fixes, features, or improvements. Contributions are always welcome!
Made with ❤️ by Haddajii