A small project to understand spring boot, spring boot data JPA, and spring boot security. The expense-tracker is a service which comes with default set of categories. APIs are available to add/edit/delete categories and expenses. Swagger UI is integrated and it can be used to refer API documentation.
Start the expense-tracker.
docker-compose up
Follow steps described in url to deploy expense tracker on K8s.
Application is available at http://localhost:8080 Swagger documentation is available at http://localhost:8080/swagger-ui.html#/ To access the REST end points, use basic authentication.
Refer swagger documentation for more information related to headers, parameters, and body information.
- Get all categories. GET http://localhost:8080/api/v1/category
- Get category by id. GET http://localhost:8080/api/v1/category?id={categoryId}
- Get category by name. GET http://localhost:8080/api/v1/category?name={categoryName}
- Add new category. POST http://localhost:8080/api/v1/category
- Delete existing categories by names. DELETE http://localhost:8080/api/v1/category
- Delete an existing category by Id. DELETE http://localhost:8080/api/v1/category/{categoryId}
- Update an existing category. PUT http://localhost:8080/api/v1/category/{oldcategoryname}
- Get all expenses. GET http://localhost:8080/api/v1/expenses
- Get expense by id. GET http://localhost:8080/api/v1/expenses?id={expenseId}
- Get expense by name. GET http://localhost:8080/api/v1/expenses?name={expenseName}
- Add new expense. POST http://localhost:8080/api/v1/expenses
- Delete existing expense. DELETE http://localhost:8080/api/v1/expenses/{expenseId}
- Update an existing expense. PUT http://localhost:8080/api/v1/expenses/{oldExpenseId}
To create images for x86 and arm platforms
docker login ghcr.io
docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/haricazorla/expense-tracker:alpine --push .
This project is configured with CycloneDX maven plugin to generate SBOM file. As part of CI this SBOM file will be uploaded to Dependency-Track hosted on OCI for risk assessment.