Skip to content

groot-mg/sales-catalog

Repository files navigation

sales-catalog

Build and test Quality Gate Status License: MIT

Sales-catalog is used to products and stock management.

Build, tests and run

Build

Build with gradle (build + unit tests):

./gradlew build

Functional tests

Run functional-tests:

./gradlew cucumber

sales-catalog depends on Service Discovery, so wiremock is used to mock it and test the functionalities of the application.

Run

Warning

The application contains dependencies and will throw exceptions on the logs if the dependencies are not started

Dependencies:

  • Keycloak on port 8180
    • To start the keycloak, go to identity-service and run the docker-compose, or go to docker-local-setup and start it via docker compose also
    • Without the Keycloak the application fails to start
  • Service discovery on port 8081
    • To start the Service discovery, go to service-discovery and start it manually, or go to docker-local-setup and start it via docker compose
    • Without the Service discovery the application logs a log of exceptions on console
  • PostgreSQL database on port 5432
    • To start the database, go to local-database-config and run the docker-composey, or go to docker-local-setup and start it via docker compose also
    • Without the Database the application starts but will return error on the operations requiring database

Local app is available on the port 8082, health check endpoint is http://localhost:8082/sales-catalog/private/health

./gradlew bootRun

Alternatively, it is possible to run using java -jar sales-catalog-app/build/libs/sales-catalog-app.jar

Run together with the project

API Gateway should run together with the Service discovery and other services, to run all together, please see docker-local-setup.

OpenAPI / Swagger

Open API and Swagger UI are available on the endpoints: