{"id":19403797,"url":"https://github.com/joeltadeu/library-management","last_synced_at":"2025-04-24T08:32:20.853Z","repository":{"id":45800706,"uuid":"427822348","full_name":"joeltadeu/library-management","owner":"joeltadeu","description":"Spring Boot rest microservices using Eureka, Zuul / Spring Boot Gateway, Docker. Monitoring with logstash, logback, elasticsearch, kibana.","archived":false,"fork":false,"pushed_at":"2022-01-18T01:05:19.000Z","size":828,"stargazers_count":6,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T01:34:04.776Z","etag":null,"topics":["distributed-tracing","docker","docker-compose","elasticsearch","eureka","feign","grafana","kibana","logstash","micorservice","prometheus","sleuth","spring-boot","spring-cloud","zipkin","zuul"],"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/joeltadeu.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}},"created_at":"2021-11-14T02:50:02.000Z","updated_at":"2024-07-27T22:25:49.000Z","dependencies_parsed_at":"2022-07-17T01:46:30.412Z","dependency_job_id":null,"html_url":"https://github.com/joeltadeu/library-management","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Flibrary-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Flibrary-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Flibrary-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Flibrary-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeltadeu","download_url":"https://codeload.github.com/joeltadeu/library-management/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250592122,"owners_count":21455503,"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":["distributed-tracing","docker","docker-compose","elasticsearch","eureka","feign","grafana","kibana","logstash","micorservice","prometheus","sleuth","spring-boot","spring-cloud","zipkin","zuul"],"created_at":"2024-11-10T11:30:32.983Z","updated_at":"2025-04-24T08:32:20.509Z","avatar_url":"https://github.com/joeltadeu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library Management using Spring Cloud, Eureka, Zuul, Zipkin, Sleuth\n\n\n## Architecture:\n![Alt text](assets/library-management-architecture.svg?raw=true \"Library Management Architecture\")\n\n## There are three microservices:\n\n- **Books** : This microservice is responsible for managing books. A user can create, update, get details, list and delete books.\n- **Orders** : This microservice is responsible for managing orders. A member can borrow a book and return it.\n- **Params** : This microservice is responsible for managing params. These params are used to loan a book\n\n### Business rules ###\n- No need to authenticate the user (we can assume they are members and are already authenticated)\n- Maximum number of books loaned at any time is 3 per user\n- If a member has any outstanding loaned books, they cannot loan any more until all books returned.\n- There is only 1 copy of each book\n- Each book can have more than one category \n\n### EndPoints ###\n\n| Service       | EndPoint                     | Port    | Method | Description                                      |\n| ------------- | -----------------------------| :-----: | :-----:| ------------------------------------------------ |\n| Books         | /api/v1/books/{id}           | 7500    | GET    | Return detail of specified book                  |\n| Books         | /api/v1/books                | 7500    | GET    | Return details of all books                      |\n| Books         | /api/v1/books                | 7500    | POST   | Insert a new book                                |\n| Books         | /api/v1/books/{id}           | 7500    | PUT    | Update a specific book                           |\n| Books         | /api/v1/books/{id}           | 7500    | DELETE | Delete a specific book                           |\n| Orders        | /api/v1/loan                 | 7501    | POST   | Loan a book                                      |\n| Orders        | /api/v1/return               | 7501    | POST   | Return a book                                    |\n| Params        | /api/v1/params/by-key/{key}  | 7502    | GET    | Return param by key                              |\n\n### Gateways ###\n\n| Service       | EndPoint                                  |\n| ------------- | :---------------------------------------: |\n| Books         | **/book**/api/v1/books/{id}               | \n| Books         | **/book**/api/v1/books                    |\n| Orders        | **/order**/api/v1/loan                    |\n| Orders        | **/order**/api/v1/return                  |\n| Params        | **/param**/api/v1/params/by-key/{key}     |\n\nURI for gateway : *http://localhost:8762*\n\n### Documentation and examples ###\n\n###Swagger\n\n- **Books** : http://localhost:8762/book/swagger-ui.html\n- **Orders** : http://localhost:8762/order/swagger-ui.html\n- **Params** : http://localhost:8762/param/swagger-ui.html\n\n###Postman collection\n\n![Alt text](assets/postman-collection-folder.png?raw=true \"Postman collection folder\")\n## Used Netflix OSS:\n\n- **Netflix Eureka** is used for discovery service.\n- **Netflix Zuul** is used for gateway.\n\n## Distributed Tracing:\n\n- **Sleuth** and **Zipkin**\n\nYou can open Zipkin : http://localhost:9411\n\n## Used ELK STACK:\n\n- **ElasticSearch** is on 6972 port\n- **Logstash TCP** is on 5000 port\n- **Kibana** is on 5601 port\n\nOpen kibana with http://localhost:5601/. You must define an index pattern (taner-*) on Management/Stack Management.\n\n## Grafana:\n\nYou can open Grafana : http://localhost:3000/\n\nusername/password: admin\n\n## Build \u0026 Run\n\n- *\u003emvn clean package* : to build\n- *\u003edocker-compose up* --build : build docker images and containers and run containers\n- *\u003edocker-compose stop* : stop the dockerized services\n- Each maven module has a Dockerfile.\n\nIn docker-compose.yml file:\n\n- Books Service : **__7500__** port is mapped to **__7500__** port of host\n- Orders Service : **__7501__** port is mapped to **__7501__** port of host\n- Params Service : **__7502__** port is mapped to **__7502__** port of host\n- Eureka Discovery Service : **__8761__** port is mapped to **__8761__** port of host\n- Spring Boot (/ Zuul) Gateway Service : **__8762__** port is mapped to **__8762__** port of host \n\n## VERSIONS\n\n### 1.0.0\n\n- Sleuth and Zipkin Integration\n- ElasticSearch, Kibana, Logstash integration\n- Spring Boot Gateway\n- Spring-Boot 2.5.6.RELEASE\n- Java 16","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeltadeu%2Flibrary-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeltadeu%2Flibrary-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeltadeu%2Flibrary-management/lists"}