All Projects β†’ bancolombia β†’ scaffold-clean-architecture

bancolombia / scaffold-clean-architecture

Licence: Apache-2.0 license
Gradle plugin to create a clean application in Java that already works, It follows our best practices!

Programming Languages

java
68154 projects - #9 most used programming language
Mustache
554 projects

Projects that are alternatives of or similar to scaffold-clean-architecture

extjs-reactjs-examples
Code examples for ExtJS to React transition
Stars: ✭ 48 (-78.67%)
Mutual labels:  scaffolding
Unchase.Odata.Connectedservice
πŸ“œ A Visual Studio extension for connecting to OData services with generating client-side C# proxy-classes
Stars: ✭ 39 (-82.67%)
Mutual labels:  scaffolding
assemble-core
The core assemble application with no presets or defaults. All configuration is left to the implementor.
Stars: ✭ 17 (-92.44%)
Mutual labels:  scaffolding
opencart-project-template
OpenCart Project Template
Stars: ✭ 16 (-92.89%)
Mutual labels:  scaffolding
three-render-objects
Easy way to render ThreeJS objects with built-in interaction defaults
Stars: ✭ 33 (-85.33%)
Mutual labels:  scaffolding
Unchase.OpenAPI.Connectedservice
πŸ“œ Visual Studio extension to generate OpenAPI (Swagger) web service reference.
Stars: ✭ 69 (-69.33%)
Mutual labels:  scaffolding
fractal-starter-kit
Starter kit for Fractal with SCSS, Webpack, XO, sass-lint and Gulp
Stars: ✭ 22 (-90.22%)
Mutual labels:  scaffolding
damascus
βš”οΈ CRUD boilerplate generator for Liferay DXP
Stars: ✭ 51 (-77.33%)
Mutual labels:  scaffolding
preset
Elegant, ecosystem-agnostic preset mechanism
Stars: ✭ 132 (-41.33%)
Mutual labels:  scaffolding
janak
Your next vue.js package!
Stars: ✭ 26 (-88.44%)
Mutual labels:  scaffolding
redundans
Redundans is a pipeline that assists an assembly of heterozygous/polymorphic genomes.
Stars: ✭ 90 (-60%)
Mutual labels:  scaffolding
brush
An amazing scaffolding for developing database-driven websites, applications and APIs. Built on Laravel Lumen Framework, MySQL and Angular.
Stars: ✭ 23 (-89.78%)
Mutual labels:  scaffolding
react-scaffolder
⚑ Scaffolding tool for React
Stars: ✭ 43 (-80.89%)
Mutual labels:  scaffolding
orm
ORM with transaction scopes (UoW), repositories, in-memory mocking, hybrid databases, logical partitions, full database scaffolding, recursive relations, polymorphic relations, relations to interfaces (static analysis tools included)
Stars: ✭ 13 (-94.22%)
Mutual labels:  scaffolding
FOF3-Basic
A hello world type example for Akeeba F0F3 as a walkthrough for building a Joomla! component from the ground up.
Stars: ✭ 14 (-93.78%)
Mutual labels:  scaffolding
quick-skeleton
Simple tool for scaffolding
Stars: ✭ 23 (-89.78%)
Mutual labels:  scaffolding
android-conductor-boilerplate
Boilerplate code for ➑️ https://github.com/esafirm/generator-android-conductor
Stars: ✭ 13 (-94.22%)
Mutual labels:  scaffolding
dr scaffold
scaffold django rest apis like a champion πŸš€
Stars: ✭ 116 (-48.44%)
Mutual labels:  scaffolding
generator-stencil
Scaffolding tool πŸ”¨ for Stencil js applications
Stars: ✭ 16 (-92.89%)
Mutual labels:  scaffolding
cask-package-toolset.el
πŸ›  Toolsettize your emacs package! πŸ› 
Stars: ✭ 30 (-86.67%)
Mutual labels:  scaffolding

Quality Gate Status Maintainability Rating codecov GitHub license Scorecards supply-chain security

Scaffolding of Clean Architecture

Gradle plugin to create a java and kotlin application based on Clean Architecture following our best practices!

Plugin Implementation

To use the plugin you need Gradle version 6.9 or later, to start add the following section into your build.gradle file.

