A comprehensive task management application built with modern web technologies, featuring intelligent task assignment, real-time collaboration, and conflict resolution.
This task management system provides teams with powerful tools to organize, assign, and track tasks efficiently. The application includes smart assignment algorithms that automatically distribute workload fairly among team members, and robust conflict handling to manage concurrent edits in real-time collaborative environments.
- Smart Task Assignment: Automatically assigns tasks to the least busy team member
- Real-time Collaboration: Multiple users can work simultaneously with conflict resolution
- Intuitive Interface: Clean, responsive design for seamless user experience
- Comprehensive Task Management: Full CRUD operations with status tracking
- Team Management: Board-based organization with member management
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- Socket.io - Real-time communication
- JWT - Authentication
- bcrypt - Password hashing
- CORS - Cross-origin resource sharing
- dotenv - Environment variable management
- React.js - Frontend framework
- Zustand - State Management
- React Router - Client-side routing
- Axios - HTTP client
- Socket.io Client - Real-time updates
Before running this application, make sure you have the following installed:
- Node.js (v16 or higher)
- npm or yarn
- MongoDB (local installation or MongoDB Atlas)
- Git
git clone https://github.com/yourusername/task-management-system.git
cd task-management-system# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Create environment file
cp .env.example .envEdit the .env file in the backend directory:
# Server Configuration
PORT=8080
NODE_ENV=development
# Database
MONGODB_URI=mongodb://localhost:27017/<databasename>
# Or for MongoDB Atlas:
# MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/taskmanagement
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-here
JWT_EXPIRE=7d
# CORS Configuration
CLIENT_URL=http://localhost:3000
# Cloudinary Configuration
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_CLOUD_NAME=
FRONTEND_URL=https://realtime-collaborative-kanban-board.vercel.app
# Navigate to frontend directory (from root)
cd frontend
# Install dependencies
npm install
# Create environment file
cp .env.example .envEdit the .env file in the frontend directory:
# API Configuration
VITE_BACKEND_BASE_URL=http://localhost:5000
VITE_BACKEND_API_URL=http://localhost:5000/api
Terminal 1 - Backend:
cd backend
npm run devTerminal 2 - Frontend:
cd frontend
npm start- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- User registration and login
- JWT-based authentication
- Password hashing with bcrypt
- Protected routes and middleware
- Create, read, update, delete boards
- Board membership management
- Board-specific task organization
- Member permissions and roles
- Create tasks with detailed information
- Task status tracking (Todo, In Progress, Done)
- Task assignment to team members
- Task priority levels
- Task descriptions and comments
- Automatic task assignment based on workload
- Fair distribution algorithm
- Real-time workload calculation
- Override capability for manual assignment
- Live updates across all connected clients
- Real-time task status changes
- Instant notifications for task updates
- Collaborative editing with conflict resolution
- Mobile-friendly interface
- Adaptive layouts for all screen sizes
- Touch-friendly interactions
- Cross-browser compatibility
- Register/Login: Create an account or login with existing credentials
- Create a Board: Set up a new project board
- Invite Members: Add team members to your board
- Create Tasks: Add tasks with descriptions, priorities, and due dates
- Assign Tasks: Use smart assignment or manually assign tasks
- Track Progress: Monitor task status and team performance
- Click "Add Task" button
- Fill in task details:
- Title (required)
- Description
- Priority level
- Due date
- Labels/tags
- Choose assignment method:
- Smart Assign (recommended)
- Manual assignment
- Click "Create Task"
- Go to Board Settings
- Click "Manage Members"
- Add members by email or username
- Set member permissions
- Save changes
- When creating a task, select "Smart Assign"
- The system automatically assigns to the least busy member
- Assignment is based on active task count
- Manual override available if needed
The Smart Assignment feature automatically distributes tasks fairly among team members based on their current workload.
const getSmartAssignedUser = async (boardId) => {
// 1. Get all board members
const board = await Board.findById(boardId).populate('members');
// 2. Count active tasks for each member
const activeTaskCounts = await Task.aggregate([
{
$match: {
boardId: new mongoose.Types.ObjectId(boardId),
status: { $in: ["todo", "in-progress"] },
assignedTo: { $in: board.members.map(m => m._id) }
}
},
{
$group: {
_id: "$assignedTo",
count: { $sum: 1 }
}
}
]);
// 3. Create task count map (default 0 for all members)
const taskCountMap = new Map(
board.members.map(user => [user._id.toString(), 0])
);
// 4. Update map with actual counts
activeTaskCounts.forEach(({ _id, count }) => {
taskCountMap.set(_id.toString(), count);
});
// 5. Find member with fewest tasks
const leastBusy = [...taskCountMap.entries()]
.sort((a, b) => a[1] - b[1])[0];
return board.members.find(
user => user._id.toString() === leastBusy[0]
);
};- Fair Distribution: Considers only active tasks (todo, in-progress)
- Inclusive Counting: Members with zero tasks are included
- Efficient Querying: Uses MongoDB aggregation for performance
- Real-time Updates: Recalculates on every assignment request
- Workload Balance: Prevents task overload on individual members
- Automatic Efficiency: Reduces manual assignment overhead
- Team Productivity: Optimizes resource utilization
- Scalability: Works efficiently with large teams
🔗 Task Management System - Live Demo
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -m 'Add your feature' - Push to branch:
git push origin feature/your-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Socket.io connection may timeout on slow networks
- Large file uploads not yet supported
- Mobile notifications require additional setup
- File attachment support
- Advanced filtering and search
- Email notifications
- Mobile app development
- Third-party integrations (Slack, GitHub)
- Advanced analytics dashboard
- Custom workflow automation
Made with ❤️ by Yash
