Skip to content

Nitheesh-Chinnusamy/sample-java-project

Repository files navigation

Bug Tracking System

Overview

This project is a Bug Tracking System built using Java (Spring Boot) and MySQL. It allows users to create, update, and track bug reports with role-based access control for Admins, Developers, and Testers.

Features

✅ User Authentication (Admin, Developer, Tester)
✅ Bug Submission & Status Updates (New, In Progress, Resolved)
✅ REST API for Bug Management
✅ MySQL Database Integration
✅ API Testing with Postman
✅ Code Quality Checks (Checkstyle & PMD)
✅ CI/CD Integration (Optional)

Tech Stack

  • Backend: Java, Spring Boot, Spring Data JPA
  • Database: MySQL
  • Testing: JUnit, Rest-Assured
  • Build Tool: Maven
  • Static Code Analysis: Checkstyle, PMD
  • Version Control: Git & GitHub

Project Structure

/bug-tracker
│── /src
│   ├── /main
│   │   ├── /java/com/bugtracker
│   │   │   ├── Application.java  (Main Spring Boot Class)
│   │   │   ├── Bug.java (Entity)
│   │   │   ├── BugRepository.java (JPA Repository)
│   │   │   ├── BugController.java (REST API)
│   │   │   ├── BugService.java (Service Layer)
│   │   ├── /resources
│   │       ├── application.properties
│   ├── /test
│   │   ├── /java/com/bugtracker
│   │   │   ├── BugTests.java  (JUnit Tests)
│── pom.xml  (Maven Configuration)
│── README.md
│── .gitignore

Setup & Installation

1️⃣ Clone the Repository

git clone https://github.com/yourusername/bug-tracker.git
cd bug-tracker

2️⃣ Configure the Database

Update src/main/resources/application.properties with your MySQL credentials:

spring.datasource.url=jdbc:mysql://localhost:3306/bug_tracker
spring.datasource.username=root
spring.datasource.password=yourpassword
spring.jpa.hibernate.ddl-auto=update

3️⃣ Build & Run the Project

mvn clean install
mvn spring-boot:run

The application will be available at: http://localhost:8080

4️⃣ Running Tests

Run unit tests using:

mvn test

5️⃣ Running Static Code Analysis

Run Checkstyle:

mvn checkstyle:check

Run PMD:

mvn pmd:check

6️⃣ Generate JAR File

To create a JAR file for deployment:

mvn package

API Endpoints

Method Endpoint Description
POST /bugs/create Create a new bug
GET /bugs/{id} Get bug details by ID
PUT /bugs/{id}/update Update bug status
GET /bugs Get all bugs

Contributing

If you’d like to contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature-name)
  3. Commit your changes (git commit -m 'Add feature')
  4. Push to GitHub (git push origin feature-name)
  5. Open a Pull Request

License

This project is licensed under the MIT License.


Happy Coding! 🚀

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages