# samartomar/aih-catalog architecture

> Architecture diagram of the GitHub repository samartomar/aih-catalog, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/samartomar/aih-catalog
- Repository: https://github.com/samartomar/aih-catalog

## Overview

AIH Catalog is a producer and verifier of signed qualification catalogs and Core qualification receipts; it is not the organization’s admission authority. The main workflow is a caller invoking `aih-supported` with a signed catalog and administrator-controlled verification inputs, then inspecting the verified qualification basis or emitting a receipt. The graph reflects documented CLI behavior and exported runtime APIs; unsampled implementation details and the receipt-set publication wiring are intentionally kept at the subsystem level.

Main entry points: [`src/supported/signed-catalog-v2.ts`](https://github.com/samartomar/aih-catalog/blob/main/src/supported/signed-catalog-v2.ts) (Catalog V2 engine), [`src/cli.ts`](https://github.com/samartomar/aih-catalog/blob/main/src/cli.ts) (aih-supported CLI), [`src/index.ts`](https://github.com/samartomar/aih-catalog/blob/main/src/index.ts) (Public API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and API"]
  node_cli["aih-supported CLI<br/>[cli.ts]"]
  node_api["Public API<br/>[index.ts]"]
end

subgraph group_verify["Catalog verification"]
  node_engine["Catalog V2 engine"]
  node_signed["Signed catalog"]
  node_root["Signer root"]
  node_claims["Expected claims"]
  node_continuity["Continuity head"]
  node_replay["Replay state"]
  node_clock["Caller UTC time"]
end

subgraph group_outputs["Qualification outputs"]
  node_head["Verified catalog head"]
  node_basis["Qualification basis"]
  node_receipt["Qualification receipt"]
  node_receiptset["Receipt set"]
end

subgraph group_authority["Authority boundary"]
  node_core["Core consumer"]
  node_org(("Organization authority"))
end

node_caller(("Catalog operator"))

node_caller -->|"invokes"| node_cli
node_cli -->|"dispatches"| node_engine
node_api -->|"exports"| node_engine
node_engine -->|"verifies"| node_signed
node_engine -->|"checks trust"| node_root
node_engine -->|"checks claims"| node_claims
node_engine -->|"checks continuity"| node_continuity
node_engine -->|"checks replay"| node_replay
node_engine -->|"checks validity"| node_clock
node_engine -->|"returns verified"| node_head
node_engine -->|"derives basis"| node_basis
node_engine -->|"emits receipt"| node_receipt
node_engine -->|"emits set"| node_receiptset
node_caller -.->|"submits receipt"| node_core
node_org -.->|"governs separately"| node_core

click node_cli "https://github.com/samartomar/aih-catalog/blob/main/src/cli.ts"
click node_api "https://github.com/samartomar/aih-catalog/blob/main/src/index.ts"
click node_engine "https://github.com/samartomar/aih-catalog/blob/main/src/supported/signed-catalog-v2.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_api toneBlue
class node_engine,node_signed,node_root,node_claims,node_continuity,node_replay,node_clock toneAmber
class node_head,node_basis,node_receipt,node_receiptset toneMint
class node_core,node_org toneRose
class node_caller toneIndigo
```

## Components

### CLI and API

- [aih-supported CLI](https://github.com/samartomar/aih-catalog/blob/main/src/cli.ts): `src/cli.ts`
- [Public API](https://github.com/samartomar/aih-catalog/blob/main/src/index.ts): `src/index.ts`

### Catalog verification

- [Catalog V2 engine](https://github.com/samartomar/aih-catalog/blob/main/src/supported/signed-catalog-v2.ts): `src/supported/signed-catalog-v2.ts`
- **Signed catalog**
- **Signer root**
- **Expected claims**
- **Continuity head**
- **Replay state**
- **Caller UTC time**

### Qualification outputs

- **Verified catalog head**
- **Qualification basis**
- **Qualification receipt**
- **Receipt set**

### Authority boundary

- **Core consumer**
- **Organization authority**

### Other components

- **Catalog operator**

## Connections

- Catalog operator → aih-supported CLI: invokes
- aih-supported CLI → Catalog V2 engine: dispatches
- Public API → Catalog V2 engine: exports
- Catalog V2 engine → Signed catalog: verifies
- Catalog V2 engine → Signer root: checks trust
- Catalog V2 engine → Expected claims: checks claims
- Catalog V2 engine → Continuity head: checks continuity
- Catalog V2 engine → Replay state: checks replay
- Catalog V2 engine → Caller UTC time: checks validity
- Catalog V2 engine → Verified catalog head: returns verified
- Catalog V2 engine → Qualification basis: derives basis
- Catalog V2 engine → Qualification receipt: emits receipt
- Catalog V2 engine → Receipt set: emits set
- Catalog operator → Core consumer: submits receipt
- Organization authority → Core consumer: governs separately
