{"id":15069059,"url":"https://github.com/wkrzywiec/library-hexagonal","last_synced_at":"2025-10-25T17:06:07.203Z","repository":{"id":39988852,"uuid":"260012527","full_name":"wkrzywiec/library-hexagonal","owner":"wkrzywiec","description":"An example application written in Hexagonal (Ports and Adapter) architecture","archived":false,"fork":false,"pushed_at":"2024-07-27T10:09:25.000Z","size":10409,"stargazers_count":267,"open_issues_count":47,"forks_count":55,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-31T05:03:34.677Z","etag":null,"topics":["cqrs","ddd","docker","docker-compose","domain-driven-design","hexagonal-architecture","java-11","ports-and-adapters","postgres","spring-boot","tdd"],"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/wkrzywiec.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":"2020-04-29T18:41:36.000Z","updated_at":"2025-03-16T02:51:18.000Z","dependencies_parsed_at":"2023-11-14T16:41:46.081Z","dependency_job_id":"75777849-0d72-4b68-bf9e-423edbd11977","html_url":"https://github.com/wkrzywiec/library-hexagonal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkrzywiec%2Flibrary-hexagonal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkrzywiec%2Flibrary-hexagonal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkrzywiec%2Flibrary-hexagonal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkrzywiec%2Flibrary-hexagonal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wkrzywiec","download_url":"https://codeload.github.com/wkrzywiec/library-hexagonal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601448,"owners_count":20964864,"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":["cqrs","ddd","docker","docker-compose","domain-driven-design","hexagonal-architecture","java-11","ports-and-adapters","postgres","spring-boot","tdd"],"created_at":"2024-09-25T01:40:15.368Z","updated_at":"2025-10-25T17:06:02.161Z","avatar_url":"https://github.com/wkrzywiec.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library \n\u003e written in *Hexagonal (Ports \u0026 Adapters) Architecture*\n\n![Master Branch](https://github.com/wkrzywiec/library-hexagonal/workflows/Master%20Branch/badge.svg?branch=master) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=wkrzywiec_library-hexagonal\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=wkrzywiec_library-hexagonal) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=wkrzywiec_library-hexagonal\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=wkrzywiec_library-hexagonal) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis is a small application that provides basic REST endpoints for managing library (add new book, reserve, borrow it, etc.). \n\nThe technology behind it: \n* Java 11\n* Postgres\n* Spring Boot \n\n## Installing / Getting started\n\n#### Using `docker-compose`\n\nIn the terminal run the following command:\n```console\n$ docker-compose up\n``` \n\n#### Using Maven (with H2 or local Postgres database)\n\nFirst compile an application:\n\n```console\n$ mvn clean package\n```\n\nThen, you have two options either run it with H2 database or with local Postgres database. For first approach just run:\n\n```console\n$ mvn spring-boot:run \n```\n\nFor a second option, check in the configuration file - `src/main/resources/application.yml` for profile *local-postgres* if connection details are correct and if so, run the command:\n```console\n$ mvn spring-boot:run -P local-postgres\n```\n\n#### Inside IntelliJ (with H2 or Postgres database)\n\nFirst configure how you run the `LibraryHexagonalApplication.java` by adding `--spring.profiles.active=h2` (for H2 database) or `--spring.profiles.active=postgres` (for Postgres database) as a **Program argument**.\n\nThen just run the `LibraryHexagonalApplication.java` class so it will use H2 database (you don't need to have postgres database up and running).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkrzywiec%2Flibrary-hexagonal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwkrzywiec%2Flibrary-hexagonal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkrzywiec%2Flibrary-hexagonal/lists"}