This project was created to practice building Microservices with Quarkus, Securing services with Keycloak and testing the performance of hibernate-orm and hibernate-reactive. In this project, there is a sample of the Rest-API project that contains many samples of Endpoint classes and samples of hibernate queries, etc. If you are interested, let's see a couple of documentation below.
root/
├── extensions/ # Quarkus extensions and shared libraries
│ ├── quarkus-base/
│ ├── quarkus-authentication/
│ ├── quarkus-authorization/
│ ├── quarkus-microservices-common/
│ ├── quarkus-error-mail-notification/
│ └── media-file-manager/
├── services/ # Microservices
│ ├── rest-sample/
│ └── media-mail-service/
├── infra/ # Infrastructure configs
│ ├── docker/ # Docker Compose, Keycloak, Nginx, PostgreSQL
│ └── keycloak-setup/ # Production Keycloak setup
├── scripts/ # Build & utility scripts
│ ├── deploy-dependency.sh
│ ├── clean-dependencies.sh
│ ├── quarkus-create-app.sh
│ └── quarkus-create-extension.sh
├── deployed-dependencies/ # Built extension artifacts
└── docs/ # Documentation
- Introduction
- Prerequisites
- How to use extensions?
- How to set up for extension development?
How to Create a Project ?How to run a service ?Postman Collection fileArchitecture Study CasePerformance Test
The extensions in this project are published to GitHub Packages. You can use them in your own Quarkus project without cloning this repo.
You need a Personal Access Token (PAT) to authenticate with GitHub Packages.
- Go to GitHub Settings > Developer settings > Personal access tokens > Tokens (classic)
- Click "Generate new token" > "Generate new token (classic)"
- Give it a descriptive name (e.g.
maven-packages-read) - Select the
read:packagesscope - Click "Generate token"
- Copy the token immediately — you won't be able to see it again
Add the following to your ~/.m2/settings.xml:
<settings>
<servers>
<server>
<id>github</id>
<username>YOUR_GITHUB_USERNAME</username>
<password>YOUR_GITHUB_PAT</password>
</server>
</servers>
</settings><repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/yanmastra/quarkus-keycloak</url>
</repository>
</repositories><!-- Base utilities (required by all other extensions) -->
<dependency>
<groupId>io.yanmastra</groupId>
<artifactId>quarkus-base</artifactId>
<version>4.1.0</version>
</dependency>
<!-- Keycloak authorization (bearer token + policy enforcement) -->
<dependency>
<groupId>io.yanmastra</groupId>
<artifactId>quarkus-authorization</artifactId>
<version>4.1.0</version>
</dependency>
<!-- JWT authentication (cannot be combined with quarkus-authorization) -->
<dependency>
<groupId>io.yanmastra</groupId>
<artifactId>quarkus-authentication</artifactId>
<version>4.1.0</version>
</dependency>
<!-- Auto-generated CRUD REST endpoints -->
<dependency>
<groupId>io.yanmastra</groupId>
<artifactId>quarkus-microservices-common</artifactId>
<version>4.1.0</version>
</dependency>
<!-- Error mail notification -->
<dependency>
<groupId>io.yanmastra</groupId>
<artifactId>quarkus-error-mail-notification</artifactId>
<version>4.1.0</version>
</dependency>Note:
quarkus-authenticationandquarkus-authorizationhave conflicting auth beans and cannot be used together in the same service.
To follow this guide, you need:
- Understand Java
- Understand Object Oriented Programming
- Understand Docker
- OpenJDK 21+ installed
- Apache Maven 3.9.6 or newer
- Docker
⚠️ Recommended to usesdkmanto install OpenJDK or GraalVM on your device
See this to installSDKMAN