This project is a practical implementation of Domain-Driven Design (DDD) principles using Spring Boot. It serves as a companion to a DDD course, demonstrating how to build a modular, scalable, and maintainable application.
- Modular Architecture: The project is divided into
backoffice,mooc, andsharedmodules, each with a specific responsibility. - Domain-Driven Design: The codebase is structured around the principles of DDD, with a clear separation of layers (domain, application, infrastructure).
- Spring Boot: The application is built on top of the Spring Boot framework, providing a robust and efficient development experience.
- Docker Compose: The project uses Docker Compose to manage the required services (MySQL and RabbitMQ), making it easy to set up and run.
- Java 24
- Spring Boot
- Gradle
- MySQL
- RabbitMQ
- Docker
-
Clone the repository:
git clone https://github.com/maalayat/spring-java-ddd.git cd spring-java-ddd -
Start the services:
docker compose up -d
-
Build the project:
make build
The project is organized into the following modules:
app: The main application module, responsible for starting the Spring Boot application.backoffice: Contains the backoffice-related domain logic and infrastructure.mooc: Contains the Massive Open Online Course (MOOC) related domain logic and infrastructure.shared: Contains the shared kernel logic, including the domain and infrastructure layers.
To run the application, you can use the following command:
make runTo run the tests, you can use the following command:
make testContributions, issues, and feature requests are welcome! Feel free to check the issues page.
Give a ⭐️ if this project helped you!
This project is MIT licensed.