This project is a real-time collaborative text editor where multiple users can edit a document simultaneously.
- Real-time Editing
- Displays multiple active users and their cursor positions.
- It shows text changes and cursor movements are broadcast in real-time to all connected users.
- Frontend: React + Vite, TailwindCSS, Socket.IO Client
- Backend: Node.js, Express, Socket.IO Server
- Node.js and editor vs-code recommended
- Yarn or npm or npm
- Git
-
Clone the repository:
git clone https://github.com/elijahladdie/realtime-document-editor-bn.git backend git clone https://github.com/elijahladdie/realtime-document-editor-fn.git frontend
-
Install dependencies for both the backend and frontend.
cd backend yarn installcd frontend yarn install
-
Backend:
Run the backend server:
yarn start
-
Frontend:
Run the frontend development server:
yarn dev
-
Open the app in your browser at
http://localhost:5173for real-time collaboration.
-
Socket.IO: I used Socket.IO for event-based communication between the backend and frontend.
-
Concurrency Management: Each user's text changes and cursor movements are broadcasted immediately to other clients.
-
Real-time Updates: Changes are synchronized on every keystroke or cursor movement.