domain tier

domain-taxonomy

Universal classification system: tags and categories for any entity

Universal classification system: tags and categories for any entity

Tierdomain
Roleunclassified (baselined)
Pathcrates/domain/taxonomy
Edition2021
Targetsdomain_taxonomy
Public items0 across 0 modules
Tests31

What it is for

domain-taxonomy: Universal classification system

Overview

This crate provides a universal tagging and classification system that can be relationships, allowing tags to be applied to CatalogItems, Documents, Orders, or any other entity type without hard-coded foreign keys.

Layer

Domain - depends on: library crates-core, foundation-basemodels

Key Types

Example

use domain_taxonomy::{TaxonomyService, EntityRef, CreateTagRequest};

let service = TaxonomyService::new(pool);

// Create a tag
let (tag, event) = service.create_tag(CreateTagRequest {
tenant_id,
name: "Featured".to_string(),
slug: None,
group_id: None,
description: Some("Featured products".to_string()),
color: Some("#ff0000".to_string()),
icon: None,
}).await?;

// Attach to a catalog item
let entity = EntityRef::new("CatalogItem", item_id);
let (tagging, event) = service.attach_tag(tag.id, &entity).await?;

// List tags on an entity
let tags = service.list_entity_tags(&entity).await?;

// Find all entities with a tag
let entities = service.find_entities_by_tag(tag.id).await?;

Capabilities

No public items.

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

No public items.

No pub use re-exports: every item above is declared in this crate.

Boundary

Reaches into foundation.

Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)domain
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/domain/taxonomy
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_domain["domain"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-basemodels`foundationnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
chrono^0.4serdenoalways
serde^1derivenoalways
serde_json^1noalways
slug^0.1noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways
thiserror^1noalways
uuid^1v4, serdenoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1full, test-utilnoalways

Build. None.

Depended on by. 2 workspace crates.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_taxonomy["application-taxonomy"] -->|uses| SELF
  n_platform_privacy_scan_api["platform-privacy-scan-api"] -->|uses| SELF
  SELF["domain-taxonomy"]
  SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libdomain_taxonomy`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessyes
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

2 workspace crates depend on this one: application-taxonomy, platform-privacy-scan-api.

Verification

KindCount
Unit tests31
Integration tests0
Examples0
Doctests0

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files6
Source lines1846
Code lines1360
Public API items0
Public modules0
Tests31
Examples0
Cargo features0
Direct runtime dependencies9
Workspace reverse dependencies2
pie showData
    title Rust source composition
    "Code" : 1360
    "Blank or comment" : 486

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All domain · Manual