Skip to content

amaramarkumar/defect-management-tool

Repository files navigation

Defect Management Platform

A production-grade defect management platform similar to JIRA, built with microservices architecture.

Technology Stack

Backend

  • Java 21
  • Spring Boot 3.x
  • Spring Cloud
  • MySQL 8.x
  • Flyway
  • Spring Security
  • JWT Authentication
  • Docker
  • Docker Compose

Frontend

  • React 19+
  • TypeScript
  • Vite
  • Material UI
  • Redux Toolkit
  • TanStack Query
  • Axios

Architecture

The platform consists of the following microservices:

  1. API Gateway - Routes requests, handles authentication, rate limiting
  2. Authentication Service - Manages user authentication, registration, JWT tokens
  3. User Service - Manages user profiles and preferences
  4. Project Service - Manages projects and project membership
  5. Issue Service - Manages issues (bugs, tasks, stories, epics)
  6. Notification Service - Handles email and in-app notifications

Getting Started

Prerequisites

  • Docker and Docker Compose
  • Java 21 (for local development)
  • Node.js 18+ (for frontend development)

Running with Docker Compose

  1. Clone the repository
  2. Navigate to the project root
  3. Run: docker-compose up --build

The services will be available at:

Running Individually (for development)

Each service is a Spring Boot application and can be run with:

./mvnw spring-boot:run

The frontend can be run with:

npm run dev

User Interface Steps

1. Authentication

  • Login Page: Access via http://localhost (or http://localhost/login)

    • Enter username/email and password
    • Click "Login" button
    • On success, redirects to dashboard
    • On failure, shows error message
  • Register Page: Access via http://localhost/register

    • Fill in registration form (username, email, password, first name, last name)
    • Click "Register" button
    • On success, redirects to login page
    • On failure, shows validation errors

2. Dashboard

  • Access via http://localhost/dashboard
  • Shows overview widgets:
    • Total projects count
    • Total issues count (by status)
    • Recent activity
    • Quick navigation to projects and issues

3. Projects Management

  • Access via http://localhost/projects
  • View Projects: List of all projects with pagination
  • Create Project: Click "New Project" button
    • Fill project form (key, name, description)
    • Click "Create" button
  • Edit Project: Click edit icon on project row
    • Modify project details
    • Click "Update" button
  • Delete Project: Click delete icon on project row
    • Confirm deletion in modal dialog
  • Project Details: Click on project name
    • Shows project overview and member list
    • Manage project members (add/remove users)

4. Issues Management

  • Access via http://localhost/issues
  • View Issues: List of all issues with filtering and pagination
    • Filter by project, status, priority, assignee
    • Search by key or summary
  • Kanban Board: Switch to board view for visual workflow management
    • Drag and drop issues between status columns (TODO, IN_PROGRESS, IN_REVIEW, DONE)
  • Create Issue: Click "New Issue" button
    • Fill issue form (project, summary, description, type, priority, assignee)
    • Click "Create" button
  • Edit Issue: Click on issue key or edit icon
    • Modify issue details
    • Click "Update" button
  • Issue Detail: Click on issue key in list or board
    • View full issue details
    • Add comments
    • Upload attachments
    • View activity history
    • Change status via workflow transitions

5. Profile Management

  • Access via http://localhost/profile (via user dropdown in header)
  • View and edit profile information
  • Change password
  • Manage notification preferences

6. Admin Panel

  • Access via http://localhost/admin (requires ADMIN role)
  • User management:
    • List all users
    • Create/edit/delete users
    • Assign roles to users
  • System monitoring:
    • View service health status
    • Check API response times
    • Monitor error rates

API Details

API Gateway (Port 8080)

  • Entry point for all client requests
  • Routes to appropriate microservices based on path
  • Handles JWT authentication and authorization
  • Implements rate limiting and request logging

Authentication Service (Port 8081)

Base URL: http://localhost:8081/api/auth

