Skip to content

TemplateCatalogHost

Target

This page describes intended behaviour or structure. No implementation is claimed unless a section is explicitly marked Current implementation or Evidence.

Bounded context BC-14 Template Catalog
Platform / plane Template & Library / Software Factory pack
Deployment granularity standalone host
Status target · ConnectSoft.Factory.Templates
Built from connectsoft-microservice · libraries: connectsoft-extensions-saas-abstractions, connectsoft-extensions-saas-asp-net-core, connectsoft-extensions-messaging-model, connectsoft-extensions-messaging-model-orleans, connectsoft-extensions-persistence-model-nhibernate, connectsoft-extensions-observability
Decisions ADR-0012, ADR-0014, ADR-0021
Traceability FR-02 FR-03 FR-06 FUX-01 FUX-03 NFR-11 NFR-13 XL-03 XL-07

Purpose and responsibilities

TemplateCatalogHost composes BlueprintService (BC-02), TemplateRegistryService (BC-14) and GenerationRecipeService (BC-15). It is the Software Factory pack's knowledge of what can be built and from what: the blueprint family as validated documents, the 43 ConnectSoft templates and ~125 libraries as pinned, versioned manifests with a compatibility matrix backed by evidence, and the recipe that binds a blueprint to template versions and records exactly which run generated which files. The host reads template repositories and package feeds through connectors, publishes blueprints and templates as asset releases through Asset Publication, and serves agents during generation runs.

Generation itself is a Factory run: agents execute the approved recipe with the sandbox and change-proposal tools; the scaffold engine as a service stays later and optional (ADR-0025).

Context and boundaries

flowchart LR
    S["TemplateCatalogHost"]
    StudioBff["StudioBff"] -->|sync-http| S
    AgentRuntimeWorker["AgentRuntimeWorker"] -->|grpc| S
    S -->|grpc| ControlPlaneApi["ControlPlaneApi"]
    S -->|grpc| KnowledgeHost["KnowledgeHost"]
    S -->|sync-http| ext_azure_devops["ext-azure-devops"]
    S -->|grpc| GovernanceHost["GovernanceHost"]
    S -->|sync-http| ext_identity_platform["ext-identity-platform"]
Hold "Alt" / "Option" to enable pan & zoom

The design-time truth of this platform is also in this site: model/templates.yaml, model/libraries.yaml and the generated template and library catalogs (L1). The host is their runtime counterpart, discovered from the repositories rather than hand-written.

Domain model

None modelled

No aggregates are modelled for this item yet.

No entities modelled.

Entities and value objects

None modelled

No entities or value objects are modelled for this item yet.

Data model and storage

Store Role Engine / profile Tables
Template & Library store primary azure-sql / nhibernate-sqlserver —

None modelled

No tables are modelled for this item yet.

APIs

Method Path Operation Scope Side effects Idempotency Gateway Summary
GET /templates/health TemplatesHealth factory.health.read read natural GW-01 Liveness, readiness and dependency health (templates store, package feeds, asset publication, inbox lag).
GET /templates/meta/feeds TemplatesFeeds factory.meta.read read natural GW-03 Package feeds and template sources configured per installation.

None modelled

No gRPC methods are modelled for this item yet.

Messages

None modelled

No events are modelled for this item yet.

None modelled

No commands are modelled for this item yet.

None modelled

No consumed events are modelled for this item yet.

Workers and jobs

None modelled

No workers are modelled for this item yet.

Actors and grains

None modelled

No grains are modelled for this item yet.

Sagas and long-running flows

None modelled

No sagas are modelled for this item yet.

flowchart LR
    REPOS["(template repositories · feeds)"] -- Discoverer via connectors --> C[TemplateRegistryService · manifests · matrix]
    B[BlueprintService · validate · derive] -- BlueprintPublished · ContextMapDerived --> R[GenerationRecipeService · plan · validate]
    C -- manifests · compatibility --> R
    R -- RecipeApproved --> RC[RunControlService · generation run]
    RC -- agents: GetApprovedRecipe · RecordOutput --> R
    B & C -- release candidates --> AR[AgentRegistryService · Asset Publication]
    B & C & R --> SQL["(templates-sql)"]
Hold "Alt" / "Option" to enable pan & zoom

Options and configuration

Section Key Type Default Reloadable Secret Summary
Templates:Host EnabledModules string[] [blueprints, catalog, recipes] no no Modules composed into this host.
Templates:Feeds PackageFeeds string[] [connectsoft-azure-artifacts] yes no NuGet feeds the catalog reads versions from.
OrleansMessaging ServiceName string templates no no Messaging profile service name.

Metrics and observability

Metric Instrument Unit Dimensions Summary
connectsoft.factory.templates.host.inbox_lag gauge s module Age of the oldest unprocessed event per module.

Security

Authentication client-credentials
Scopes factory.health.read (Health probes.); factory.meta.read (Feed metadata.)
Roles AssetMaintainer, Operator, PlatformAdmin, Observer
Tenant isolation row-filter
Data classification internal
Max side-effect class publication
Secrets templates-sql (key-vault, rotate 90 d); package-feed (key-vault, rotate 90 d); messaging-transport (key-vault, rotate 90 d)

Dependencies

Outbound

Target Kind Purpose Failure mode Required
ControlPlaneApi grpc Asset releases of blueprints and templates; runs that generate. fail-fast yes
KnowledgeHost grpc Blueprint documents, manifests and generated outputs as artifacts; repository intelligence of template repositories. fail-fast yes
ext-azure-devops sync-http Template repositories and Azure Artifacts feeds through connectors. degrade yes
GovernanceHost grpc Policy for blueprint and template changes; audit evidence. fail-fast yes
ext-identity-platform sync-http Workload identity. fail-fast yes

Inbound

Target Kind Purpose Failure mode Required
StudioBff sync-http Blueprint, catalog and recipe views in the Software Factory work area. — yes
AgentRuntimeWorker grpc Agents read blueprints, manifests and recipes during generation runs. — yes

Failure and recovery

Scenario Detection Recovery Data impact RTO (min)
Templates store lost readiness restore (RPO 15 min); manifests re-read from template repositories; compatibility re-derived from feeds none 240

NFR targets

Target Class value (pilot-interactive) Override
latency_p95_ms 2000 —
availability_pct 99.5 —
throughput_rps 50 —
rpo_minutes 15 —
rto_minutes 240 —
cost_class low —

Deployment

Granularity standalone host
Topologies saas-default, hybrid, on-prem
Runtime aks; replicas 2–4
Ports https 8160, grpc 8162, silo 12160, gateway 31160

Current implementation

The 43 templates and the libraries exist as repositories with .template.config, pipelines and docs; the Factory site carries their catalog from a 192-repository inventory (L1). No catalog host, blueprint validator, compatibility matrix or recipe exists; scaffolding is dotnet new by hand.

Later capabilities

Template upgrade advisor and package upgrade advisor (deferred rows); scaffold engine as a service only if a need beyond dotnet new in the sandbox is measured (ADR-0025).

Decisions and traceability

Family Ids
FR FR-02, FR-03, FR-06
FUX FUX-01, FUX-03
NFR NFR-11, NFR-13
XL XL-03, XL-07