A robust, production-ready REST API for technical support ticket management, built with modern Java 21, Spring Boot 3.4, and MySQL.
- Full CRUD Operations: Create, list, search by ID or status, update, and delete support tickets (
chamados). - Automated Lifecycle Management: Closing dates (
dataFechamento) are automatically populated upon ticket closure and cleared upon reopening. - Data Validation: Bean Validation constraints (
@NotBlank,@Size) ensuring data integrity at the API boundary. - Exception Handling: Standardized error handling returning clean HTTP status codes (e.g.,
404 Not Foundfor missing resources). - Interactive API Documentation: Swagger UI integrated via
springdoc-openapi(/swagger-ui.html). - Responsive Web Frontend: Clean static dashboard (
index.html) serving as a client interface. - Containerized Environment: Fully containerized with Docker and Docker Compose including health checks and persistent storage.
- Automated Testing: Comprehensive unit tests with JUnit 5 and Mockito verifying service business logic.
- Core & Language: Java 21 (LTS), Spring Boot 3.4.5
- Persistence: Spring Data JPA, Hibernate, MySQL 8.0
- Validation & Docs: Jakarta Bean Validation, Springdoc OpenAPI 2.8.5 (Swagger UI)
- Build Tool: Apache Maven
- Testing: JUnit 5, Mockito
- Containerization: Docker, Docker Compose
HelpDesk Pro follows a classic, clean layered architecture:
- Controller Layer (
controller): Exposes REST endpoints, handling HTTP requests and responses. - Service Layer (
service): Encapsulates core business logic and transactional boundaries (@Transactional). - Repository Layer (
repository): Spring Data JPA interfaces communicating with the relational database.
helpdesk-pro/
├── src/
│ ├── main/
│ │ ├── java/com/example/helpdesk/
│ │ │ ├── controller/ # REST Controllers (ChamadoController)
│ │ │ ├── exception/ # Global & Custom Exceptions (RecursoNaoEncontradoException)
│ │ │ ├── model/ # JPA Entities & Enums (Chamado, StatusChamado)
│ │ │ ├── repository/ # Spring Data JPA Repositories (ChamadoRepository)
│ │ │ └── service/ # Business Logic Services (ChamadoService)
│ │ └── resources/
│ │ ├── static/ # Web Frontend (index.html)
│ │ └── application.properties # Configuration & environment bindings
│ └── test/
│ └── java/com/example/helpdesk/
│ └── service/ # Unit Tests (ChamadoServiceTest)
├── Dockerfile
├── docker-compose.yml
├── pom.xml
└── README.md
The system manages support tickets (Chamados) with the following domain attributes and rules:
- Status Values:
ABERTO(Open)EM_ANDAMENTO(In Progress)FECHADO(Closed) (Note: Portuguese domain terms and status values are preserved to reflect the core business domain model).
- Business Rules:
- New tickets default to status
ABERTOand recorddataCriacao(creation timestamp). - When a ticket status transitions to
FECHADO,dataFechamento(closing timestamp) is automatically populated with the current timestamp. - If a closed ticket is reopened (status changed to
ABERTOorEM_ANDAMENTO),dataFechamentois automatically cleared (null). - Read operations automatically sort tickets in descending order by creation date (
findAllByOrderByDataCriacaoDesc).
- New tickets default to status
Base URL: http://localhost:8080
| Method | Route | Description |
|---|---|---|
GET |
/chamados |
List all support tickets (sorted by newest first) |
GET |
/chamados/{id} |
Get ticket details by ID |
GET |
/chamados/status/{status} |
Filter tickets by status (ABERTO, EM_ANDAMENTO, FECHADO) |
POST |
/chamados |
Create a new support ticket |
PUT |
/chamados/{id} |
Update an existing ticket |
DELETE |
/chamados/{id} |
Delete a ticket by ID |
Request Body:
{
"titulo": "Erro ao acessar o sistema",
"descricao": "O usuário recebe erro 500 ao tentar fazer login."
}Response (201 Created):
{
"id": 1,
"titulo": "Erro ao acessar o sistema",
"descricao": "O usuário recebe erro 500 ao tentar fazer login.",
"status": "ABERTO",
"dataCriacao": "2026-10-24T15:00:00",
"dataFechamento": null
}When the application is running, access the interactive OpenAPI / Swagger documentation at:
Make sure Docker and Docker Compose are installed on your machine.
- Clone the repository and navigate to the project directory:
git clone https://github.com/evfernandes-dev/helpdesk-pro.git cd helpdesk-pro - Start containers in detached mode:
docker compose up --build -d
- The application will be running at
http://localhost:8080and MySQL at port3306. - To stop the containers:
docker compose down
- Ensure Java 21 and MySQL are installed and running locally.
- Create a MySQL database named
helpdesk_pro:CREATE DATABASE helpdesk_pro;
- Configure your database credentials in
src/main/resources/application.propertiesor set environment variables:export SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/helpdesk_pro?createDatabaseIfNotExist=true&useSSL=false&serverTimezone=America/Sao_Paulo export SPRING_DATASOURCE_USERNAME=root export SPRING_DATASOURCE_PASSWORD=your_password
- Run the application using Maven:
mvn spring-boot:run
The test suite covers core business logic, status transitions, validation, and exception handling using JUnit 5 and Mockito.
To run the tests:
mvn test| Ticket List Dashboard | Ticket Management Form |
|---|---|
![]() |
![]() |
(Note: To populate these screenshots on GitHub, capture UI snapshots of the running web interface and save them as docs/img/ticket-list.png and docs/img/ticket-form.png).
- Spring Security & JWT Authentication: Add user roles (Admin, Technician, Customer) and secured endpoints.
- Pagination & Sorting: Implement
Pageableon listing endpoints for large datasets. - Advanced Filtering: Date range filters and technician assignment tracking.
- CI/CD Pipeline: GitHub Actions workflow for automated testing and container builds.
Developed by Emanuel Vitor (@evfernandes-dev).
This project is licensed under the MIT License - see the LICENSE file for details.