Method Endpoint Description Request Body Response
POST /login Authenticate user and generate JWT tokens { "usernameOrEmail": "string", "password": "string" } { "accessToken": "string", "refreshToken": "string", "expiresIn": "int" }
POST /register Register new user { "username": "string", "email": "string", "password": "string", "firstName": "string", "lastName": "string" } "User registered successfully"
POST /refresh Refresh access token using refresh token N/A (query param: refreshToken) { "accessToken": "string", "refreshToken": "string", "expiresIn": "int" }

User Service (Port 8082)

Base URL: http://localhost:8082/api/users

Method Endpoint Description Request Body Response
POST / Create new user UserDTO UserDTO
GET /{id} Get user by ID N/A UserDTO
GET /username/{username} Get user by username N/A UserDTO
GET /email/{email} Get user by email N/A UserDTO
GET / Get all users (paginated) Query: page (int), size (int) List<UserDTO>
PUT /{id} Update user UserDTO UserDTO
DELETE /{id} Delete user N/A 204 No Content
GET /exists/username/{username} Check if username exists N/A boolean
GET /exists/email/{email} Check if email exists N/A boolean

Project Service (Port 8083)

Base URL: http://localhost:8083/api/projects

Method Endpoint Description Request Body Response
POST / Create new project ProjectDTO ProjectDTO
GET /{id} Get project by ID N/A ProjectDTO
GET /key/{key} Get project by key N/A ProjectDTO
GET / Get all projects (paginated) Query: page (int), size (int) List<ProjectDTO>
PUT /{id} Update project ProjectDTO ProjectDTO
DELETE /{id} Delete project N/A 204 No Content
POST /{projectId}/members Add member to project ProjectMemberDTO ProjectMemberDTO
DELETE /{projectId}/members/{userId} Remove member from project N/A 204 No Content
GET /{projectId}/members Get all members of project N/A List<ProjectMemberDTO>
GET /user/{userId}/projects Get projects for user N/A List<ProjectMemberDTO>

Issue Service (Port 8084)

Base URL: http://localhost:8084/api/issues

Method Endpoint Description Request Body Response
POST / Create new issue IssueDTO IssueDTO
GET /{id} Get issue by ID N/A IssueDTO
GET /{key}/project/{projectId} Get issue by key and project ID N/A IssueDTO
GET / Get all issues (paginated) Query: page (int), size (int) List<IssueDTO>
GET /project/{projectId} Get issues by project ID N/A List<IssueDTO>
GET /assignee/{assigneeId} Get issues by assignee ID N/A List<IssueDTO>
GET /reporter/{reporterId} Get issues by reporter ID N/A List<IssueDTO>
PUT /{id} Update issue IssueDTO IssueDTO
DELETE /{id} Delete issue N/A 204 No Content
POST /{issueId}/comments Add comment to issue CommentDTO CommentDTO
GET /{issueId}/comments Get comments for issue N/A List<CommentDTO>

Notification Service (Port 8085)

Base URL: http://localhost:8085/api/notifications

Method Endpoint Description Request Body Response
GET / Get notifications for current user (paginated) Query: page (int), size (int), unreadOnly (boolean) List<NotificationDTO>
PUT /{id}/read Mark notification as read N/A NotificationDTO
PUT /read-all Mark all notifications as read N/A 200 OK
DELETE /{id} Delete notification N/A 204 No Content
DELETE / Delete all notifications N/A 204 No Content

Database

The platform uses MySQL 8.0. The database schema is managed by Flyway migrations located in each service's src/main/resources/db/migration directory.

Each service has its own database schema:

  • auth-service: users, roles, user_roles tables
  • user-service: user_profiles table (extends auth users)
  • project-service: projects, project_members tables
  • issue-service: issue_types, issues, labels, issue_labels, issue_comments, issue_attachments, workflows, workflow_transitions tables
  • notification-service: notifications table

API Documentation

Once the services are running, you can access the Swagger UI for each service at:

Testing

To run tests for a service:

./mvnw test

To run frontend tests:

npm test

CI/CD

The platform includes a GitHub Actions workflow for continuous integration and deployment. The workflow runs on every push to the main branch and includes:

  • Building the Docker images
  • Running unit and integration tests
  • Performing static code analysis
  • Pushing Docker images to a registry
  • Deploying to a staging environment

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors