Skip to content

About

Task Master is a secure Spring Boot REST API for managing users, teams, projects, tasks, and comments. It features JWT authentication, role-based authorization (Admin, Manager, Employee), Spring Security, Hibernate, MySQL, soft deletes, validation, and business rule enforcement using a layered architecture.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Task Master

A production-style Task Management System built using Spring Boot, Spring Security, JWT Authentication, and MySQL.

The application enables organizations to manage employees, projects, teams, tasks, and collaboration through comments while enforcing secure role-based access control.


πŸ“Œ Features

πŸ‘€ User Management

  • Create Employee (Admin Only)
  • Update Employee Details
  • Get User by ID
  • Get All Users
  • Soft Delete User
  • BCrypt Password Encryption
  • User Status (ACTIVE / INACTIVE)

πŸ” Authentication & Authorization

  • JWT Authentication
  • Stateless Security
  • Spring Security Integration
  • BCrypt Password Hashing
  • Login API
  • Role Based Authorization

Supported Roles

  • ADMIN
  • MANAGER
  • EMPLOYEE

πŸ“ Project Management

  • Create Project
  • Update Project
  • View Project
  • View All Projects
  • Soft Delete Project

Features

  • Duplicate Project Name Validation
  • Project Status Management
  • Created By / Updated By Tracking

πŸ‘₯ Team Management

  • Create Team
  • Update Team
  • Delete Team (Soft Delete)
  • Change Team Manager
  • Add Member
  • Remove Member
  • Add Project to Team
  • Remove Project from Team
  • View Team
  • View All Teams

Business Rules

  • One Manager can manage only one Team
  • One Employee can belong to only one Team
  • Manager automatically becomes Team Member
  • Team can work on multiple Projects
  • Project can contain multiple Teams

βœ… Task Management

  • Create Task
  • Update Task
  • Delete Task
  • Change Task Status
  • View Task
  • View All Tasks

Search APIs

  • Get Tasks by Project
  • Get Tasks by Team
  • Get Tasks by Assigned User

Business Rules

  • Task can only be assigned to Team Members
  • Team must belong to selected Project
  • Due Date validation
  • Active User validation

Task Status Workflow

OPEN
   ↓
IN_PROGRESS
   ↓
TESTING
   ↓
COMPLETED

Rollback Supported

TESTING
   ↓
IN_PROGRESS

Task can also be marked as

CANCELLED

πŸ’¬ Comment Management

  • Create Comment
  • Update Comment
  • Delete Comment
  • Get Comment by ID
  • Get Comments by Task

πŸ” Role Based Access

Feature ADMIN MANAGER EMPLOYEE
Create Employee βœ… ❌ ❌
Create Project βœ… ❌ ❌
Update Project βœ… ❌ ❌
Delete Project βœ… ❌ ❌
Create Team βœ… ❌ ❌
Update Team βœ… ❌ ❌
Delete Team βœ… ❌ ❌
Change Manager βœ… ❌ ❌
Add/Remove Project βœ… ❌ ❌
Add/Remove Member βœ… βœ… ❌
Create Task βœ… βœ… ❌
Update Task βœ… βœ… ❌
Change Task Status βœ… βœ… βœ…
Create Comment βœ… βœ… βœ…

πŸ—οΈ Architecture

                Controller
                     β”‚
                     β–Ό
                 Service Layer
                     β”‚
                     β–Ό
              Repository Layer
                     β”‚
                     β–Ό
                 MySQL Database

The project follows a layered architecture separating business logic from controllers and persistence.


πŸ“¦ Technologies Used

Backend

  • Java 21
  • Spring Boot
  • Spring Security
  • Spring Data JPA
  • Hibernate

Authentication

  • JWT
  • BCrypt Password Encoder

Database

  • MySQL

Build Tool

  • Maven

Validation

  • Jakarta Bean Validation

Logging

  • SLF4J

πŸ“‚ Project Structure

src
 β”œβ”€β”€ controller
 β”œβ”€β”€ service
 β”‚      └── impl
 β”œβ”€β”€ repository
 β”œβ”€β”€ entity
 β”œβ”€β”€ dto
 β”œβ”€β”€ security
 β”œβ”€β”€ config
 β”œβ”€β”€ exception
 └── enums

πŸ”’ Security Flow

Login Request

        β”‚

        β–Ό

AuthenticationManager

        β”‚

        β–Ό

CustomUserDetailsService

        β”‚

        β–Ό

BCrypt Password Verification

        β”‚

        β–Ό

JWT Generation

        β”‚

        β–Ό

JWT Returned to Client

Every protected request passes through

JWT Authentication Filter

↓

Token Validation

↓

Security Context

↓

Protected Controller

πŸ“Š Entity Relationships

User
 β”‚
 β”‚ Many-To-One
 β–Ό
Team

Team
 β”‚
 β”‚ Many-To-Many
 β–Ό
Project

Team
 β”‚
 β”‚ One-To-Many
 β–Ό
Task

Task
 β”‚
 β”‚ One-To-Many
 β–Ό
Comment

βš™οΈ Business Rules Implemented

  • Duplicate Team Name Validation
  • Duplicate Project Name Validation
  • Team must belong to Project before Task Creation
  • Manager must have MANAGER Role
  • One Manager can manage only one Team
  • One User can belong to only one Team
  • Only Active Users can be assigned Tasks
  • Only Active Users can Comment
  • Soft Delete for Users, Teams, Projects and Tasks
  • Task Status Transition Validation
  • Due Date Validation
  • Global Exception Handling

πŸ“Œ API Modules

  • Authentication API
  • User API
  • Project API
  • Team API
  • Task API
  • Comment API

πŸ“ˆ Future Enhancements

  • Refresh Token Support
  • Swagger / OpenAPI Documentation
  • Docker Support
  • Pagination & Sorting
  • Search & Filtering APIs
  • Email Notifications
  • File Attachments
  • Unit & Integration Tests
  • Activity Timeline
  • Dashboard & Analytics

πŸš€ Getting Started

Clone Repository

git clone https://github.com/<your-github-username>/task-master.git

Configure Database

Update

application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/task_master

spring.datasource.username=root

spring.datasource.password=your_password

JWT Configuration

jwt.secret=your-super-secret-key

jwt.expiration=86400000

Run Application

mvn spring-boot:run

Application starts on

http://localhost:8080

About

Task Master is a secure Spring Boot REST API for managing users, teams, projects, tasks, and comments. It features JWT authentication, role-based authorization (Admin, Manager, Employee), Spring Security, Hibernate, MySQL, soft deletes, validation, and business rule enforcement using a layered architecture.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages