A full-stack web application designed to manage agents and distribute tasks efficiently using automated assignment logic. The system enables administrators to manage agents, upload task files, and monitor workflow, while agents can securely access only their assigned tasks through a role-based dashboard.
Agents & Tasks Manager is built using the MERN stack and focuses on solving task allocation and monitoring problems in team-based environments. The application allows administrators to upload tasks in bulk through CSV or Excel files and automatically distributes them among active agents using a balanced distribution algorithm.
The system ensures secure authentication, clean separation between admin and agent roles, and controlled access to data through protected APIs.
- Admin login with role-based authentication
- Create and manage agents
- Activate or deactivate agents
- Create and manage additional admins (Super Admin protected)
- Upload CSV/XLSX files containing tasks
- Automatic equal task distribution
- Automatic task reassignment when an agent is deactivated
- View all agents and assigned tasks
- Delete individual tasks or all tasks
- Secure admin-only operations
- Secure agent login
- Personal dashboard access
- View only assigned tasks
- View personal profile details
- Protected API access
- React.js
- CSS3 (Custom UI Styling)
- Axios
- React Router
- Node.js
- Express.js
- JWT Authentication
- bcrypt.js
- MongoDB
- Mongoose ODM
AgentsAndTask-Manager/
│
├── backend/
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── services/
│ ├── utils/
│ └── server.js
│
├── frontend/
│ ├── components/
│ ├── pages/
│ ├── layout/
│ ├── api/
│ └── App.jsx
│
└── README.md
git clone https://github.com/Vivek-DK/AgentsAndTaskManagement.git
cd AgentsAndTaskManagement-masterCreate a .env file inside the backend folder.
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_keycd backend
npm install
npm run devServer runs on: http://localhost:5000
cd frontend/src
npm install
npm run devFrontend runs on: http://localhost:5173
Default Super Admin Credentials
Email: superadmin@gmail.com
Password: Admin@123
Admin can:
Create agents
Upload tasks
Manage admins
Monitor task distribution
Agents can login using credentials created by admin and can access only their own dashboard.
Tasks are distributed using a balanced round-robin algorithm:
- Tasks divided equally among active agents
- Remaining tasks assigned sequentially
- When an agent is deactivated:
- Remaining tasks automatically redistributed
- Task history preserved
Example:
25 Tasks + 5 Agents → Each agent gets 5 tasks
- JWT-based authentication
- Role-based authorization
- Protected API routes
- Admin-only operations secured
- Agents cannot access other agents’ data
- Super Admin deletion restricted
-
CSV / XLSX must contain headers:
-
FirstName, Phone, Notes
Example:
John,9876543210,Follow up with customer Mary,9876543211,Schedule product demo
Authentication
POST /api/auth/login — Admin or Agent login
Agents
GET /api/agents — Get all active agents
POST /api/agents — Create agent (Admin only)
DELETE /api/agents/:id — Deactivate agent (Admin only)
Tasks
GET /api/tasks/my-tasks — Agent tasks
GET /api/upload/tasks — All tasks (Admin)
DELETE /api/tasks/:id — Delete single task
DELETE /api/tasks — Delete all tasks
Upload
POST /api/upload — Upload CSV/XLSX and distribute tasks
📺 Google Drive Link: https://drive.google.com/file/d/1Vj7SL-jjCAc_QgIKhqjdwApAeIZMCTAk/view?usp=sharing
Notifications system
Task status tracking
Analytics dashboard
Agent performance metrics
Pagination for large datasets
- Vivek DK Full Stack Developer React • Node.js • MongoDB
⭐ If you found this project useful, consider giving it a star.


