Production-grade REST API for AI-powered bug tracking.
Built with Java · Spring Boot · MySQL · JWT · Spring Security 7 · OpenAI API
🔗 Frontend Repo: bugtracker-ai-frontend
🌐 Live App: bugtracker
- JWT-based stateless authentication
- Spring Security 7 with role-based authorization (Admin, Developer, Tester)
- CORS configured inside Spring Security filter chain
- Password encryption with BCrypt
- Auto-suggest bug severity from plain language descriptions via OpenAI API
- Semantic duplicate detection — compares new bug against existing ones
- Reproduction step generation — developer-ready steps from bug description
- Controller → Service → Repository layered architecture
- DTO pattern for clean request/response separation
- @Transactional on service layer to prevent lazy loading issues
- Pagination & filtering on all list endpoints (50 records/load)
- Activity logging for full audit trail
| Technology | Purpose |
|---|---|
| Java 17 | Core language |
| Spring Boot 3 | Application framework |
| Spring Security 7 | Auth + RBAC |
| JWT | Stateless authentication |
| MySQL 8 | Relational database |
| Spring Data JPA | ORM / data access |
| OpenAI API | AI triage features |
| Maven | Build tool |
| Render | Deployment |
backend/
└── src/main/java/com/bugtracker/
├── controller/
│ ├── AuthController.java
│ ├── BugController.java
│ ├── ProjectController.java
│ ├── UserController.java
│ └── AIController.java
├── service/
│ ├── BugService.java
│ ├── ProjectService.java
│ ├── UserService.java
│ └── AITriageService.java
├── repository/
│ ├── BugRepository.java
│ ├── ProjectRepository.java
│ └── UserRepository.java
├── dto/
│ ├── BugRequestDTO.java
│ ├── BugResponseDTO.java
│ └── AuthRequestDTO.java
├── model/
│ ├── Bug.java
│ ├── Project.java
│ └── User.java
└── security/
├── JwtFilter.java
├── JwtUtil.java
└── SecurityConfig.java
POST /api/auth/login → Login, returns JWT token
GET /api/bugs?page=0&size=10 → Paginated bug list (with filters)
GET /api/bugs/{id} → Get bug by ID
POST /api/bugs → Report new bug
PUT /api/bugs/{id}/status → Update bug status
DELETE /api/bugs/{id} → Delete bug (Admin only)
GET /api/projects → List all projects
POST /api/projects → Create project (Admin only)
GET /api/projects/{id}/bugs → Get bugs for a project
GET /api/users → List all users (Admin only)
POST /api/users → Create user (Admin only)
PUT /api/users/{id}/status → Activate/deactivate user
POST /api/ai/suggest-priority → AI severity suggestion
POST /api/ai/check-duplicate → AI duplicate detection
POST /api/ai/generate-steps → AI reproduction steps
- Java 17+
- MySQL 8+
- Maven 3.8+
- OpenAI API key
git clone https://github.com/vikash1311/bugtracker-ai
cd bugtracker-backendcp src/main/resources/application.example.properties src/main/resources/application.properties# Database
spring.datasource.url=jdbc:mysql://localhost:3306/bugtracker
spring.datasource.username=your_mysql_username
spring.datasource.password=your_mysql_password
# JPA
spring.jpa.hibernate.ddl-auto=update
# JWT
jwt.secret=your_jwt_secret_key
jwt.expiration=86400000
# OpenAI
openai.api.key=your_openai_api_keyCREATE DATABASE bugtracker;
-- Tables auto-created by Spring JPA on first runmvn spring-boot:runAPI runs at http://localhost:8080
| Endpoint | Admin | Developer | Tester |
|---|---|---|---|
| View all bugs | ✅ | ✅ | ✅ |
| Report bug | ✅ | ✅ | ✅ |
| Update bug status | ✅ | ✅ | ❌ |
| Delete bug | ✅ | ❌ | ❌ |
| Manage users | ✅ | ❌ | ❌ |
| Create project | ✅ | ❌ | ❌ |
| AI triage | ✅ | ✅ | ✅ |
- 🎨 Frontend Repo: bugtracker-ai-frontend
- 🌐 Live App: bugtracker
- 👤 Portfolio: VG
Vikash Gautam — Full Stack Developer
📧 gautam7.ven@gmail.com
🔗 LinkedIn · Portfolio · GitHub
MIT License