A real-time collaborative document editor built with React, Node.js, and WebSockets. CollabSpace allows multiple users to edit documents simultaneously with features like rich text editing, image handling, page management, and real-time synchronization.
- 🚀 Real-time Collaboration - Multiple users can edit documents simultaneously
- 📝 Rich Text Editing - Full-featured editor with formatting, images, and more
- 🔒 Open Source - Completely free and open source with MIT license
- 🛠️ Developer Friendly - Well-documented codebase with clear APIs
- 📱 Modern Stack - Built with the latest technologies and best practices
- 🏆 Competing with Giants - Taking on Google Docs, Notion, and other big players with open source alternatives
- 💝 Community Driven - Every contribution, no matter how small, makes a difference
- User registration and login with JWT authentication
- Secure password hashing with bcrypt
- Token-based authentication with refresh capabilities
- Protected routes and API endpoints
- Create, edit, and delete documents
- Multi-page document support
- Document sharing and collaboration
- User invitation system
- Document search with Elasticsearch integration
- Real-time collaborative editing with WebSockets
- Rich text formatting (bold, italic, underline, etc.)
- Text and background color support
- Undo/redo functionality
- Auto-save with debounced updates
- LaTeX rendering support
- Drag & drop image upload
- Paste image from clipboard
- Image resizing with corner handles
- Image positioning and dragging
- Image toolbar with delete, reset, and size controls
- Server-side image storage with multer
- Add/delete pages dynamically
- Page navigation with sidebar controls
- Page-specific content management
- Real-time page synchronization
- Full-text search across documents
- Elasticsearch-powered search engine
- Document filtering and organization
- Search results with snippets
- React 19 - Modern React with hooks
- React Router - Client-side routing
- Tailwind CSS - Utility-first CSS framework
- KaTeX - LaTeX rendering
- WebSocket - Real-time communication
- Node.js - JavaScript runtime
- Express.js - Web framework
- Prisma - Database ORM
- PostgreSQL - Primary database
- WebSocket - Real-time communication
- JWT - Authentication tokens
- bcrypt - Password hashing
- Multer - File upload handling
- Elasticsearch - Search engine
- Users - User accounts and authentication
- Documents - Document metadata and ownership
- Pages - Individual document pages with content
- DocumentShare - Document sharing relationships
- Invitations - User invitation system
- Node.js (v16 or higher)
- PostgreSQL database
- Git
-
Clone the repository
git clone https://github.com/YOUR_USERNAME/collabspace.git cd collabspace -
Set up backend
cd backend npm install cp .env.example .env # Edit with your database credentials npx prisma generate npx prisma db push npm start
-
Set up frontend (in a new terminal)
cd frontend npm install npm start -
Access the application
- Frontend: http://localhost:3002
- Backend API: http://localhost:3000
For detailed setup instructions, troubleshooting, and known issues, see SETUP.md.
clean-collabSpace/
├── backend/
│ ├── prisma/
│ │ ├── migrations/ # Database migrations
│ │ └── schema.prisma # Database schema
│ ├── generated/ # Prisma generated client
│ ├── uploads/ # Image uploads directory
│ ├── server.js # Main server file
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── Editor.jsx # Main editor component
│ │ │ ├── EditorToolbar.jsx
│ │ │ └── PageControls.jsx
│ │ ├── pages/ # Page components
│ │ │ ├── Dashboard.jsx
│ │ │ ├── EditorPage.jsx
│ │ │ ├── Login.jsx
│ │ │ └── Signup.jsx
│ │ ├── context/ # React context
│ │ │ └── AuthContext.js
│ │ ├── hooks/ # Custom hooks
│ │ └── utils/ # Utility functions
│ └── public/
└── README.md
POST /api/signup- User registrationPOST /api/login- User loginPOST /api/refresh-token- Token refreshGET /api/validate-token- Token validation
GET /api/documents- Get user's documentsPOST /api/documents- Create new documentGET /api/documents/:docId- Get specific documentPATCH /api/documents/:docId- Update document titleDELETE /api/documents/:docId- Delete document
GET /api/documents/:docId/pages- Get document pagesPOST /api/documents/:docId/pages- Add new pagePUT /api/documents/:docId/pages/:pageIndex- Update page contentDELETE /api/documents/:docId/pages/:pageIndex- Delete page
POST /api/documents/:id/invite- Invite user to documentGET /api/search-docs- Search documents
POST /api/upload-image- Upload image file
update- Send content updatesadd-page- Add new page notification
update- Receive content updates from other usersadd-page- Receive new page notifications
- Bold, italic, underline
- Text color and background highlighting
- Font size and family options
- Text alignment
- Drag & drop image upload
- Image resizing with corner handles
- Image positioning and movement
- Image deletion and reset
- Add new pages (Ctrl+Enter)
- Delete pages
- Navigate between pages
- Page-specific undo/redo
- JWT-based authentication
- Password hashing with bcrypt
- Protected API routes
- File upload validation
- CORS configuration
- Input sanitization
- Set up PostgreSQL database
- Configure environment variables
- Run database migrations
- Deploy to your preferred platform (Heroku, AWS, etc.)
- Build the React app:
npm run build - Deploy the build folder to your hosting service
- Configure API endpoints for production
We welcome contributions from the community! Every contribution matters - whether it's fixing a typo, reporting a bug, or adding a major feature. We're building an open-source alternative to Google Docs, Notion, and other proprietary solutions.
For detailed contribution guidelines, development workflow, and coding standards, please see CONTRIBUTING.md.
- 🐛 Bug Reports - Found a bug? Open an issue!
- 🔧 Fix Existing Bugs - Fix bugs and create pull requests
- ✨ Feature Requests - Have an idea? Let us know!
- 🔧 Code Contributions - Fix bugs or add features
- 📚 Documentation - Improve docs and examples
- 🧪 Testing - Help us test and improve quality
- 💬 Community Support - Help others in discussions and issues
- 🌟 Star & Share - Star the repo and share with others
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all contributors who help make CollabSpace better
- Built with amazing open source technologies
- Inspired by the collaborative editing community
We're actively working to improve CollabSpace! Here are some known issues that need attention:
- Elasticsearch integration is optional and may need configuration
- Image uploads are stored locally (consider cloud storage for production)
- WebSocket connections may need reconnection logic for production
- Mobile responsiveness could be improved
- Error handling in some edge cases needs enhancement
Found a bug? Fix it and create a pull request! Even small fixes help us compete with Google Docs and other big players. Every contribution makes CollabSpace better! 🚀
We're always working on new features! Here's what's coming:
- Real-time cursor tracking
- User presence indicators
- Document version history
- Real-time comments and annotations
- Export to PDF/Word formats
- Mobile responsive design improvements
- Advanced search filters
- Document templates
- Dark mode support
- Plugin system for extensions
- Microservices architecture
- Redis for session management
- CDN for image storage
- Docker containerization
- Kubernetes deployment configs
- 📖 Documentation - Check the README and project documentation
- 🐛 Bug Reports - Open an issue in the repository
- 💬 Discussions - Use GitHub Issues for questions and discussions
- 💡 Feature Requests - Open an issue with the feature request
- Be respectful and inclusive
- Help others learn and grow
- Share knowledge and best practices
- Follow our Code of Conduct
If you find CollabSpace useful, please consider:
- ⭐ Starring the repository - helps us compete with Google Docs!
- 🍴 Forking and contributing - every contribution counts!
- 📢 Sharing with others - spread the word about open source alternatives
- 🐛 Reporting bugs and issues - help us improve quality
- 💡 Suggesting new features - help us build the best collaborative editor
- 💬 Joining discussions - share ideas and help others
- 🏆 Helping us compete - together we can build something better than proprietary solutions
CollabSpace - Where collaboration meets creativity! 🚀
Taking on Google Docs, Notion, and other giants with open source power!
Made with ❤️ by the open source community
Every contribution matters - help us build the future of collaborative editing! 🌟