Project – Modular Monolith
This project has the same building block as Chapter 18 and Chapter 19, but we use the Modular Monolith approach. On top of the previous versions, we leverage events to enable the shopping basket to validate the existence of a product before allowing customers to add it to their shopping basket.
The complete source code is available on GitHub: https://adpg.link/gyds.
The test projects in the solution are empty. They only exist for the organizational aspect of the solution. As an exercise, you can migrate the tests from Chapter 18 and adapt them to this new architectural style.
Let’s start with the communication piece.
Sending events from the catalog module
For the catalog to communicate the events that the basket module needs, it must define the following new operations:
- Create products
- Delete products
Here are the API contracts we must create in the Products.Contracts
project to support...