Full-Stack Application with Microservices Architecture
A modern, production-ready task management platform built with NestJS microservices, React, and real-time notifications. Features comprehensive task management, user collaboration, and live updates through WebSocket connections.
- Complete Task Management - Create, edit, assign, and track tasks with priorities and deadlines
- Real-time Collaboration - Live notifications for task updates, assignments, and comments
- User Authentication - Secure JWT-based authentication with refresh token rotation
- Rich Dashboard - Analytics and metrics with interactive charts showing task activity
- Comment System - Team collaboration through task-specific discussions
- Audit Trail - Complete history tracking for all task changes
- WebSocket Notifications - Instant updates when tasks are created, updated, or assigned
- Smart Targeting - Notifications sent only to relevant users (assignees, creators)
- Toast Notifications - Non-intrusive UI feedback for all actions
- Live Dashboard - Real-time metrics and activity charts
- Professional Design - Built with shadcn/ui and Tailwind CSS
- Responsive Layout - Optimized for desktop and mobile devices
- Interactive Components - Advanced data tables with sorting, filtering, and pagination
- Accessible Design - ARIA compliant with keyboard navigation support
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β β β β
β Frontend β β API Gateway β β Auth Service β
β (React + βββββΊβ (NestJS) βββββΊβ (NestJS) β
β TanStack) β β Port: 3001 β β Port: 3002 β
β Port: 3000 β β β β TCP Service β
β β β β β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
β HTTP Routing
βΌ
βββββββββββββββββββ βββββββββββββββββββ
β β β β
β Tasks Service β β Notifications β
β (NestJS) βββββΊβ Service β
β Port: 3003 β β (NestJS) β
β TCP Service β β Port: 3004 β
β β β WebSocket β
βββββββββββββββββββ βββββββββββββββββββ
β β
β β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β β β β
β PostgreSQL β β RabbitMQ β β Rate Limiting β
β Database β β Message Brokerβ β (10 req/sec) β
β Port: 5432 β β Port: 5672 β β Throttler β
β UUID Support β β Management UI β β β
β β β Port: 15672 β β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Synchronous Communication - HTTP/TCP for user-facing operations requiring immediate responses
- Asynchronous Communication - RabbitMQ for background events and real-time notifications
- WebSocket Connections - Real-time bidirectional communication for live updates
- NestJS - Progressive Node.js framework with TypeScript
- PostgreSQL - Robust relational database with UUID support
- RabbitMQ - Message broker for event-driven architecture
- TypeORM - Database ORM with migration support
- Passport JWT - Authentication strategy with token management
- Socket.IO - Real-time WebSocket communication
- React 19 - Modern UI library with hooks
- TanStack Router - Type-safe routing solution
- shadcn/ui - High-quality component library
- Tailwind CSS - Utility-first CSS framework
- TanStack Query - Server state management
- React Hook Form + Zod - Form handling with validation
- Sonner - Toast notification system
- Docker Compose - Container orchestration
- Turborepo - Monorepo build system
- TypeScript - End-to-end type safety
- Swagger/OpenAPI - API documentation
- Node.js 20+ with pnpm
- Docker and Docker Compose
- Git
-
Clone the repository
git clone https://github.com/your-username/collaborative-task-management.git cd collaborative-task-management -
Install dependencies
pnpm install
-
Start infrastructure services
docker-compose up -d
-
Set up environment variables
# Copy example environment files cp apps/auth-service/.env.example apps/auth-service/.env cp apps/tasks-service/.env.example apps/tasks-service/.env cp apps/notifications-service/.env.example apps/notifications-service/.env cp apps/api-gateway/.env.example apps/api-gateway/.env cp apps/web/.env.example apps/web/.env -
Start all services
pnpm dev
- Frontend Application: http://localhost:3000
- API Gateway: http://localhost:3001
- Swagger Documentation: http://localhost:3001/api/docs
- RabbitMQ Management: http://localhost:15672 (guest/guest)
POST /api/auth/register # User registration
POST /api/auth/login # User login
POST /api/auth/refresh # Token refresh
POST /api/auth/logout # User logout
GET /api/auth/me # Current user infoPOST /api/tasks # Create task
GET /api/tasks?page=1&limit=10 # List tasks with pagination
GET /api/tasks/:id # Get task by ID
PUT /api/tasks/:id # Update task
DELETE /api/tasks/:id # Delete task
POST /api/tasks/:id/assign # Assign users to task
GET /api/tasks/:id/history # Task change historyPOST /api/tasks/:taskId/comments # Create comment
GET /api/tasks/:taskId/comments?page=1&limit=10 # List commentsGET /api/notifications?page=1&limit=10 # List notifications
PUT /api/notifications/:id/read # Mark as read
PUT /api/notifications/read-all # Mark all as readWebSocket Connection: ws://localhost:3004
const socket = io("http://localhost:3004");
socket.emit("authenticate", {
userId: "user-uuid",
token: "jwt-access-token",
});
socket.on("notification", (notification) => {
// Handle real-time notification
});βββ apps/
β βββ api-gateway/ # HTTP gateway and routing
β βββ auth-service/ # Authentication microservice
β βββ tasks-service/ # Task management microservice
β βββ notifications-service/ # Real-time notifications
β βββ web/ # React frontend application
βββ packages/
β βββ types/ # Shared TypeScript types
β βββ utils/ # Common utilities
β βββ exceptions/ # Shared exception classes
β βββ tsconfig/ # TypeScript configurations
β βββ eslint-config/ # ESLint rules
βββ docker-compose.yml # Infrastructure services
# Development
pnpm dev # Start all services in development mode
pnpm build # Build all packages and applications
pnpm lint # Run ESLint across all workspaces
pnpm test # Run tests in all packages
pnpm type-check # TypeScript type checking
pnpm clean # Clean build artifacts
# Individual services
cd apps/auth-service && pnpm start:dev # Auth service only
cd apps/tasks-service && pnpm start:dev # Tasks service only
cd apps/notifications-service && pnpm start:dev # Notifications only
cd apps/web && pnpm dev # Frontend only- Separation of Concerns - Each service handles a specific domain
- Independent Scaling - Services can be scaled based on demand
- Technology Flexibility - Different services can use different technologies
- Fault Isolation - Failures in one service don't affect others
- HTTP/TCP for Synchronous - Immediate responses for user actions
- RabbitMQ for Events - Asynchronous processing for background tasks
- WebSocket for Real-time - Live updates without polling
- JWT Authentication - Stateless authentication with refresh tokens
- Rate Limiting - Protection against abuse (10 req/sec)
- UUID Primary Keys - Enhanced security and privacy
- Input Validation - Comprehensive validation with class-validator
- Environment Variables - All secrets managed through environment configuration
- Database Migrations - Automated schema updates with TypeORM
- Health Checks - Built-in health monitoring for all services
- Logging - Structured logging for observability
- Error Handling - Comprehensive error management with proper HTTP status codes
# Production build
docker-compose -f docker-compose.prod.yml up -d
# Scale specific services
docker-compose -f docker-compose.prod.yml up -d --scale tasks-service=3- Real-time Metrics - Live task completion rates and team productivity
- Interactive Charts - Task activity over time with filtering options
- Key Performance Indicators - Total tasks, completion rates, overdue alerts
- Rich Editor - Full-featured task creation with priorities and deadlines
- Assignment System - Multi-user task assignment with notifications
- Status Tracking - Visual progress indicators and status updates
- History Audit - Complete audit trail for all changes
- Real-time Comments - Team discussions on individual tasks
- Live Notifications - Instant updates for all team members
- User Management - Team member profiles and permissions
This project demonstrates modern full-stack development practices including:
- Microservices Architecture with proper service boundaries
- Event-Driven Design using message queues
- Real-time Communication with WebSocket
- Type Safety across the entire stack
- Modern React Patterns with hooks and context
- Professional UI/UX with component libraries
- Comprehensive Testing strategies
- Production-Ready deployment configuration
This project is open source and available under the MIT License.
Built with β€οΈ using modern technologies and best practices for scalable web applications.