The Task Manager Application is a feature-rich project designed to streamline task management for employees and administrators. Built with Spring Boot, this application allows seamless task assignment, status tracking, and communication between users via a nested comments system.
Purpose: Simplify task collaboration by providing a secure, efficient, and user-friendly backend.
- User Roles: Supports both
AdminandEmployeeroles. - Task Management:
- Add, update, delete, and search tasks.
- Assign tasks to employees.
- Nested Comments: Admins and employees can comment and reply to task-specific discussions.
- Role-Based Authentication: Ensures secure access to endpoints based on user roles.
- Current User Utility: Simplifies retrieval of the logged-in user's information.
- Backend: Spring Boot 3
- Database: MySQL
- Authentication: Spring Security
- Data Transfer: REST APIs
- Add Admin:
POST /admin/addAdmin- Request Body:
UserModel
- Get All Tasks:
GET /admin/allTask
- Add Task:
POST /admin/addTask- Request Body:
TaskDto
- Delete Task:
DELETE /admin/task/{id}- Path Variable:
id(Task ID)
- Get Task by ID:
GET /admin/task/{id}- Path Variable:
id(Task ID)
- Update Task:
PUT /admin/updateTask/{id}- Request Body:
TaskDto - Path Variable:
id(Task ID)
- Search Tasks:
GET /admin/searchTask?keywords={keywords}&id={id}- Query Params:
keywords(Optional),id(Optional)
- Get Tasks by Employee:
GET /admin/task/employee/{employeeId}- Path Variable:
employeeId(Employee ID)
- Get Admin’s Tasks:
GET /admin/adminTask
- Get All Tasks Assigned to Employee:
GET /employee/tasks
- Update Task:
PUT /employee/updateTask/{id}- Request Body:
TaskDto - Path Variable:
id(Task ID)
- Add Comment:
POST /comment/task/{taskId}- Request Body:
CommentDto - Path Variable:
taskId(Task ID)
- Get Comments for Task:
GET /comment/task/{taskId}- Path Variable:
taskId(Task ID)
- Add User:
POST /addUser- Request Body:
UserModel
- Login:
POST /login- Request Body:
UserModel
id: Unique task identifier.title: Title of the task.description: Details about the task.dueDate: Deadline for the task.priority: Task priority (HIGH,MEDIUM,LOW).taskStatus: Status of the task.user: Assigned user (Many-to-One relationship).
id: Unique comment identifier.content: The comment text.user: The user who made the comment.task: Associated task.parentComment: For nested replies (self-referencing Many-to-One relationship).
id: Unique user identifier.email: User’s email (used for login).password: Password (securely hashed).userRole: Role of the user (ADMIN,EMPLOYEE).
src/
├── main/
│ ├── java/
│ │ ├── com.example.TaskManager/
│ │ │ ├── Controller/ # REST API Controllers
│ │ │ ├── Enum/ # Enums (e.g., UserRole, TaskPriority)
│ │ │ ├── Models/ # Entity Classes (e.g., Task, Comment, UserModel)
│ │ │ ├── Repo/ # Repositories
│ │ │ ├── Services/ # Business Logic Services
│ │ │ ├── Utility/ # Helper Classes (e.g., CurrentUser)
├── resources/
│ ├── application.properties # Configuration
└── ...
- Clone the repository:
git clone <your-repo-url>
- Navigate to the project directory:
cd TaskManager - Configure your database in
application.properties. - Build and run the application:
mvn spring-boot:run
✨ Add email notifications for task updates.
✨ Integrate file attachments with comments.
✨ Create a frontend using Angular or React.
- Authentication:
- Uses Spring Security with role-based access.
- Admins and Employees have distinct permissions.
- Nested Comments:
- Supports replies to comments via
parentCommentin theCommentmodel.
- Supports replies to comments via
- Task Search:
- Supports search by keywords or task ID.
Feel free to fork this project, create new features, or optimize existing code! Submit a pull request, and let’s collaborate! 💻
This project is licensed under the MIT License.
Have questions or suggestions? Open an issue or contact me directly!
Thank you for checking out the Task Manager Project! 🌟