plugins {
    id "co.com.bancolombia.cleanArchitecture" version "2.4.3"
}

Or if is a new project execute this script in the root directory of your project.

echo "plugins {
    id \"co.com.bancolombia.cleanArchitecture\" version \"2.4.3\"
}" > build.gradle

To use the plugin you need Gradle version 6.9 or later, to start add the following section into your build.gradle.kts file.

plugins {
    id("co.com.bancolombia.cleanArchitecture") version "2.4.3"
}

Or if is a new project execute this script in the root directory of your project.

echo "plugins {
    id(\"co.com.bancolombia.cleanArchitecture\") version \"2.4.3\"
}" > build.gradle.kts

Tasks

The Scaffolding Clean Architecture plugin will allow you run 8 tasks:

Generate Project

The cleanArchitecture | ca task will generate a clean architecture structure in your project, this task has four optional parameters; package , type, name and coverage. If you run this task on an existing project it will override the main.gradle, build.gradle and gradle.properties files.

  • package = <package.we.need>: You can specify the main or default package of your project. Default Value = co.com.bancolombia

  • type = <imperative | reactive>: With this parameter the task will generate a POO project. Default Value = imperative

  • name = NameProject: This parameter is going to specify the name of the project. Default Value = cleanArchitecture

  • coverage = <jacoco | cobertura>: This parameter is going to specify the coverage tool for the project. Default Value = jacoco

  • lombok = <true | false>: Specify if you want to use this plugin . Default Value = true

  • metrics = <true | false>: Specify if you want to enable this feature with micrometer . Default Value = true

  • language = <JAVA | KOTLIN>: Specify if you want to use this plugin . Default Value = JAVA

  • javaVersion = <VERSION_1_8 | VERSION_11 | VERSION_17>: Java version . Default Value = VERSION_11

gradle cleanArchitecture --package=co.com.bancolombia --type=imperative --name=NameProject --coverage=jacoco --lombok=true
gradle ca --package=co.com.bancolombia --type=imperative --name=NameProject --coverage=jacoco --lombok=true

The structure will look like this for java:

πŸ“¦NameProject
┣ πŸ“‚applications
┃ β”— πŸ“‚app-service
┃ ┃ ┣ πŸ“‚src
┃ ┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ ┃ ┣ πŸ“‚java
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚config
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œ[configs and beans]
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œMainApplication.java
┃ ┃ ┃ ┃ β”— πŸ“‚resources
┃ ┃ ┃ ┃ ┃ ┣ πŸ“œ[properties]
┃ ┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ β”— πŸ“œbuild.gradle
┣ πŸ“‚deployment
┃ ┣ πŸ“œ[Dockerfile, Pipelines as a code]
┣ πŸ“‚domain
┃ ┣ πŸ“‚model
┃ ┃ ┣ πŸ“‚src
┃ ┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ β”— πŸ“œbuild.gradle
┃ β”— πŸ“‚usecase
┃ ┃ ┣ πŸ“‚src
┃ ┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚usecase
┃ ┃ β”— πŸ“œbuild.gradle
┣ πŸ“‚infrastructure
┃ ┣ πŸ“‚driven-adapters
┃ ┣ πŸ“‚entry-points
┃ β”— πŸ“‚helpers
┣ πŸ“œ.gitignore
┣ πŸ“œbuild.gradle
┣ πŸ“œgradle.properties
┣ πŸ“œlombok.config
┣ πŸ“œmain.gradle
┣ πŸ“œREADME.md
β”— πŸ“œsettings.gradle

The structure will look like this for kotlin:

