PouryaKit
Templates

Choose a template

Three compositions of the same business code, a monolith, a modular monolith and a service, and what sets them apart.

What they are

PouryaKit.Templates holds three Project templates. Each starts a new application from the Proving Sample's business code; they differ only in how that code is composed into a Host.

The same business code in every template

Moving from one composition to another leaves the business code as it is: What each composition composes.

When to use each

TemplateShort nameChoose it when
Monolithpouryakit-monolithYou start with one Module and no need for Modularity yet
Modular monolithpouryakit-modular-monolithYou have, or soon will have, several Modules in one Host
Servicepouryakit-serviceOne Module runs in a Host of its own and receives another Host's Integration Events and Snapshots over RabbitMQ

Template choice walks through the questions that decide it.

Install and generate

Install the template package

Terminal
dotnet new install PouryaKit.Templates@0.1.0-preview.2

Generate the one you chose

Terminal
dotnet new pouryakit-monolith -n Acme.Shop
dotnet new pouryakit-modular-monolith -n Acme.Shop
dotnet new pouryakit-service -n Acme.Stock

What every template holds

Stated in
The Host's composition and startup checks, the same in eachWhat each composition composes
A smoke test that hosts the generated Host against PostgreSQL in a containerThe smoke test
The service defaults recipes, as the application's own codeThe optional recipes
Every Kit package pinned at the template package's versionInstall and generate

Next steps

On this page