{"id":18383174,"url":"https://github.com/fugerit-org/quarkus-photobook","last_synced_at":"2026-01-31T13:47:16.704Z","repository":{"id":244065667,"uuid":"814158121","full_name":"fugerit-org/quarkus-photobook","owner":"fugerit-org","description":"Quarkus photobook demo, using mongo db for persistence","archived":false,"fork":false,"pushed_at":"2026-01-29T11:58:06.000Z","size":1405,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-30T02:07:42.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fugerit-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-12T12:59:34.000Z","updated_at":"2026-01-29T11:57:36.000Z","dependencies_parsed_at":"2024-12-24T06:13:15.532Z","dependency_job_id":"c8362fe6-efa6-40a7-92a1-f6cea9003e7c","html_url":"https://github.com/fugerit-org/quarkus-photobook","commit_stats":null,"previous_names":["fugerit-org/quarkus-photobook"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/fugerit-org/quarkus-photobook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fugerit-org%2Fquarkus-photobook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fugerit-org%2Fquarkus-photobook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fugerit-org%2Fquarkus-photobook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fugerit-org%2Fquarkus-photobook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fugerit-org","download_url":"https://codeload.github.com/fugerit-org/quarkus-photobook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fugerit-org%2Fquarkus-photobook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28944789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T13:02:32.153Z","status":"ssl_error","status_checked_at":"2026-01-31T13:00:07.528Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-06T01:10:23.722Z","updated_at":"2026-01-31T13:47:16.675Z","avatar_url":"https://github.com/fugerit-org.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quarkus Photobook Demo App\n\n[![Keep a Changelog v1.1.0 badge](https://img.shields.io/badge/changelog-Keep%20a%20Changelog%20v1.1.0-%23E05735)](https://github.com/fugerit-org/quarkus-photobook/blob/master/CHANGELOG.md)\n[![license](https://img.shields.io/badge/License-Apache%20License%202.0-teal.svg)](https://opensource.org/licenses/Apache-2.0)\n[![code of conduct](https://img.shields.io/badge/conduct-Contributor%20Covenant-purple.svg)](https://github.com/fugerit-org/fj-universe/blob/main/CODE_OF_CONDUCT.md)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fugerit-org_quarkus-photobook\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=fugerit-org_quarkus-photobook)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=fugerit-org_quarkus-photobook\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=fugerit-org_quarkus-photobook)\n[![Docker images](https://img.shields.io/badge/dockerhub-images-important.svg?logo=Docker)](https://hub.docker.com/repository/docker/fugeritorg/quarkus-photobook/general)\n\n## Introduction\n\nRecently I followed some [Mongo DB courses](https://learn.mongodb.com/) and attended the [Spring I/O 2023](https://2023.springio.net/).  \nSo I decided to practice a bit. This project is the result.  \nCurrently is just a simple POC integration of Mongo DB and Quarkus\n\nThere is a live version at the link [https://springio23.fugerit.org/photobook-demo/home/index.html](https://springio23.fugerit.org/photobook-demo/home/index.html)\n\nThis is an alternate version of the [springboot project](https://github.com/fugerit-org/springboot-photobook/) based on [quarkus](https://quarkus.io/)\n\n## Prerequisites\n\n| software                                                                                                                                                                                                 | docker compose | local build and run |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|---------------------|\n| [![Java runtime version](https://img.shields.io/badge/run%20on-java%2021+-%23113366.svg?style=for-the-badge\u0026logo=openjdk\u0026logoColor=white)](https://universe.fugerit.org/src/docs/versions/java21.html)   | no             | yes                 |\n| [![Java build version](https://img.shields.io/badge/build%20on-GraalVM%2021+-%23ED8B00.svg?style=for-the-badge\u0026logo=openjdk\u0026logoColor=white)](https://universe.fugerit.org/src/docs/versions/gvm21.html) | no             | yes                 |\n| [![Apache Maven](https://img.shields.io/badge/Apache%20Maven-3.9.0+-C71A36?style=for-the-badge\u0026logo=Apache%20Maven\u0026logoColor=white)](https://universe.fugerit.org/src/docs/versions/maven3_9.html)       | no             | yes                 |\n| [![Node JS](https://img.shields.io/badge/Node%20JS-20+-1AC736?style=for-the-badge\u0026logo=node.js\u0026logoColor=white)](https://universe.fugerit.org/src/docs/versions/node.html)                               | no             | yes                 |\n| [![Docker](https://img.shields.io/badge/docker-26+-1266E7?style=for-the-badge\u0026logo=docker\u0026logoColor=white)](https://universe.fugerit.org/src/docs/versions/docker.html)                                  | yes            | no                  |\n\n## Quickstart \n\n### Start via docker compose\n\n```shell\ndocker-compose -f src/main/docker/docker-compose.yml up -d\n```\n\n### Start in dev mode\n\n1. Create mongo db instance with db initialization (script src/test/resources/mongo-db/mongo-init.js) :\n\n```shell\ndocker run --rm -p 27017:27017 --name MONGO8 -v `pwd`/src/test/resources/mongo-db/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js mongo:8.2.3\n```\n\nThis will start a mongo db linked on the default port and with the default username/password (root/example).\n\n2. Start the application in dev mode\n\nThe back end\n\n```shell\nmvn quarkus:dev\n```\n\nAnd front end\n\n```shell\ncd src/main/react\nnpm install\nnpm run start\n```\n\n3. Access home page\n\n\u003chttp://localhost:8080/photobook-demo/home/index.html\u003e\n\n## project environment variables\n\nIn case you want a custom mongo db connection :\n\n| key         | dedault                                  | \n|-------------|------------------------------------------|\n| MONGODB_URL | mongodb://localhost:27017/photobook_demo |\n\n## container environment variables\n\nOther custom environment variables :\n\n| key              | dedault | description                                 |\n|------------------|---------|---------------------------------------------|\n| JAVA_OPTS_APPEND |         | append java options (for instance '-Xmx1g') |\n\nFor the Dockefile.jvm build, see the [RedHat UBI OpenJDK image documentation](https://jboss-container-images.github.io/openjdk/) for more options.\n\n## Quarkus package\n\nIt is possible to compile the application to a single jar package :\n\n```shell\nmvn package -Pbuildreact\n```\n\nAnd then run\n\n```shell\njava -jar target/quarkus-app/quarkus-run.jar\n```\n\n## Native image compilation\n\nThe code has been set for native compilation with [GraalVM](https://www.graalvm.org/) (tested with GraalVM 22.3 CE).  \n\nIt is possible to compile :\n\n```shell\nmvn install -Dnative -Pbuildreact\n```\n\nAnd then run\n\n```shell\n./target/quarkus-photobook*-runner\n```\n\nRefer to [Quarkus Documentation](https://quarkus.io/guides/building-native-image) for more informations.\n\n## Docker image\n\n### docker container (jvm)\n\nBuild quarkus application (jar)\n\n```shell\nmvn package -P buildreact\n```\n\nBuild container openjdk\n\n```shell\ndocker build -t quarkus-photobook-jvm -f src/main/docker/Dockerfile.jvm .\n```\n\nRunning the container :\n\n```shell\ndocker run -it -p 8080:8080 --name quarkus-photobook-jvm quarkus-photobook-jvm\n```\n\n### docker container (native)\n\nBuilding the native image :\n\n```shell\nmvn install -Dnative -Pbuildreact\n```\n\nBuilding the container image : \n\n```shell\ndocker build -t quarkus-photobook-native -f src/main/docker/Dockerfile.native .\n```\n\nRunning the container :\n\n```shell\n\n\n```\n\n## Native optimization : PGO\n\nThis section is based on \u003chttps://github.com/alina-yur/native-spring-boot\u003e.\n\nOne of the most powerful performance optimizations in Native Image is profile-guided optimizations (PGO).\n\n1. Build an instrumented image:\n\n```shell\nmvn package -Dnative -Pinstrumented\n```\n\n2. Run the app and apply relevant workload:\n\n```shell\nmv ./target/quarkus-photobook*runner ./target/quarkus-photobook-instrumented\n```\n\n```shell\n./target/quarkus-photobook-instrumented\n```\n\n```shell\nhey -n=30000 http://localhost:8080/photobook-demo/api/photobook/view/list\n```\n\n```shell\nhey -n=30000 http://localhost:8080/photobook-demo/api/photobook/view/images/springio23/language/it/current_page/1/page_size/5\n```\n\nafter you shut down the app, you'll see an `iprof` file in your working directory.\n\n3. Build an app with profiles (they are being picked up via `\u003cbuildArg\u003e--pgo=${project.basedir}/default.iprof\u003c/buildArg\u003e`):\n\n```shell\nmvn package -Dnative -Poptimized\n```\n\n## Benchmark scripts\n\nPrerequisites :\n- running mongo db\n- `hey` installed\n- `psrecord` installed\n\nAt the end of a run, an image will be plotted in the `target` folder.\n\n### 1. Benchmark JIT\n\n```shell\nmvn clean package\n```\n\n```shell\n./src/main/script/bench-jit.sh\n```\n\n### 2. Benchmark native\n\nFollow steps in 'Native optimization : PGO' section\n\n```shell\n./src/main/script/bench-native.sh\n```\n\n### 3. Benchmark result\n\nSample result of JIT benchmark run :\n\n![JIT Benchmark Result](src/main/docs/images/bench-result-jit-20240617.png)\n\nSample result of native (AOT) benchmark run :\n\n![Native Benchmark Result](src/main/docs/images/bench-result-native-20240617.png)\n\n## application stack\n\n| Layer             | 2024 version   |\n|-------------------|----------------|\n| Persistence       | MongoDB 8      |\n| Java version      | GraalVM 21     |\n| API REST          | Quarkus 3.11.x |\n| Node JS           | Node 20        |\n| Front end package | Vite           |\n| Front end UI      | React 18.3     |\n\n\n## Deploy on Google App Engine\n\nPrerequisites :\n* google cloud account\n* GCloud CLI\n\n[Simple app.yaml for AOT](src/main/appengine/app-aot.yaml) and\n[Simple app.yaml for JIT](src/main/appengine/app-jit.yaml)\n\nCustomize the app.yaml and run gcloud \n\nFor JIT version the uber kar packaging is needed : \n\n```shell\nmvn package -Dquarkus.package.jar.type=uber-jar\n```\n\n```shell\ngcloud quarkus-photobook-runner.jar --appyaml=src/main/appengine/app-jit.yaml\n```\n\nFor JIT version or\n\n```shell\ngcloud quarkus-photobook-runner --appyaml=src/main/appengine/app-aot.yaml\n```\n\nFor AOT version\n\nFurther reference : \n* \u003chttps://cloud.google.com/sdk/gcloud/reference/app/deploy\u003e\n* \u003chttps://quarkus.io/guides/deploying-to-google-cloud\u003e\n\n## Deploy on KNative\n\nPrerequisites : \n* container environment (docker / podman)\n* Kubernates (for instance minikube)\n* Knative\n\nAfter setting up Knative, \nCustomize the [quarkus-photobook-jit.yaml](quarkus-photobook-jit.yaml) or\n[quarkus-photobook-aot.yaml](quarkus-photobook-aot.yaml) service deployment.\n\nAnd run\n\n```shell\nkubectl apply -f quarkus-photobook-jit.yaml\n```\n\nFor JIT version or\n\n```shell\nkubectl apply -f quarkus-photobook-aot.yaml\n```\n\nFor AOT version\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffugerit-org%2Fquarkus-photobook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffugerit-org%2Fquarkus-photobook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffugerit-org%2Fquarkus-photobook/lists"}