# nepopetro/archify-bridge architecture

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

- Interactive diagram: https://gitdiagram.com/nepopetro/archify-bridge
- Repository: https://github.com/nepopetro/archify-bridge

## Overview

Archify Bridge accepts Archify JSON diagrams, validates them through the official Archify CLI, and converts supported architecture diagrams into Mermaid or draw.io files. The graph shows the documented user workflow and the calls visible in the sampled converters and validator. The tree includes only an architecture example; other diagram-type directories and the vendor submodule are documented but absent from the supplied tree, so their implementation details are not inferred.

Main entry points: [`src/archify/architecture/example.json`](https://github.com/nepopetro/archify-bridge/blob/main/src/archify/architecture/example.json) (Archify JSON IR), [`src/utils/validator.js`](https://github.com/nepopetro/archify-bridge/blob/main/src/utils/validator.js) (Validator runner), [`src/converters/to-drawio.js`](https://github.com/nepopetro/archify-bridge/blob/main/src/converters/to-drawio.js) (draw.io converter), [`src/converters/to-mermaid.js`](https://github.com/nepopetro/archify-bridge/blob/main/src/converters/to-mermaid.js) (Mermaid converter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Diagram inputs"]
  node_archify_ir["Archify JSON IR<br/>[example.json]"]
end

subgraph group_validation["Validation"]
  node_validator["Validator runner<br/>[validator.js]"]
  node_archify_cli["Official Archify CLI"]
end

subgraph group_conversion["Format conversion"]
  node_drawio["draw.io converter<br/>[to-drawio.js]"]
  node_mermaid["Mermaid converter<br/>[to-mermaid.js]"]
  node_drawio_export["draw.io export"]
  node_mermaid_export["Mermaid export"]
end

node_author(("Diagram author"))
node_diagram_tools(("Diagram editors"))

node_author -->|"writes diagrams"| node_archify_ir
node_archify_ir -->|"validated by"| node_validator
node_validator -->|"invokes"| node_archify_cli
node_archify_ir -->|"read and converted"| node_drawio
node_archify_ir -->|"read and converted"| node_mermaid
node_drawio -->|"writes XML"| node_drawio_export
node_mermaid -->|"writes graph"| node_mermaid_export
node_drawio_export -->|"opens in"| node_diagram_tools
node_mermaid_export -->|"opens in"| node_diagram_tools

click node_archify_ir "https://github.com/nepopetro/archify-bridge/blob/main/src/archify/architecture/example.json"
click node_validator "https://github.com/nepopetro/archify-bridge/blob/main/src/utils/validator.js"
click node_drawio "https://github.com/nepopetro/archify-bridge/blob/main/src/converters/to-drawio.js"
click node_mermaid "https://github.com/nepopetro/archify-bridge/blob/main/src/converters/to-mermaid.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_archify_ir toneBlue
class node_validator,node_archify_cli toneAmber
class node_drawio,node_mermaid,node_drawio_export,node_mermaid_export toneMint
class node_author,node_diagram_tools toneIndigo
```

## Components

### Diagram inputs

- [Archify JSON IR](https://github.com/nepopetro/archify-bridge/blob/main/src/archify/architecture/example.json): `src/archify/architecture/example.json`

### Validation

- [Validator runner](https://github.com/nepopetro/archify-bridge/blob/main/src/utils/validator.js): `src/utils/validator.js`
- **Official Archify CLI**

### Format conversion

- [draw.io converter](https://github.com/nepopetro/archify-bridge/blob/main/src/converters/to-drawio.js): `src/converters/to-drawio.js`
- [Mermaid converter](https://github.com/nepopetro/archify-bridge/blob/main/src/converters/to-mermaid.js): `src/converters/to-mermaid.js`
- **draw.io export**
- **Mermaid export**

### Other components

- **Diagram author**
- **Diagram editors**

## Connections

- Diagram author → Archify JSON IR: writes diagrams (evidence: `README.md`)
- Archify JSON IR → Validator runner: validated by (evidence: `README.md`)
- Validator runner → Official Archify CLI: invokes (evidence: `src/utils/validator.js`)
- Archify JSON IR → draw.io converter: read and converted (evidence: `src/converters/to-drawio.js`)
- Archify JSON IR → Mermaid converter: read and converted (evidence: `src/converters/to-mermaid.js`)
- draw.io converter → draw.io export: writes XML (evidence: `src/converters/to-drawio.js`)
- Mermaid converter → Mermaid export: writes graph (evidence: `src/converters/to-mermaid.js`)
- draw.io export → Diagram editors: opens in (evidence: `README.md`)
- Mermaid export → Diagram editors: opens in (evidence: `README.md`)
