archunit-rules

Installation
SKILL.md

ArchUnit rules

Default rule set (greenfield)

These rules assume package-by-feature (see spring-boot-4-conventions): each top-level package under the application root is a feature/domain. All classes live directly in com.example.shop.<feature>, with optional sub-packages (repository, service, controller, dto) added only when a feature grows large enough to warrant splitting. There are no top-level controller / service / repository packages.

Place these in src/test/java/.../arch/ArchitectureTest.java:

@AnalyzeClasses(packages = "com.example.shop", importOptions = ImportOption.DoNotIncludeTests.class)
class ArchitectureTest {
Installs
1
GitHub Stars
4
First Seen
Jun 20, 2026
archunit-rules — loiane/sdd-spring-angular-example