A real-time, block-based collaborative document editing system built with NestJS and WebSockets. Think of it as a developer-friendly, extensible take on modern documentation platforms.
- Real-Time Collaboration: Seamlessly edit documents with others in real-time, powered by Socket.io.
- Block-Based Architecture: Dynamic document structure using customizable content blocks.
- Workspaces & Teams: Organize documents into workspaces and manage member permissions.
- Full-Text Search: Quickly find documents across your workspaces with integrated search logic.
- Secure Authentication: Robust user authentication system with JWT access and refresh tokens.
- Docker-First: Fully containerized development environment for easy setup and scaling.
- Backend: NestJS (TypeScript)
- Database: PostgreSQL
- ORM: TypeORM
- Real-Time: Socket.io
- Auth: Passport.js & JWT
- DevOps: Docker & Docker Compose
- Node.js (v18+)
- Docker & Docker Compose
-
Clone the repository
git clone https://github.com/Protik111/collaborative-document-system.git cd collaborative-document-system -
Environment Configuration Create a
.envfile in the root directory (refer to.env.exampleif available). -
Launch with Docker The easiest way to get started is using Docker Compose:
docker compose up --build
This will spin up the NestJS application, PostgreSQL database, and any other required services.
-
Local Development (Optional) If you prefer running the app locally:
npm install npm run start:dev
The project maintains high test coverage with Jest.
# Unit tests
npm run test
# End-to-end tests
npm run test:e2e
# Test coverage
npm run test:covsrc/
├── auth/ # Authentication & Security
├── document/ # Document & Block management
├── workspace/ # Workspace organization
├── workspace-member/ # Permission & Membership handling
├── user/ # User profiles & management
├── config/ # System & Provider configurations
└── shared/ # Common utilities & patterns