πŸ“¦NameProject
┣ πŸ“‚applications
┃ β”— πŸ“‚app-service
┃ ┃ ┣ πŸ“‚src
┃ ┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ ┃ ┣ πŸ“‚kotlin
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚config
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œ[configs and beans]
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œMainApplication.kt
┃ ┃ ┃ ┃ β”— πŸ“‚resources
┃ ┃ ┃ ┃ ┃ ┣ πŸ“œ[properties]
┃ ┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ ┃ β”— πŸ“‚kotlin
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ β”— πŸ“œbuild.gradle.kts
┣ πŸ“‚deployment
┃ ┣ πŸ“œ[Dockerfile, Pipelines as a code]
┣ πŸ“‚domain
┃ ┣ πŸ“‚model
┃ ┃ ┣ πŸ“‚src
┃ ┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ ┃ β”— πŸ“‚kotlin
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ ┃ β”— πŸ“‚kotlin
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ β”— πŸ“œbuild.gradle.kts
┃ β”— πŸ“‚usecase
┃ ┃ ┣ πŸ“‚src
┃ ┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ ┃ β”— πŸ“‚kotlin
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ ┃ β”— πŸ“‚kotlin
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚usecase
┃ ┃ β”— πŸ“œbuild.gradle.kts
┣ πŸ“‚infrastructure
┃ ┣ πŸ“‚driven-adapters
┃ ┣ πŸ“‚entry-points
┃ β”— πŸ“‚helpers
┣ πŸ“œ.gitignore
┣ πŸ“œbuild.gradle.kts
┣ πŸ“œgradle.properties
┣ πŸ“œlombok.config
┣ πŸ“œREADME.md
β”— πŸ“œsettings.gradle.kts

Generate Model for Java and Kotlin

The generateModel | gm task will generate a class and interface in model layer, this task has one required parameter name.

   gradle generateModel --name=[modelName]
   gradle gm --name [modelName]

This task will generate something like that:

πŸ“¦domain
┣ πŸ“‚model
┃ ┣ πŸ“‚src
┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚model
┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚gateways
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œModelRepository.java
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œModel.java
┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚model
┃ β”— πŸ“œbuild.gradle

This task will generate something like that for kotlin:

πŸ“¦domain
┣ πŸ“‚model
┃ ┣ πŸ“‚src
┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ β”— πŸ“‚kotlin
┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚model
┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚gateways
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œModelRepository.kt
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œModel.kt
┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ β”— πŸ“‚kotlin
┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚model
┃ β”— πŸ“œbuild.gradle.kts

Generate Use Case for Java and Kotlin

The generateUseCase | guc task will generate a class in model layer, this task has one required parameter name.

   gradle generateUseCase --name=[useCaseName]
   gradle guc --name [useCaseName]

This task will generate something like that:

πŸ“¦domain
β”— πŸ“‚usecase
┃ ┣ πŸ“‚src
┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚usecase
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚business
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œBusinessUseCase.java
┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚usecase
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚business
┃ β”— πŸ“œbuild.gradle

This task will generate something like that for kotlin:

πŸ“¦domain
β”— πŸ“‚usecase
┃ ┣ πŸ“‚src
┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ β”— πŸ“‚kotlin
┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚usecase
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚business
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œBusinessUseCase.kt
┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ β”— πŸ“‚kotlin
┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚usecase
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚business
┃ β”— πŸ“œbuild.gradle.kts

Generate Driven Adapter

The generateDrivenAdapter | gda task will generate a module in Infrastructure layer, this task has one required parameter type.
Whether you'll use generic one also parameter name is required.

   gradle generateDrivenAdapter --type=[drivenAdapterType]
   gradle gda --type [drivenAdapterType]
Reference for drivenAdapterType Name Additional Options Java Kotlin
generic Empty Driven Adapter --name [name] β˜‘ β˜‘
jpa JPA Repository --secret [true-false] β˜‘ β˜‘
mongodb Mongo Repository --secret [true-false] β˜‘ β˜‘
asynceventbus Async Event Bus β˜‘ β˜‘
restconsumer Rest Client Consumer --url [url] β˜‘ β˜‘
redis Redis --mode [template-repository] --secret [true-false] β˜‘ β˜‘
rsocket RSocket Requester β˜‘ β˜‘
r2dbc R2dbc Postgresql Client β˜‘ β˜‘
kms AWS Key Management Service β˜‘ β˜‘
secrets Secrets Manager Bancolombia β˜‘ β˜‘
s3 AWS Simple Storage Service β˜‘ β˜‘
mq JMS MQ Client to send messages β˜‘ β˜‘
ktor HTTP client for kotlin ☐ β˜‘
dynamodb Dynamo DB adapter β˜‘ β˜‘
sqs SQS message sender β˜‘ β˜‘

This task will generate something like that:

