A scalable task management system built with NestJS, featuring real-time updates via WebSockets, Couchbase for data storage, and Redis for WebSocket scaling.
- ✨ Create, read, update and delete tasks
- 🔄 Real-time updates using WebSockets
- 🔍 Search functionality
- ⚡ Horizontally scalable architecture
Before you begin, ensure you have installed:
- Docker and Docker Compose
- Node.js (v16 or later)
- Yarn package manager
- Clone the repository:
git clone https://github.com/yourusername/task-management-system.git
cd task-management-system- install dependencies:
yarn install- Create environment file:
cp .env.example .env- Start infrastructure and initialize services:
yarn infra:start- Run the application
yarn start:devThe API will be available at:
REST API: http://localhost:8080/
Swagger Docs: http://localhost:8080/api/docs
WebSocket: ws://localhost:8080/socket.io/?EIO=4&transport=websocket
# Start development server
yarn start:dev
# Run tests
yarn test
# View logs
yarn docker:logs
# Stop services
yarn docker:stopTasks
GET /tasks- List all tasks (with pagination)POST /tasks- Create a new taskGET /tasks/:id- Get task detailsPATCH /tasks/:id- Update a taskDELETE /tasks/:id- Delete a task
-
Connect to WebSocket:
- Create new WebSocket Request
- URL: ws://localhost:3000/socket.io/?EIO=4&transport=websocket
- Click "Connect"
-
Listen for Events: Click on the events tab and add the following events below and then toggle the "
Listen" button beside each event:TASK_CREATED: When a new task is createdTASK_UPDATED: When a task is modifiedTASK_DELETED: When a task is removed
-
Testing Flow:
- Keep WebSocket connection open
- Make REST API calls (create/update/delete tasks)
- Watch real-time updates in the WebSocket Messages panel
src/
├── modules/
│ ├── tasks/ # Task management
│ ├── database/ # Database services
│ └── redis/ # Redis services
├── common/ # Shared utilities
└── config/ # Configuration files
└── main.ts # Application entry point

