{"id":27140403,"url":"https://github.com/ddonamaria/price-service","last_synced_at":"2026-04-11T14:06:42.757Z","repository":{"id":282718400,"uuid":"942009148","full_name":"ddonamaria/price-service","owner":"ddonamaria","description":"[technical test] - This is a microservice for managing prices","archived":false,"fork":false,"pushed_at":"2025-04-06T17:18:00.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T18:27:03.339Z","etag":null,"topics":["cucumber","docker","java","junit","mockito","openapi","springboot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddonamaria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-03T12:28:20.000Z","updated_at":"2025-04-06T17:18:03.000Z","dependencies_parsed_at":"2025-04-06T18:23:24.125Z","dependency_job_id":"0891f982-1315-4cd6-b188-b20a4f2d7fc0","html_url":"https://github.com/ddonamaria/price-service","commit_stats":null,"previous_names":["ddonamaria/price-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ddonamaria/price-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddonamaria%2Fprice-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddonamaria%2Fprice-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddonamaria%2Fprice-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddonamaria%2Fprice-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddonamaria","download_url":"https://codeload.github.com/ddonamaria/price-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddonamaria%2Fprice-service/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265085902,"owners_count":23709236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cucumber","docker","java","junit","mockito","openapi","springboot"],"created_at":"2025-04-08T05:52:02.339Z","updated_at":"2025-12-30T22:08:18.706Z","avatar_url":"https://github.com/ddonamaria.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🏷️ Price Service\n\n## 📌 About the project\n**Price Service** is a **REST** service that allows querying product prices at different points in time.  \nIt has been developed using **Java** and **Spring Boot**, following a **hexagonal architecture** and following the **API First** principle for API definition.\n\n\n## 🛠️ Technologies used\n\nThis project has been built with the following technologies:\n\n- **Java 21**\n- **Spring Boot 3.4.3**\n- **In-memory H2 Database**\n- **OpenAPI** → API Definition\n- **OpenAPI Generator** → Automatic generation of DTOs and controllers\n- **MapStruct** → Entity mapping\n- **JUnit 5, Mockito** → Unitary tests\n- **Cucumber, Gherkin** → Tests E2E\n- **Docker** → Application containerization\n\n\n## 🚀 Local deployment\n\n1. Clone the repository\n```sh\ngit clone https://github.com/ddonamaria/price-service.git\n```\n\n2. Compile the project using Maven\n```sh\n.\\mvnw clean package\n```\n\n3. Run the application\n```sh\n.\\mvnw spring-boot:run\n```\n\n4. Access the API locally:\n   [Swagger UI](http://localhost:8080/swagger-ui/index.html)\n\n\n## 🐳 Deployment with Docker\n\n1. Build the Docker image \n```sh\ndocker build -t price-service:latest .\n```\n\n2. Run the Docker image in a container\n```sh\ndocker run -p 8080:8080 price-service:latest\n```\n\n\n## 🧪 Run the tests\n\nExecute unitary and integration tests:\n```sh\n.\\mvnw test\n```\n\nExecute test E2E with cucumber:\n```sh\n.\\mvnw verify\n```\n_A report is generated in HTML and JSON formats in the **target/cucumber** directory with the results of the E2E tests._\n\n\n## 🗄️ Access to the H2 Database\nYou can access the in-memory **H2** database via browser:\n\n- **URL**: [http://localhost:8080/h2-console](http://localhost:8080/h2-console)\n- **Credentials**: These can be found in the [application.yml](src/main/resources/application.yaml) configuration file.\n\n\n## 🔍 Development Decisions\n\n- **Scalable Design**: The application has been designed to be easily scalable in terms of features, including abstraction layers that, although they may seem unnecessary in a small project, facilitate future extensions.\n- **Layered Architecture**: A clear separation of layers has been maintained, allowing for better code organization and readability.\n- **API-first**: The **API-first** principle has been followed by defining the OpenAPI specifications first and generating the model and API code automatically using OpenAPI Generator.\n- **Exception Handling**: Exceptions have been handled to manage errors such as invalid parameters or missing results in queries.\n- **Field Name Changes**: Some field names have been modified compared to the initially proposed requirement. \n    - **\"PRICE_LIST\"** has been renamed to **\"PriceId\"** as it acts as the unique identifier for each price.\n    - **\"CURR\"** has been renamed to **\"CURRENCY\"** to follow a consistent pattern and avoid abbreviations.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddonamaria%2Fprice-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddonamaria%2Fprice-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddonamaria%2Fprice-service/lists"}