One-click install
npx skills add https://github.com/dprice-dev/claude-java-skills --skill spring-modulith-dprice-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spring-modulith
Source: https://github.com/dprice-dev/claude-java-skills/tree/main/.claude/skills/spring-modulith
Command: npx skills add https://github.com/dprice-dev/claude-java-skills --skill spring-modulith-dprice-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Spring Modulith patterns prevent unwanted coupling in a modular monolith by enforcing clear module boundaries and enabling reliable, decoupled event-driven communication.

Core Features & Use Cases

  • Module boundary verification: Detects illegal cross-module internal access and helps maintain a clean package structure as the codebase evolves.
  • Event-driven inter-module communication: Publishes domain events from one module and consumes them in another using ApplicationModuleListener.
  • Module-focused integration testing: Tests a single module in isolation with an application-module test harness to verify event publication and behavior.

Quick Start

Use the spring-modulith skill to design and document your module boundaries and set up ApplicationModuleListener-based domain events between modules in a modular monolith.

Frequently Asked Questions about spring-modulith

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce module boundaries in a Spring modular monolith?

Enforcing module boundaries in a Spring modular monolith involves defining public versus internal packages and verifying access rules using ArchUnit-style Spring Modulith test utilities. This prevents illegal cross-module internal access and maintains a clean package structure.

How do I replace direct service calls with application events in Spring?

Replacing direct service calls with application events in Spring requires publishing domain events from one module and consuming them in another using ApplicationModuleListener. This decouples inter-module communication and enables reliable event-driven architecture.

How do I test module integration and event publication in isolation?

Testing module integration and event publication in isolation uses a Spring Modulith application-module test harness to verify a single module's behavior. This validates inter-module domain event publication without needing to load the entire monolith.

What is the best way to structure bounded contexts in a Spring application?

Structuring bounded contexts in a Spring application is best achieved by establishing safe modular monolith architecture with clear module boundaries. This isolates internal packages and replaces direct service calls with application events for decoupled communication.

Does Spring Modulith support reliable event publication storage?

Spring Modulith supports reliable event publication storage by ensuring domain events published from a module are reliably persisted before consumption. This guarantees event-driven communication is completed even across transactional boundaries.

When do I need ArchUnit verification for Spring module boundaries?

ArchUnit verification for Spring module boundaries is needed when structuring bounded contexts to detect illegal cross-module internal access. It helps maintain a clean package structure as the codebase evolves and prevents unwanted coupling.