{"id":21369186,"url":"https://github.com/sshaaf/book-service","last_synced_at":"2025-07-13T06:31:57.041Z","repository":{"id":165632119,"uuid":"641035065","full_name":"sshaaf/book-service","owner":"sshaaf","description":"Quarkus REST API example book-service","archived":false,"fork":false,"pushed_at":"2023-11-29T12:22:04.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-11-29T13:35:18.436Z","etag":null,"topics":["java","keycloak","oidc","quarkus"],"latest_commit_sha":null,"homepage":"https://shaaf.dev","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/sshaaf.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}},"created_at":"2023-05-15T16:32:09.000Z","updated_at":"2023-11-29T13:35:20.799Z","dependencies_parsed_at":null,"dependency_job_id":"9e8baf44-0a4d-4364-9bf7-d83b123707c2","html_url":"https://github.com/sshaaf/book-service","commit_stats":null,"previous_names":["sshaaf/book-service"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaaf%2Fbook-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaaf%2Fbook-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaaf%2Fbook-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaaf%2Fbook-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshaaf","download_url":"https://codeload.github.com/sshaaf/book-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225861666,"owners_count":17535983,"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":["java","keycloak","oidc","quarkus"],"created_at":"2024-11-22T07:31:01.947Z","updated_at":"2024-11-22T07:31:44.362Z","avatar_url":"https://github.com/sshaaf.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Book Service\nIs a backend service written in Quarkus that does the following. \n- The API is a Books API, uses a Pg database in the backend to store the data. \n- This project uses Quarkus, the Supersonic Subatomic Java Framework.\n- It uses the Quarkus oidc extension to authorize against Keycloak\n- An angular front-end for this service is also available here.\n- API endpoints\n  - GET -\u003e getAll,\n  - GET /{isbn} -\u003e getOne,\n  - DELETE /{isbn} -\u003e remove,\n  - POST -\u003e create,\n  - PUT /isbn -\u003e update\n\n-----------------------\nIf you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .\n\n## Running the application in dev mode\n\nYou can run your application in dev mode that enables live coding using:\n\n```shell script\n./mvnw compile quarkus:dev\n```\n\n\u003e **_NOTE:_**  Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.\n\n## Packaging and running the application\n\nThe application can be packaged using:\n\n```shell script\n./mvnw package\n```\n\nIt produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.\nBe aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.\n\nThe application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.\n\nIf you want to build an _über-jar_, execute the following command:\n\n```shell script\n./mvnw package -Dquarkus.package.type=uber-jar\n```\n\nThe application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`.\n\n## Creating a native executable\n\nYou can create a native executable using:\n\n```shell script\n./mvnw package -Pnative\n```\n\nOr, if you don't have GraalVM installed, you can run the native executable build in a container using:\n\n```shell script\n./mvnw package -Pnative -Dquarkus.native.container-build=true\n```\n\nYou can then execute your native executable with: `./target/keycloak-basic-1.0-SNAPSHOT-runner`\n\nIf you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.\n\n## Provided Code\n\n### RESTEasy Reactive\n\nEasily start your Reactive RESTful Web Services\n\n[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources)\n\n\n\n### Securing with Keycloak\n\n\n\nTesting the backend service from a terminal\nGetting a token from Keycloak. \n```\nexport access_token=$(\\\n  curl --insecure -X POST http://localhost:32778/realms/quarkus/protocol/openid-connect/token \\\n  --user backend-service:secret \\\n  -H 'content-type: application/x-www-form-urlencoded' \\\n  -d 'username=alice\u0026password=alice\u0026grant_type=password' | jq --raw-output '.access_token' \\\n  )\n```\n\nHitting the API with the token.\n\n```\ncurl -v -X GET   http://localhost:8888/books   -H \"Authorization: Bearer \"$access_token\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshaaf%2Fbook-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshaaf%2Fbook-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshaaf%2Fbook-service/lists"}