{"id":15024512,"url":"https://github.com/jufegare000/clea-architecture-utils","last_synced_at":"2025-10-25T17:12:30.863Z","repository":{"id":254614294,"uuid":"847039211","full_name":"jufegare000/clea-architecture-utils","owner":"jufegare000","description":"A concius implementation of how a java 21 clean architecture implementation should look like","archived":false,"fork":false,"pushed_at":"2025-02-23T16:29:13.000Z","size":165,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T01:51:14.303Z","etag":null,"topics":["clean-architecture","java21","springboot"],"latest_commit_sha":null,"homepage":"","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/jufegare000.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-24T17:11:03.000Z","updated_at":"2025-01-30T15:22:48.000Z","dependencies_parsed_at":"2024-08-24T19:27:37.053Z","dependency_job_id":"4cd9a327-cab8-4967-b4b4-371d2bfe5334","html_url":"https://github.com/jufegare000/clea-architecture-utils","commit_stats":null,"previous_names":["jufegare000/clea-architecture-utils"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jufegare000%2Fclea-architecture-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jufegare000%2Fclea-architecture-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jufegare000%2Fclea-architecture-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jufegare000%2Fclea-architecture-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jufegare000","download_url":"https://codeload.github.com/jufegare000/clea-architecture-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529473,"owners_count":21119519,"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":["clean-architecture","java21","springboot"],"created_at":"2024-09-24T20:00:28.283Z","updated_at":"2025-10-25T17:12:30.780Z","avatar_url":"https://github.com/jufegare000.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clea-architecture-utils\n\n# **Introduction**\nThis is a guided Java architecture sample that provides a reference for implementing a clean architecture in a Java application. You can replicate this approach in various projects without being concerned about specific frameworks, business logic, or concrete project requirements. This sample includes examples of a **REST Controller**, a Kafka Consumer and producer, AWS Lambda function implementations, and Spring Boot application environments.\n\n# Dependencies:\nSDK: Corretto-21.0.4.7.1\nGradle: gradle-8.5\n# **Project Structure**\nmy-app/\n```\n├── application\n│   └── src\n│       ├── main\n│       │   ├── java\n│       │   │   └── com\n│       │   │       └── clean_architecture_utils\n│       │   └── resources\n│       └── test\n│           ├── java\n│           └── resources\n├── domain\n│   ├── build\n│   │   ├── classes\n│   │   │   └── java\n│   │   │       └── main\n│   │   │           └── com\n│   │   │               └── clean_architecture_utils\n│   │   └── tmp\n│   │       └── compileJava\n│   └── src\n│       ├── main\n│       │   ├── java\n│       │   │   └── com\n│       │   │       └── clean_architecture_utils\n│       │   └── resources\n│       └── test\n│           ├── java\n│           └── resources\n├── gradle\n│   └── wrapper\n├── infrastructure\n│   ├── build\n│   │   ├── classes\n│   │   │   └── java\n│   │   │       └── main\n│   │   │           └── com\n│   │   │               └── clean_architecture_utils\n│   │   │                   └── spring\n│   │   │                       └── rest_controllers\n│   │   ├── resources\n│   │   │   └── main\n│   └── src\n│       ├── main\n│       │   ├── java\n│       │   │   └── com\n│       │   │       └── clean_architecture_utils\n│       │   │           ├── kafka\n│       │   │           └── spring\n│       │   │               └── rest_controllers\n│       │   └── resources\n│       └── test\n│           ├── java\n│           └── resources\n└── scripts\n    ├── examples\n    └── requests\n```\nEach layer in this application is separated into three main modules: _Infrastructure, Application, and Domain_. If you are familiar with clean architecture, you will recognize the logical structure of the implementation. If you have suggestions or improvements, feel free to fork the repository and submit a pull request. It's free!!!\n\nIf you are not familiar with this approach, I invite you to explore the project and share any questions or concerns you have about my design decisions. I will do my best to provide examples and explanations to help you understand.\n# **Implemented Modules**\n1. SpringBoot Application: You can find the Spring Configuration in the root package of the underlying directory `infrastructure/src/main/java/com/clean_architecture_utils/spring`\n\t1. RestController: This is an basic implementation, you can found in the infrastructure directory.\n# **Communication between layers**\n1. When we are dealing with clean architectures, there must to be a way to communicate layers, in this specific implementation the **RestController** must to go to a *service layer* and by the same token, the service must to go to the specific *use case*. Those three modules are placed in the tree specific layers respectively (infrastructure-\u003e application -\u003e domain).\n2. Quickly, we might be tempted to use the framework's details to perform the necessary dependency injections, but this could corrupt all project layers. Instead, we will use an *anticorruption layer* to deal with de respective dependency injection:\n3. In the path `java/com/clean_architecture_utils/spring/config/SpringConfiguration.java`, you will find a configuration bean that details the dependency injection setup and specifies the services used. This configuration facilitates the flow of dependencies from the controller to the use case and beyond.\n\n# **How to run applications?**\n1. SpringBoot Application:\n    1. Be aware of the application.properties is set with the port environment variable in the path: `/infrastructure/src/main/resources/application.properties` and set your preferable port, example `server.port=8080`\n    2. Run application using the following commands:\n        1. ` ./gradlew clean build`\n        2. ` java -jar infrastructure/build/libs/infrastructure.jar`\n\n    3. Test the rest controller: The following path `scripts/requests/check-service.sh` contains a shell script with a CURL that can be used for test the application once it is deployed:\n\n\n`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjufegare000%2Fclea-architecture-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjufegare000%2Fclea-architecture-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjufegare000%2Fclea-architecture-utils/lists"}