Core Crate
The core crate contains reusable functionality related to the fundamental Harbor domain. This
crate defines default and mandatory behaviors and enforces all rules related to data integrity. 
Community members that are developing their own custom extensions or who wish to contribute to 
upstream Harbor are encouraged to review the code in this crate, and take care not to perform data
mutations that are incompatible with upstream Harbor. Community members should likely leverage
the services defined in this crate as-is, or interact with the API.
The two built-in consumers of the core crate are the Enrichment Engine and the API.
Enrichment Engine
The Enrichment Engine is:
- A set of providers that perform tasks that either manage entities (i.e. data) or perform other functions necessary for Harbor to operate.
 - The custom logic for a task is contained in a type that implements the 
TaskProvidertrait. - The 
clibinary is the default mechanism for executing aTaskProvider. TaskProvidertypes call services from thecorecrate to perform persistence operations or domain functions such as uploading an SBOM.- The default functions defined in the 
TaskProvidertrait are responsible for reporting task outcome/status, and collecting error information. - The 
runfunction in aTaskProvideris responsible for executing task specific logic that usually involves invoking or more services that mutate the data store. - A 
Servicewraps a sharedStoreinstance and coordinates entity validation, persistence, and relationships. 
The diagram below illustrates this flow of activities.

API
The API is:
- A single binary that configures dependency injection, tracing, and error handling, and then starts an HTTP listener.
 - The listener decodes payloads, enforces authz, and routes requests to handlers that are 
implemented as 
controllers. - A 
controllercalls services from thecorecrate to perform persistence operations or other domain functions such as ingesting an SBOM. - A 
Servicewraps a sharedStoreinstance and coordinates entity validation, persistence, and relationships. 
The diagram below illustrates this flow of activities.
