{"id":25776978,"url":"https://github.com/enofex/taikai","last_synced_at":"2026-05-10T11:12:57.256Z","repository":{"id":243097887,"uuid":"808551634","full_name":"enofex/taikai","owner":"enofex","description":"Taikai is an extension of the popular ArchUnit library, offering a comprehensive suite of predefined rules tailored for various technologies.","archived":false,"fork":false,"pushed_at":"2025-02-22T05:58:47.000Z","size":1049,"stargazers_count":130,"open_issues_count":2,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-22T06:27:54.745Z","etag":null,"topics":["architecture-tests","archunit","java","junit5","logging","spring","spring-boot","testing"],"latest_commit_sha":null,"homepage":"https://enofex.github.io/taikai","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/enofex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":["mnhock"]}},"created_at":"2024-05-31T09:56:25.000Z","updated_at":"2025-02-22T05:58:44.000Z","dependencies_parsed_at":"2024-06-27T20:30:50.231Z","dependency_job_id":"69df5086-9024-4d93-b21e-18314526650a","html_url":"https://github.com/enofex/taikai","commit_stats":null,"previous_names":["enofex/taikai"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enofex%2Ftaikai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enofex%2Ftaikai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enofex%2Ftaikai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enofex%2Ftaikai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enofex","download_url":"https://codeload.github.com/enofex/taikai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240987435,"owners_count":19889335,"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":["architecture-tests","archunit","java","junit5","logging","spring","spring-boot","testing"],"created_at":"2025-02-27T06:01:33.713Z","updated_at":"2026-03-01T08:04:32.953Z","avatar_url":"https://github.com/enofex.png","language":"Java","funding_links":["https://github.com/sponsors/mnhock"],"categories":["测试","\u003ca name=\"Java\"\u003e\u003c/a\u003eJava"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/assets/images/taikai-logo-dark.png\"\n        height=\"150\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/enofex/taikai/actions/workflows/maven.yml/badge.svg\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Java%20Version-17-orange\" /\u003e\n    \u003cimg height=\"20\" src=\"https://sonarcloud.io/images/project_badges/sonarcloud-orange.svg\"\u003e\n\u003c/p\u003e\n\n# Taikai\n\nTaikai extends the capabilities of the popular ArchUnit library by offering a comprehensive suite of predefined rules tailored for various technologies. It simplifies the enforcement of architectural constraints and best practices in your codebase, ensuring consistency and quality across your projects.\n\n## Maven Usage\n\nAdd Taikai as a dependency in your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.enofex\u003c/groupId\u003e\n  \u003cartifactId\u003etaikai\u003c/artifactId\u003e\n  \u003cversion\u003e${taikai.version}\u003c/version\u003e\n  \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nReplace `${taikai.version}` with the appropriate version defined in your project. Ensure that the required dependencies like ArchUnit are already declared.\n\n## Gradle Usage\n\nAdd Taikai as a dependency in your `build.gradle` file:\n\n```groovy\ntestImplementation \"com.enofex:taikai:${taikaiVersion}\"\n```\n\nReplace `${taikaiVersion}` with the appropriate version defined in your project. Ensure that the required dependencies like ArchUnit are already declared.\n\n## JUnit Example Test\n\nHere's an example demonstrating the usage of some Taikai rules with JUnit. Customize rules as needed using `TaikaiRule.of()`.\n\n```java\n@Test\nvoid shouldFulfillConstraints() {\n  Taikai.builder()\n      .namespace(\"com.enofex.taikai\")\n      .java(java -\u003e java\n          .noUsageOfDeprecatedAPIs()\n          .methodsShouldNotDeclareGenericExceptions()\n          .utilityClassesShouldBeFinalAndHavePrivateConstructor()\n          .imports(imports -\u003e imports\n              .shouldHaveNoCycles()\n              .shouldNotImport(\"..internal..\"))\n          .naming(naming -\u003e naming\n              .classesShouldNotMatch(\".*Impl\")\n              .methodsShouldNotMatch(\"^(foo$|bar$).*\")\n              .fieldsShouldNotMatch(\".*(List|Set|Map)$\")\n              .fieldsShouldMatch(\"com.enofex.taikai.Matcher\", \"matcher\")\n              .constantsShouldFollowConventions()\n              .interfacesShouldNotHavePrefixI()))\n      .logging(logging -\u003e logging\n          .loggersShouldFollowConventions(Logger.class, \"logger\", List.of(PRIVATE, FINAL)))      \n      .test(test -\u003e test\n          .junit(junit -\u003e junit\n              .classesShouldNotBeAnnotatedWithDisabled()\n              .methodsShouldNotBeAnnotatedWithDisabled()))\n      .spring(spring -\u003e spring\n          .noAutowiredFields()\n          .boot(boot -\u003e boot\n              .applicationClassShouldResideInPackage(\"com.enofex.taikai\"))\n          .configurations(configuration -\u003e configuration\n              .namesShouldEndWithConfiguration())\n          .controllers(controllers -\u003e controllers\n              .shouldBeAnnotatedWithRestController()\n              .namesShouldEndWithController()\n              .shouldNotDependOnOtherControllers()\n              .shouldBePackagePrivate())\n          .services(services -\u003e services\n              .shouldBeAnnotatedWithService()\n              .shouldNotDependOnControllers()\n              .namesShouldEndWithService())\n          .repositories(repositories -\u003e repositories\n              .shouldBeAnnotatedWithRepository()\n              .shouldNotDependOnServices()\n              .namesShouldEndWithRepository()))      \n      .addRule(TaikaiRule.of(...)) // Add custom ArchUnit rule here\n      .build()\n      .checkAll();\n}\n```\n\n## User Guide\n\nExplore the complete [documentation](https://enofex.github.io/taikai) for comprehensive information on all available rules.\n\n## Contributing\n\nInterested in contributing? Check out our [Contribution Guidelines](https://github.com/enofex/taikai/blob/main/CONTRIBUTING.md) for details on how to get involved. Note, that we expect everyone to follow the [Code of Conduct](https://github.com/enofex/taikai/blob/main/CODE_OF_CONDUCT.md).\n\n### What you will need\n\n* Git\n* Java 17 or higher\n\n### Get the Source Code\n\nClone the repository\n\n```shell\ngit clone git@github.com:enofex/taikai.git\ncd taikai\n```\n\n### Build the code\n\nTo compile, test, and build\n\n```shell\n./mvnw clean package -B\n```\n\n## Backers\n\nThe Open Source Community\n\n\u003cbr\u003e\n\u003ca href=\"https://github.com/enofex/taikai/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=enofex/taikai\" /\u003e\n\u003c/a\u003e\n\u003cbr\u003e\n\n## Website\n\nVisit the [Taikai](https://enofex.github.io/taikai/) Website for general information and documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenofex%2Ftaikai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenofex%2Ftaikai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenofex%2Ftaikai/lists"}