Decision guides
Template choice
The questions that decide between the monolith, the modular monolith and the service.
What it decides
Which of the three Project templates a new application starts from. Choose a template describes each one; this guide is the order to ask the questions in.
A choice you can change later
Every template generates the same business code. The monolith grows into the modular monolith by changing a few files, and a Module of the modular monolith moves into a Host of its own as the service. Pick for today, not for the largest shape you can imagine.
The questions
| Question | If yes | If no |
|---|---|---|
| Will one Module run in a process of its own and receive another Host's Integration Events? | The service | Keep asking |
| Does the application already have, or soon need, a second Module? | The modular monolith | The monolith |
| Do you need Streams or the AI Capability from the first day? | The modular monolith, which composes both | The monolith is enough |
What each one composes
| Template | Composes |
|---|---|
| Monolith | Catalog alone, on the Host's own services, without PouryaKit.Modularity |
| Modular monolith | Catalog, Billing, Inventory and Ledger, with Streams and AI |
| Service | Inventory alone, always on its RabbitMQ broker, with fewer Capabilities than the other two |
What each composition composes has the full table.
Generate it
dotnet new pouryakit-monolith -n Acme.Shop
dotnet new pouryakit-modular-monolith -n Acme.Shop
dotnet new pouryakit-service -n Acme.Stock