# saidfathalla/tags architecture

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

- Interactive diagram: https://gitdiagram.com/saidfathalla/tags
- Repository: https://github.com/saidfathalla/tags

## Overview

TAGS is a command-line RDF knowledge-graph profiler. A user supplies an RDF file and optional output settings; the tool profiles the graph, then presents metrics and hubs in a terminal report and generates VoID metadata and a visual HTML dashboard. The implementation is concentrated in one module, so the graph separates its documented responsibilities rather than implying a multi-module architecture. The excerpts show portions of metric computation and rendering; workflow links not directly visible in those excerpts are grounded in the README.

Main entry points: [`src/tags.py`](https://github.com/saidfathalla/tags/blob/main/src/tags.py) (CLI pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_run["Run and input"]
  node_rdf_input["RDF dataset"]
  node_cli["CLI pipeline<br/>[tags.py]"]
end

subgraph group_profile["Graph profiling"]
  node_graph_analysis["Graph analysis<br/>[tags.py]"]
  node_metrics["16 metrics<br/>[tags.py]"]
end

subgraph group_reports["Results and exports"]
  node_terminal_report["Terminal report<br/>[tags.py]"]
  node_void_export["VoID export<br/>[tags.py]"]
  node_html_dashboard["HTML dashboard<br/>[tags.py]"]
  node_output_files["Generated files"]
end

node_user(("User"))

node_user -->|"runs profiler"| node_cli
node_user -->|"selects dataset"| node_rdf_input
node_cli -->|"loads RDF"| node_rdf_input
node_cli -->|"profiles graph"| node_graph_analysis
node_graph_analysis -->|"calculates metrics"| node_metrics
node_cli -->|"prints results"| node_terminal_report
node_cli -->|"generates metadata"| node_void_export
node_cli -->|"generates dashboard"| node_html_dashboard
node_terminal_report -->|"displays in terminal"| node_output_files
node_void_export -->|"writes VoID file"| node_output_files
node_html_dashboard -->|"writes HTML file"| node_output_files

click node_cli "https://github.com/saidfathalla/tags/blob/main/src/tags.py"
click node_graph_analysis "https://github.com/saidfathalla/tags/blob/main/src/tags.py"
click node_metrics "https://github.com/saidfathalla/tags/blob/main/src/tags.py"
click node_terminal_report "https://github.com/saidfathalla/tags/blob/main/src/tags.py"
click node_void_export "https://github.com/saidfathalla/tags/blob/main/src/tags.py"
click node_html_dashboard "https://github.com/saidfathalla/tags/blob/main/src/tags.py"

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_rdf_input,node_cli,node_user toneBlue
class node_graph_analysis,node_metrics toneAmber
class node_terminal_report,node_void_export,node_html_dashboard,node_output_files toneMint
```

## Components

### Run and input

- **RDF dataset**
- [CLI pipeline](https://github.com/saidfathalla/tags/blob/main/src/tags.py): `src/tags.py`

### Graph profiling

- [Graph analysis](https://github.com/saidfathalla/tags/blob/main/src/tags.py): `src/tags.py`
- [16 metrics](https://github.com/saidfathalla/tags/blob/main/src/tags.py): `src/tags.py`

### Results and exports

- [Terminal report](https://github.com/saidfathalla/tags/blob/main/src/tags.py): `src/tags.py`
- [VoID export](https://github.com/saidfathalla/tags/blob/main/src/tags.py): `src/tags.py`
- [HTML dashboard](https://github.com/saidfathalla/tags/blob/main/src/tags.py): `src/tags.py`
- **Generated files**

### Other components

- **User**

## Connections

- User → CLI pipeline: runs profiler (evidence: `README.md`)
- User → RDF dataset: selects dataset (evidence: `README.md`)
- CLI pipeline → RDF dataset: loads RDF (evidence: `README.md`)
- CLI pipeline → Graph analysis: profiles graph (evidence: `README.md`)
- Graph analysis → 16 metrics: calculates metrics (evidence: `src/tags.py`)
- CLI pipeline → Terminal report: prints results (evidence: `README.md`)
- CLI pipeline → VoID export: generates metadata (evidence: `README.md`)
- CLI pipeline → HTML dashboard: generates dashboard (evidence: `README.md`)
- Terminal report → Generated files: displays in terminal (evidence: `README.md`)
- VoID export → Generated files: writes VoID file (evidence: `README.md`)
- HTML dashboard → Generated files: writes HTML file (evidence: `README.md`)