πŸ“¦infrastructure
┣ πŸ“‚driven-adapters
┃ β”— πŸ“‚jpa-repository
┃ ┃ ┣ πŸ“‚src
┃ ┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚jpa
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚config
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œDBSecret.java
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚helper
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œAdapterOperations.java
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“œJPARepository.java
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œJPARepositoryAdapter.java
┃ ┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚jpa
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚helper
┃ ┃ β”— πŸ“œbuild.gradle

Generate Entry Point

The generateEntryPoint | gep task will generate a module in Infrastructure layer, this task has one required parameter type.
Whether you'll use generic one also parameter name is required.

gradle generateEntryPoint --type=[entryPointType]
gradle gep --type [entryPointType]
Reference for entryPointType Name Additional Options Java Kotlin
generic Empty Entry Point --name [name] β˜‘ β˜‘
restmvc API REST (Spring Boot Starter Web) --server [serverOption] default undertow β˜‘ β˜‘
webflux API REST (Spring Boot Starter WebFlux) --router [true, false] default true β˜‘ β˜‘
rsocket Rsocket Controller Entry Point β˜‘ β˜‘
graphql API GraphQL --pathgql [name path] default /graphql β˜‘ β˜‘
asynceventhandler Async Event Handler β˜‘ β˜‘
mq JMS MQ Client to listen messages β˜‘ β˜‘
sqs SQS Listener β˜‘ β˜‘

Additionally, if you'll use a restmvc, you can specify the web server on which the application will run. By default, undertow.

   gradle generateEntryPoint --type=restmvc --server=[serverOption]
   gradle gep --type=restmvc --server=[serverOption]
Reference for serverOption Name
undertow Undertow server (default)
tomcat Tomcat server
jetty Jetty server

This task will generate something like that:

πŸ“¦infrastructure
┣ πŸ“‚entry-points
┃ β”— πŸ“‚generic
┃ ┃ ┣ πŸ“‚src
┃ ┃ ┃ ┣ πŸ“‚main
┃ ┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚generic
┃ ┃ ┃ β”— πŸ“‚test
┃ ┃ ┃ ┃ β”— πŸ“‚java
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚[package]
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚generic
┃ ┃ β”— πŸ“œbuild.gradle

Generate Helper

The generateHelper | gh task will generate a module in Infrastructure layer, this task has one required parameter name.

   gradle generateHelper --name=[helperName]
   gradle gh --name=[helperName]

Generate Pipeline

The generatePipeline | gpl task will generate CI pipeline inside the folder "./deployment/", this task has one required parameter type.

   gradle generatePipeline --type=[pipelineType]
   gradle gpl --type=[pipelineType]
Reference for pipelineType Name
azure Azure Pipeline
github GitHub Action
jenkins Jenkins Pipeline
circleci CircleCI Pipeline

Generate Acceptance Test

The generateAcceptanceTest | gat task will generate subproject by karate framework inside the folder "./deployment/",this task does not have required parameters.

      gradle generateAcceptanceTest
      gradle gat 

Karate is an open-source tool to combine API test-automation, mocks, performance-testing and even UI automation into a single, unified framework. The BDD syntax popularized by Cucumber is language-neutral, and easy for even non-programmers. Assertions and HTML reports are built-in, and you can run tests in parallel for speed.

Validate Structure

The validateStructure | vs Validate that project references aren't violated.

   gradle validateStructure
   gradle vs

Delete Module

The deleteModule | dm task will delete a sub project, this task has one required parameter module.

   gradle deleteModule --module=[name]
   gradle dm --module=[name]




Update Project

The updateCleanArchitecture | u task will update plugin and dependencies in all sub projects, this task has one optional parameter dependencies if you only want to update some dependencies the dependency need to contain the group, and the artifact for example for the dependency cleanArchitecture you will need to append co.com.bancolombia:cleanArchitecture. It also updates the spring, lombok, gradle and some other dependencies according to the plugin version that you are using, ocassionally it could make changes in other project structural files. We recommend that you commit your changes to git before running this command, but you can skip the verification passing --git false.

   gradle updateCleanArchitecture --dependencies=[dependency1, dependency2, ...]
   gradle u --dependencies=[dependency1, dependency2, ...]

How can I help?

Review the issues, we hear new ideas. Read more Contributing



Whats Next?

Read more About Clean Architecure

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].