Monolith
pouryakit-monolith, the single-Module start that grows into the modular monolith when a second Module arrives.
What it is
pouryakit-monolith generates one Host with one Module's data and rules: the Proving Sample's Catalog and Catalog.Contracts, behind the Kit's HTTP pipeline, beside projects for its Reverse proxy and its service defaults and a smoke test. Its endpoints send through IDispatcher, and the Host registers Catalog on its own services with builder.Services.AddCatalog().
One Module in all but name
The monolith leaves out PouryaKit.Modularity, so the Host holds one Unit of Work: one Module's data. Its Operations name no Module, and its declarations belong to the application. A second Module is the modular monolith's composition.
When to use it
When the application starts with one business boundary. It is where a project of one Module starts, not a limit on it: the same Catalog code runs in the modular monolith.
Generate and run it
Generate it
dotnet new pouryakit-monolith -n Acme.ShopRun it
Your first Host starts PostgreSQL, migrates Catalog, creates a token, runs the Host and calls it.
Grow it when a second Module arrives
Add PouryaKit.Modularity and turn Catalog's Composition Root into an IModuleDefinition; Add a Module shows the path.
What it composes
| Stated in | |
|---|---|
Every Capability its projects reference, and no PouryaKit.Modularity | What each composition composes |
The same composition and startup checks as a Host of Modules, from AddPouryaKitCompositionChecks | What each composition composes |
| The files that change when Catalog becomes a Module | Growing the monolith |