Skip to content

lorival/quarkus-java-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quarkus Java Template Repository

This project is a template to develop reactive microservices using Quarkus with Java language and GitLab CI/CD.

Local develop environment expected before start

Getting started

View all CLI available commands:

make

Install all dependencies to local develop environment:

make install

Run the application in dev mode:

make run

Template structure, tools, patterns and good practices

Java

  • Java version: Java 17
    • Reason: Version 17 is the latest LTS and will be supported until at least 2029
  • Java SDK manager: SDKMan (installed by make install)
    • Reason: This manager support us to download, configure and change different Java SDKs easily using CLI
  • Java SDK: Eclipse Adoptium Temurin (installed by make install)
    • Reason: Open-source SDK for personal and enterprise development
  • Library to improve Java development: Lombok
    • Reason: To not spend time coding getters, setters, builders and constructors
  • Model Mapper ???

Core Tools and Frameworks

  • Microservice framework: Quarkus
    • Reason: Faster way to develop a reactive application based in market standards
  • Dependency management tool: Maven (Portable embeeded in this project)
    • Reason: Most used dependency management tool in the market
  • Reactive toolkit: Vert.x (Quarkus integrated)
    • Reason: Easy to learn, comprehensive end-to-end reactive toolkit already integrated with Quarkus

Development

  • RESTful Web service framework: RESTEasy reactive for Quarkus (manage by Maven)
    • Reason: It is an implementation of the Eclipse Foundation specification for RESTful WEB application for Java.

Database

  • RDBMS: PostgreSQL as Docker
    • Reason: Powerful database used in the market
  • RDBMS Console: PGAdmin as Docker
    • Reason: Default administration tool for PostgreSQL
  • Reactive RDBMS client: Quarkus PostgreSQL reactive
    • Reason: To be possible build a reactive connection with PostgreSQL

Tests

  • Test framework: Junit5 for Quarkus (manage by Maven)
    • Reason: The open-source framework for write tests for Java
  • Tool to test REST endpoints: RESTAssured (manage by Maven)
    • Reason: Powerful testing and validation library to test REST APIs in a fluent and simple way

Conventions

Best practices

  • Project modularization: Maven submodules
    • module api-specification: responsible for the definition of project APIs
    • module app: responsible for the implementation of project APIs
  • API-first strategy: REST API specification defined by Swagger editor following OpenAPI format
    • run $ make api-editor to open the current specification.yml file, from api-specification module, within the editor
    • after changes download the file and replace the current one in the repository
    • run $ make build to generate the Java interfaces to be implemented in app module
  • Make REST API available via Swagger-ui only for development environment and never for production
  • Liquibase ???

Roadmap

Current step - project

  • Standard readme
  • Add visual code evolution as DNA
  • Add commit rule checker
  • Add archunit
  • Implement metrics
  • add code coverage

Next step - tests

  • Implement tests with coverage validation
  • Have one profile per each type of test
  • Add acceptance criteria tests
  • Add Load and performance tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published