Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
joaquimscosta avatar

Spring Boot Modulith

  • 2 installs
  • 21 repo stars
  • Updated August 5, 2026
  • joaquimscosta/arkhe-claude-plugins

Implements Spring Modulith 2.0 bounded contexts in Spring Boot 4 with package-based modules, event-driven communication, and enforced boundaries.

About

Structures a Spring Boot 4 modular monolith into bounded contexts using package-based application modules, @ApplicationModuleListener events, and enforced boundaries. A developer uses it to organize DDD modules and test them with the Scenario API.

  • Package-based module boundaries as bounded contexts
  • Event externalization to Kafka/AMQP and Scenario API testing

Spring Boot Modulith by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #77 of 89 Java & JVM skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/joaquimscosta/arkhe-claude-plugins --skill spring-boot-modulith

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2
repo stars21
Last updatedAugust 5, 2026
Repositoryjoaquimscosta/arkhe-claude-plugins

What it does

Implements Spring Modulith 2.0 bounded contexts in Spring Boot 4 with package-based modules, event-driven communication, and enforced boundaries.

Files

SKILL.mdMarkdownGitHub ↗

Spring Modulith for Bounded Contexts

Implements DDD bounded contexts as application modules with enforced boundaries and event-driven communication.

Core Concepts

ConceptDescription
Application ModulePackage-based boundary = bounded context
Module APITypes in base package (public)
InternalTypes in sub-packages (encapsulated)
EventsCross-module communication mechanism

Module Structure

src/main/java/
├── com.example/
│   └── Application.java              ← @SpringBootApplication
├── com.example.order/                ← Module: order
│   ├── OrderService.java             ← Public API
│   ├── OrderCreated.java             ← Public event
│   ├── package-info.java             ← @ApplicationModule config
│   └── internal/                     ← Encapsulated
│       ├── OrderRepository.java
│       └── OrderEntity.java
├── com.example.inventory/            ← Module: inventory
│   ├── InventoryService.java
│   └── internal/
└── com.example.shipping/             ← Module: shipping

Types in com.example.order = public API Types in com.example.order.internal = hidden from other modules

Quick Patterns

See EXAMPLES.md for complete working examples including:

  • Module Configuration with @ApplicationModule
  • Event Publishing with domain event records
  • Event Handling with @ApplicationModuleListener (Java + Kotlin)
  • Module Verification Test with PlantUML generation
  • Event Externalization for Kafka/AMQP

Spring Boot 4 / Modulith 2.0 Specifics

  • @ApplicationModuleListener combines @Async + @Transactional(REQUIRES_NEW) + @TransactionalEventListener(AFTER_COMMIT)
  • Event Externalization with @Externalized annotation for Kafka/AMQP
  • JDBC event log ensures at-least-once delivery

Detailed References

  • Examples: See EXAMPLES.md for complete working code examples
  • Troubleshooting: See TROUBLESHOOTING.md for common issues and Boot 4 migration
  • Workflow: See WORKFLOW.md for detailed step-by-step Modulith setup
  • Module Structure: See references/MODULE-STRUCTURE.md for package conventions, named interfaces, dependency rules
  • Event Patterns: See references/EVENTS.md for publishing, handling, externalization, testing with Scenario API

Related Skills

NeedSkill
DDD conceptsdomain-driven-design
Data layer per modulespring-boot-data-ddd
Module event testingspring-boot-testing
REST APIs for modulesspring-boot-web-api

Anti-Pattern Checklist

Anti-PatternFix
Direct bean injection across modulesUse events or expose API
Synchronous cross-module callsUse @ApplicationModuleListener
Module dependencies not declaredAdd allowedDependencies in @ApplicationModule
Missing verification testAdd ApplicationModules.verify() test
Internal types in public APIMove to .internal sub-package
Events without dataInclude all data handlers need

Critical Reminders

1. One module = one bounded context — Mirror DDD boundaries 2. Events are the integration mechanism — Not direct method calls 3. Verify in CIApplicationModules.verify() catches boundary violations 4. Reference by ID — Never direct object references across modules 5. Transaction per module@ApplicationModuleListener ensures isolation

Related skills

Java & JVMbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.