Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

spring-modulith-verifier

/spring-modulith-verifier

Sprawdza, czy kod Spring Boot trzyma się struktury pakietów Spring Modulith, i wskazuje naruszenia z sugerowanymi poprawkami.

Licencja
MIT
Ostatnia zmiana repozytorium
12.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 12.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Sprawdza, czy kod Spring Boot trzyma się struktury pakietów Spring Modulith, i wskazuje naruszenia z sugerowanymi poprawkami.

Oryginalny opis (EN)

Verifies whether code follows Spring Modulith code structure or not. Show list of violations along with recommendations on how to fix them. Use this skill: * When reviewing Spring Boot applications which uses Spring Modulith * When verifying whether Spring Boot application code follows Spring Modulith package structure

Jak działa

SKILL.md bez nagłówków drugiego poziomu · 94 linii, 675 słów

Podgląd SKILL.md
---
name: spring-modulith-verifier
description: >
  Verifies whether code follows Spring Modulith code structure or not.
  Show list of violations along with recommendations on how to fix them.
  Use this skill:
    * When reviewing Spring Boot applications which uses Spring Modulith
    * When verifying whether Spring Boot application code follows Spring Modulith package structure
---

# Spring Modulith Verifier Skill

Use a **domain-driven, modular layout**: organize packages by **business modules**, not by technical layers.

### Recommended Example Package Structure

```
dev.sivalabs.projectname/
├── Application                      # Main Spring Boot entrypoint class
├── shared/                          # Cross-cutting concerns
│   ├── package-info.java
├── users/                           # Users module (bounded context)
│   ├── config/                      # Users module-specific config
│   ├── domain/                      # Domain logic
│   │   ├── models/                  # Domain models
│   │   │   ├── package-info.java
│   │   ├── exceptions/              # Domain custom Exception classes
│   │   │   ├── package-info.java
│   │   ├── {entities, repositories, mappers, services}
│   ├── api/                        # REST API layer
│   │   ├── {controllers, DTOs}      # REST controllers, Request, Response payload DTOs
│   └── UsersAPI.java                # Module's public API (facade)
│
├── catalog/                         # Catalog module
├── orders/                          # Orders module
└── config/                          # Global Configuration
    └── WebMvcConfig.java
    └── SecurityConfig.java
    └── WebSecurityConfig.java
    └── GlobalExceptionHandler.java
```

Explanation of the above package structure:

- **Application.java**: The main Spring Boot entry point class annotated with `@SpringBootApplication`. Contains the `main()` method that bootstraps the application.

- **shared/**: Contains cross-cutting concerns and utilities shared across multiple modules (e.g., common utilities, shared DTOs, base classes, custom annotations).

- **{module}/** (e.g., users/, catalog/, orders/): Each business module represents a bounded context and contains:

    - **config/**: Module-specific configuration classes annotated with `@Configuration` for beans, properties, or third-party integrations relevant only to this module.

    - **domain/**: Core business logic layer containing:
        - **models/**: Domain model classes (Command, Query objects, Enums, Value Objects, Result objects, etc) representing business concepts (not JPA entities). These are pure Java objects that encapsulate business rules.
        - **exceptions/**: Domain specific custom Exception classes.
        - **entities**: JPA entity classes annotated with `@Entity` that map to database tables. These should not be `public` to prevent direct instantiation and ensure encapsulation.
        - **repositories**: Spring Data JPA repository interfaces extending `JpaRepository` or `CrudRepository` for data access. These should not be `public`.
        - **mappers**: Mapper classes/interfaces (e.g., MapStruct mappers) for converting between entities, domain models, and DTOs. These should not be `public`.
        - **services**: Service classes annotated with `@Service` containing business logic, converting beans using mappers, transaction management, and orchestration of repository calls.

    - **api/**: REST API layer containing:
        - **controllers**: REST controller classes annotated with `@RestController` that handle HTTP requests, validate input, and delegate to services.
        - **DTOs**: Data Transfer Objects including request payloads (data coming from clients) and response payloads (data sent to clients).

    - **{Module}API.java**: A facade class that serves as the module's public API, delegating calls to services, exposing only what other modules should access while hiding internal implementation details.

- **config/**: Global application-wide configuration classes including:
    - **WebMvcConfig.java**: MVC configuration (CORS, interceptors, formatters).
    - **SecurityConfig.java**: Spring Security configuration for authentication and authorization.
    - **GlobalExceptionHandler.java**: Centralized exception handling using `@RestControllerAdvice` for consistent error responses.

### Visibility Modifiers

Default to **minimum necessary visibility**. Only expose what other modules or layers genuinely need.

| Component                | Class                       | Constructor     | Methods         |
|--------------------------|-----------------------------|-----------------|-----------------|
| Controller               | package-private             | package-private | package-private |
| Service                  | `public`                    | package-private | `public`        |
| Repository               | package-private (interface) | —               | —               |
| Entity                   | package-private             | protected       | `public`        |
| DTO / record             | `public` or package-private | —               | —               |
| Module API facade        | `public`                    | package-private | `public`        |
| Request/Response records | package-private             | —               | —               |
| Config/Exception handler | package-private             | —               | —               |


### Naming Conventions

| Type                  | Convention           | Example                                                     |
|-----------------------|----------------------|-------------------------------------------------------------|
| **Entities**          | `*Entity`            | `UserEntity`, `AddressEntity`                               |
| **Value Objects**     | Domain name (record) | `Email`, `UserCode`, `UserId`                               |
| **Commands**          | `*Cmd`               | `CreateUserCmd`, `UpdateAddressCmd`                         |
| **Command Response**  | `*Result`            | `LoginResult`, `RegistrationResult`                         |
| **DTOs**              | `*Dto`               | `UserDto`, `AddressDto`                                     |
| **HTTP Request**      | `*Request`           | `CreateUserRequest`, `CreateAddressRequest`                 |
| **HTTP Response**     | `*Response`          | `CreateUserResponse`, `CreateAddressResponse`               |
| **Repositories**      | `*Repository`        | `UserRepository`, `AddressBookRepository`                   |
| **Services**          | `*Service`           | `UserService`, `AddressBookService`                         |
| **Domain Exceptions** | `*Exception`         | `InvalidUserCreationException`, `UserCancellationException` |
| **Module API**        | `*API`               | `UsersAPI`                                                  |

Wersje

W bazie nie ma innych skilli o nazwie spring-modulith-verifier.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki 5c41260f1e90 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100spring-modulith
    Porządkuje monolit Spring Boot w moduły z Spring Modulith, z API modułów, regułami zależności i zdarzeniami.
  • 100spring-modulith
    Pomaga projektować moduły i weryfikować zależności w monolicie Spring Boot zgodnie ze Spring Modulith.
  • 100305-frameworks-spring-boot-modulith
    Projektuje i sprawdza modularne monolity w Spring Modulith: pakiety modułów, zależności, zdarzenia domenowe i testy modułów.
  • 80spring-boot-skill
    Buduje aplikacje Spring Boot 4.x: REST, JPA, Spring Modulith, Security i Thymeleaf, z testami i strukturą pakietów.
  • 100spring-modulith
    Wspiera architekturę modularną w Spring Modulith dla Spring Boot 3.x: struktura modułów, pakiety API i wewnętrzne, zdarzenia między modułami, testy modułów, dokumentacja i obserwowalność.
  • 100spring-boot-modulith
    Wspiera Spring Modulith 2.0 w Spring Boot 4: moduły aplikacji, @ApplicationModuleListener, testy Scenario API, granice modułów, eksport zdarzeń do Kafka i AMQP oraz modularny monolit.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.