# nssachinnagpal/archify architecture

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

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

## Overview

Archify is an agent-oriented tool for turning descriptions or repository evidence into interactive HTML diagrams. The principal workflow is to invoke the Archify CLI, author a diagram in a supported format, and explore or share the resulting artifact. The README highlights architecture, dataflow, lifecycle, sequence, and workflow diagrams, plus repository mapping and interactive tracing. The graph includes shared rendering and output-safety layers. Some renderer-to-entrypoint wiring is not shown in the excerpts, so those relationships are omitted rather than inferred.

Main entry points: [`archify/bin/archify.mjs`](https://github.com/nssachinnagpal/archify/blob/main/archify/bin/archify.mjs) (Archify CLI), [`archify/renderers/sequence/render-sequence.mjs`](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/sequence/render-sequence.mjs) (Sequence renderer), [`archify/renderers/shared/output-path.mjs`](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/output-path.mjs) (Output path safety), [`archify/renderers/workflow/workflow-compiler.mjs`](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/workflow/workflow-compiler.mjs) (Workflow compiler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Diagram authoring"]
  node_cli["Archify CLI<br/>[archify.mjs]"]
  node_architecture["Architecture renderer"]
  node_dataflow["Dataflow renderer"]
  node_lifecycle["Lifecycle renderer"]
  node_sequence["Sequence renderer"]
  node_workflow["Workflow compiler"]
  node_delta["Architecture delta"]
  node_scenarios["Scenario recipes<br/>[scenarios.mjs]"]
end

subgraph group_shared["Shared rendering"]
  node_renderer_cli["Renderer CLI<br/>[cli.mjs]"]
  node_validation["Validation<br/>[validator.mjs]"]
  node_diagnostics["Diagnostics<br/>[diagnostics.mjs]"]
  node_geometry["Geometry and layout<br/>[geometry.mjs]"]
  node_i18n["Localization<br/>[i18n.mjs]"]
  node_branding["Brand marks<br/>[brand-marks.mjs]"]
end

subgraph group_delivery["Artifact delivery"]
  node_output_paths["Output path safety<br/>[output-path.mjs]"]
  node_path_semantics["Filesystem semantics<br/>[path-semantics.mjs]"]
  node_atomic_output["Atomic output<br/>[atomic-output.mjs]"]
  node_finalize["Finalize artifact<br/>[finalize.mjs]"]
  node_preview["Live preview<br/>[preview.mjs]"]
end

subgraph group_viewer["Interactive exploration"]
  node_viewer["Interactive HTML viewer"]
  node_focus["Focus and tracing<br/>[focus.js]"]
  node_export["Viewer export<br/>[export.js]"]
end

node_user(("User or agent"))

node_user -->|"describes or invokes"| node_cli
node_cli -.->|"generates diagram"| node_architecture
node_cli -.->|"generates diagram"| node_dataflow
node_cli -.->|"generates diagram"| node_lifecycle
node_cli -.->|"generates diagram"| node_sequence
node_cli -.->|"generates diagram"| node_workflow
node_cli -.->|"supports repository mapping"| node_delta
node_cli -->|"resolves output"| node_output_paths
node_cli -->|"writes safely"| node_atomic_output
node_cli -->|"dispatches"| node_finalize
node_cli -->|"dispatches"| node_preview
node_renderer_cli -->|"configures"| node_workflow
node_workflow -->|"validates"| node_validation
node_workflow -->|"uses layout"| node_geometry
node_sequence -->|"uses CLI helpers"| node_renderer_cli
node_sequence -->|"reports issues"| node_diagnostics
node_sequence -->|"uses layout"| node_geometry
node_sequence -->|"localizes"| node_i18n
node_sequence -->|"adds marks"| node_branding
node_output_paths -->|"checks locations"| node_path_semantics
node_atomic_output -->|"canonicalizes paths"| node_output_paths
node_preview -->|"resolves output"| node_output_paths
node_preview -->|"commits artifact"| node_atomic_output
node_finalize -->|"resolves output"| node_output_paths
node_finalize -->|"publishes artifact"| node_atomic_output
node_cli -->|"produces interactive HTML"| node_viewer
node_viewer -->|"supports tracing"| node_focus
node_viewer -.->|"exports artifact"| node_export

click node_cli "https://github.com/nssachinnagpal/archify/blob/main/archify/bin/archify.mjs"
click node_architecture "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/architecture/render-architecture.mjs"
click node_dataflow "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/dataflow/render-dataflow.mjs"
click node_lifecycle "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/lifecycle/render-lifecycle.mjs"
click node_sequence "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/sequence/render-sequence.mjs"
click node_workflow "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/workflow/workflow-compiler.mjs"
click node_delta "https://github.com/nssachinnagpal/archify/blob/main/archify/delta/architecture-delta.mjs"
click node_scenarios "https://github.com/nssachinnagpal/archify/blob/main/archify/recipes/scenarios.mjs"
click node_renderer_cli "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/cli.mjs"
click node_validation "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/validator.mjs"
click node_diagnostics "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/diagnostics.mjs"
click node_geometry "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/geometry.mjs"
click node_i18n "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/i18n.mjs"
click node_branding "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/brand-marks.mjs"
click node_output_paths "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/output-path.mjs"
click node_path_semantics "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/path-semantics.mjs"
click node_atomic_output "https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/atomic-output.mjs"
click node_finalize "https://github.com/nssachinnagpal/archify/blob/main/archify/bin/finalize.mjs"
click node_preview "https://github.com/nssachinnagpal/archify/blob/main/archify/bin/preview.mjs"
click node_viewer "https://github.com/nssachinnagpal/archify/tree/main/viewer"
click node_focus "https://github.com/nssachinnagpal/archify/blob/main/viewer/focus.js"
click node_export "https://github.com/nssachinnagpal/archify/blob/main/viewer/export.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_cli,node_architecture,node_dataflow,node_lifecycle,node_sequence,node_workflow,node_delta,node_scenarios,node_user toneBlue
class node_renderer_cli,node_validation,node_diagnostics,node_geometry,node_i18n,node_branding toneAmber
class node_output_paths,node_path_semantics,node_atomic_output,node_finalize,node_preview toneMint
class node_viewer,node_focus,node_export toneRose
```

## Components

### Diagram authoring

- [Archify CLI](https://github.com/nssachinnagpal/archify/blob/main/archify/bin/archify.mjs): `archify/bin/archify.mjs`
- [Architecture renderer](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/architecture/render-architecture.mjs): `archify/renderers/architecture/render-architecture.mjs`
- [Dataflow renderer](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/dataflow/render-dataflow.mjs): `archify/renderers/dataflow/render-dataflow.mjs`
- [Lifecycle renderer](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/lifecycle/render-lifecycle.mjs): `archify/renderers/lifecycle/render-lifecycle.mjs`
- [Sequence renderer](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/sequence/render-sequence.mjs): `archify/renderers/sequence/render-sequence.mjs`
- [Workflow compiler](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/workflow/workflow-compiler.mjs): `archify/renderers/workflow/workflow-compiler.mjs`
- [Architecture delta](https://github.com/nssachinnagpal/archify/blob/main/archify/delta/architecture-delta.mjs): `archify/delta/architecture-delta.mjs`
- [Scenario recipes](https://github.com/nssachinnagpal/archify/blob/main/archify/recipes/scenarios.mjs): `archify/recipes/scenarios.mjs`

### Shared rendering

- [Renderer CLI](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/cli.mjs): `archify/renderers/shared/cli.mjs`
- [Validation](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/validator.mjs): `archify/renderers/shared/validator.mjs`
- [Diagnostics](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/diagnostics.mjs): `archify/renderers/shared/diagnostics.mjs`
- [Geometry and layout](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/geometry.mjs): `archify/renderers/shared/geometry.mjs`
- [Localization](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/i18n.mjs): `archify/renderers/shared/i18n.mjs`
- [Brand marks](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/brand-marks.mjs): `archify/renderers/shared/brand-marks.mjs`

### Artifact delivery

- [Output path safety](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/output-path.mjs): `archify/renderers/shared/output-path.mjs`
- [Filesystem semantics](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/path-semantics.mjs): `archify/renderers/shared/path-semantics.mjs`
- [Atomic output](https://github.com/nssachinnagpal/archify/blob/main/archify/renderers/shared/atomic-output.mjs): `archify/renderers/shared/atomic-output.mjs`
- [Finalize artifact](https://github.com/nssachinnagpal/archify/blob/main/archify/bin/finalize.mjs): `archify/bin/finalize.mjs`
- [Live preview](https://github.com/nssachinnagpal/archify/blob/main/archify/bin/preview.mjs): `archify/bin/preview.mjs`

### Interactive exploration

- [Interactive HTML viewer](https://github.com/nssachinnagpal/archify/tree/main/viewer): `viewer`
- [Focus and tracing](https://github.com/nssachinnagpal/archify/blob/main/viewer/focus.js): `viewer/focus.js`
- [Viewer export](https://github.com/nssachinnagpal/archify/blob/main/viewer/export.js): `viewer/export.js`

### Other components

- **User or agent**

## Connections

- User or agent → Archify CLI: describes or invokes (evidence: `README.md`)
- Archify CLI → Architecture renderer: generates diagram
- Archify CLI → Dataflow renderer: generates diagram
- Archify CLI → Lifecycle renderer: generates diagram
- Archify CLI → Sequence renderer: generates diagram
- Archify CLI → Workflow compiler: generates diagram
- Archify CLI → Architecture delta: supports repository mapping
- Archify CLI → Output path safety: resolves output (evidence: `archify/bin/archify.mjs`)
- Archify CLI → Atomic output: writes safely (evidence: `archify/bin/archify.mjs`)
- Archify CLI → Finalize artifact: dispatches (evidence: `archify/bin/archify.mjs`)
- Archify CLI → Live preview: dispatches (evidence: `archify/bin/archify.mjs`)
- Renderer CLI → Workflow compiler: configures (evidence: `archify/renderers/workflow/workflow-compiler.mjs`)
- Workflow compiler → Validation: validates (evidence: `archify/renderers/workflow/workflow-compiler.mjs`)
- Workflow compiler → Geometry and layout: uses layout (evidence: `archify/renderers/workflow/workflow-compiler.mjs`)
- Sequence renderer → Renderer CLI: uses CLI helpers (evidence: `archify/renderers/sequence/render-sequence.mjs`)
- Sequence renderer → Diagnostics: reports issues (evidence: `archify/renderers/sequence/render-sequence.mjs`)
- Sequence renderer → Geometry and layout: uses layout (evidence: `archify/renderers/sequence/render-sequence.mjs`)
- Sequence renderer → Localization: localizes (evidence: `archify/renderers/sequence/render-sequence.mjs`)
- Sequence renderer → Brand marks: adds marks (evidence: `archify/renderers/sequence/render-sequence.mjs`)
- Output path safety → Filesystem semantics: checks locations (evidence: `archify/renderers/shared/output-path.mjs`)
- Atomic output → Output path safety: canonicalizes paths (evidence: `archify/renderers/shared/atomic-output.mjs`)
- Live preview → Output path safety: resolves output (evidence: `archify/bin/preview.mjs`)
- Live preview → Atomic output: commits artifact (evidence: `archify/bin/preview.mjs`)
- Finalize artifact → Output path safety: resolves output (evidence: `archify/bin/finalize.mjs`)
- Finalize artifact → Atomic output: publishes artifact (evidence: `archify/bin/finalize.mjs`)
- Archify CLI → Interactive HTML viewer: produces interactive HTML (evidence: `README.md`)
- Interactive HTML viewer → Focus and tracing: supports tracing (evidence: `README.md`)
- Interactive HTML viewer → Viewer export: exports artifact
