LiveDoc is a collaborative document editing platform that allows multiple users to create, edit, and share documents in real-time. It features user authentication, document sharing, and live collaboration using WebSockets.
- User Authentication: Secure user registration and login using JWT.
- Real-Time Collaboration: Edit documents with multiple users simultaneously.
- Document Management: Create, update, delete, and share documents.
- File Upload: Import
.docxand.txtfiles into the editor. - Export Documents: Save documents as
.docxfiles. - Notifications: Real-time notifications for user join/leave events.
- Node.js: Server-side runtime
- Express.js: Web framework for building RESTful APIs
- MongoDB: Database for storing user and document data
- Socket.IO: Real-time communication for collaborative editing
- Mongoose: ODM for MongoDB
- JWT: Authentication and authorization
- Bcrypt: Password hashing
- React: Frontend library for building user interfaces
- Quill.js: Rich text editor for document editing
- Socket.IO Client: Real-time communication with the server
- React Router: Routing for navigation
- React Hot Toast: Notifications
- Docx: Export documents to
.docxformat - Mammoth.js: Import
.docxfiles
Create a .env file in the server/ directory and add the following:
JWT_SECRET=your_jwt_secret_key
MONGO_URI=your_mongodb_uriStart the server:
npm startServer runs at http://localhost:3001
cd client
npm install
npm run devClient runs at http://localhost:5173
- Register: Go to
/registerto create a new account. - Login: Log in at
/. - Join/Create Room: Visit
/jointo start or join a document. - Edit: Use the rich text editor for real-time collaboration.
- Share: Generate a document link to collaborate.
- Export: Save documents as
.docxfiles.
server.js– Main server fileroute.js– API routesuser.js– Mongoose schema for usersDocument.js– Mongoose schema for documentsmiddleware.js– JWT middleware
TextEditor.jsx– Main editor componentRoomForm.jsx– Form to create/join roomsAuth/– Login and register componentsstyles/– Custom styles
POST /api/v1/users/register– Register userPOST /api/v1/users/login– LoginGET /api/v1/users/myInfo– Get user info (JWT required)
get-documents– Retrieve user documentscreate-document– Create new documentupdate-document– Update contentdelete-document– Delete documentadd-collaborator– Add collaborator
- Real-time cursor tracking
- Document version control
- Advanced permission levels
- More supported file formats
This project is licensed under the MIT License.



