Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

spring-modular-monolith

> 后端框架
Open source

A modular monolith application built with Spring Modulith

187 stars0 likes2 views
WebsiteGitHub

About

A modular monolith application built with Spring Modulith

spring-modular-monolith

An e-commerce application following Modular Monolith architecture using Spring Modulith. The goal of this application is to demonstrate various features of Spring Modulith with a practical application.

This application follows modular monolith architecture with the following modules:

  • Common: This module contains the code that is shared by all modules.
  • Catalog: This module manages the catalog of products and stores data in catalog schema.
  • Orders: This module implements the order management and stores the data in orders schema.
  • Inventory: This module implements the inventory management and stores the data in inventory schema.
  • Notifications: This module handles the events published by other modules and sends notifications to the interested parties.

Goals:

  • Implement each module as independently as possible.
  • Prefer event-driven communication to direct module dependency wherever applicable.
  • Store data managed by each module in an isolated manner by using different schema or database.
  • Each module should be testable by loading only module-specific components.

Module communication:

  • Common module is an OPEN module that can be used by other modules.
  • Orders module invokes the Catalog module public API to validate the order details
  • When an Order is successfully created, the Orders module publishes "OrderCreatedEvent"
  • The "OrderCreatedEvent" will also be published to external broker like RabbitMQ. Other applications may consume and process those events.
  • Inventory module consumes "OrderCreatedEvent" and updates the stock level for the products.
  • Notifications module consumes "OrderCreatedEvent" and sends an order confirmation email to the customer.

Prerequisites

  • JDK 25
  • Docker and Docker Compose
  • Your favourite IDE (Recommended: IntelliJ IDEA)

Follow the Installation Guide to install the required tools.

Verify the prerequisites:

bash
$ java -version
$ docker info
$ docker compose version
$ task --version

Using task to perform various tasks:

bash
$ task test // runs all tests

$ task format // formats java code using spotless

$ task build_image // builds docker image

$ task start // starts app using docker compose
$ task stop
$ task restart
  • Application URL: http://localhost:8080
  • Actuator URL: http://localhost:8080/actuator
  • Actuator URL for modulith: http://localhost:8080/actuator/modulith
  • RabbitMQ Admin URL: http://localhost:15672 (Credentials: guest/guest)
  • Grafana URL: http://localhost:3000

Deploying on k8s cluster

Set up a Kind cluster following Installation Guide

bash
# deploy app to kind cluster 
$ task k8s_deploy

# undeploy app
$ task k8s_undeploy
  • Application URL: http://localhost:30090
  • RabbitMQ Admin URL: http://localhost:30091 (Credentials: guest/guest)
  • Grafana URL: http://localhost:30092

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javajavaspring-bootspring-modulith

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架