This project uses Quarkus, the Supersonic Subatomic Java Framework.
M2_HOME
environment variable to the extracted directory.M2_HOME/bin
to your system PATH
.JAVA_HOME
environment variable to the JDK installation directory.JAVA_HOME/bin
to your system PATH
.application.properties
file in Quarkus to connect to your MySQL instance.node -v
npm -v
npm install -g @vue/[email protected]
npm install
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
devServer: {
port: 8084,
proxy: {
'/api': {
target: 'http://localhost:8080', // Port where your API is running
changeOrigin: true,
pathRewrite: { '^/api': '' },
},
},
},
})
npm run serve
NOTE: Ensure your front-end runs on port 8084, while your API runs on port 8080 using Docker to avoid conflicts.
This project is a modern CRUD API built with SOLID principles using:
It includes endpoints for managing services, users, and service requests.
To run the application in development mode with live coding enabled:
./mvnw compile quarkus:dev
NOTE: Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
To package the application:
./mvnw package
This produces the quarkus-run.jar
file in the target/quarkus-app/
directory. It’s not an über-jar as the dependencies are copied into the target/quarkus-app/lib/
directory. You can run the application using:
java -jar target/quarkus-app/quarkus-run.jar
To build an über-jar:
./mvnw package -Dquarkus.package.jar.type=uber-jar
Run the über-jar with:
java -jar target/*-runner.jar
To create a native executable:
./mvnw package -Dnative
Or, if you don't have GraalVM installed, use a container for the native build:
./mvnw package -Dnative -Dquarkus.native.container-build=true
Run your native executable with:
./target/thiago-code-1.0.0-SNAPSHOT-runner
For more information on native executables, consult Quarkus Native Guide.
GET /servicos Retrieve all services.
GET /servicos/{id} Retrieve a specific service by ID.
POST /servicos Create a new service. Request Body Example:
{
"id": 1,
"name": "Service Name",
"description": "Service Description"
}
PUT /servicos Update an existing service. Request Body Example:
{
"id": 1,
"name": "Updated Service Name",
"description": "Updated Description"
}
DELETE /servicos/{id} Delete a service by ID.
GET /users Retrieve all users.
GET /users/{id} Retrieve a specific user by ID.
POST /users Create a new user. Request Body Example:
{
"id": 1,
"name": "User Name",
"cpf": "12345678901"
}
PUT /users Update an existing user. Request Body Example:
{
"id": 1,
"name": "Updated User Name",
"cpf": "09876543210"
}
DELETE /users/{id} Delete a user by ID.
POST /solicitacoesServicos Create a new service request. Request Body Example:
{
"userId": 1,
"servicoId": 2,
"status": "PENDING"
}
GET /solicitacoesServicos Retrieve all service requests.
GET /solicitacoesServicos/{id} Retrieve a specific service request by ID.
PUT /solicitacoesServicos/{id} Update the status of a service request. Request Body Example:
{
"status": "COMPLETED"
}
DELETE /solicitacoesServicos/{id} Delete a service request by ID.
Thiago-Hercules