# trustgraph-ai/badges architecture

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

- Interactive diagram: https://gitdiagram.com/trustgraph-ai/badges
- Repository: https://github.com/trustgraph-ai/badges
- Video tour (about a minute): https://gitdiagram.com/trustgraph-ai/badges/video

## Overview

This small Node.js utility reports aggregate Docker Hub pulls for a fixed list of Trustgraph images. When run, it fetches each image’s pull count, sums and formats the counts, creates an SVG badge, and prints it. The source shows the fetches and badge generation; no README or further runtime components are present.

Main entry points: [`docker-pulls.js`](https://github.com/trustgraph-ai/badges/blob/master/docker-pulls.js) (Pulls badge script)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_runner(("Invoker"))
node_script["Pulls badge script<br/>[docker-pulls.js]"]
node_dockerhub["Docker Hub"]
node_badge["Badge maker"]
node_stdout["Standard output"]

node_runner -->|"runs"| node_script
node_script -->|"fetches counts"| node_dockerhub
node_script -->|"creates badge"| node_badge
node_script -->|"prints SVG"| node_stdout

click node_script "https://github.com/trustgraph-ai/badges/blob/master/docker-pulls.js"

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_runner,node_dockerhub,node_badge,node_stdout toneIndigo
class node_script toneTeal
```

## Components

### Other components

- **Invoker**
- [Pulls badge script](https://github.com/trustgraph-ai/badges/blob/master/docker-pulls.js): `docker-pulls.js`
- **Docker Hub**
- **Badge maker**
- **Standard output**

## Connections

- Invoker → Pulls badge script: runs
- Pulls badge script → Docker Hub: fetches counts
- Pulls badge script → Badge maker: creates badge
- Pulls badge script → Standard output: prints SVG
