# lingyang15359/fw_dedup_analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/lingyang15359/fw_dedup_analyzer
- Repository: https://github.com/lingyang15359/fw_dedup_analyzer

## Overview

This is a small, offline command-line analyzer for Cisco ASA/FTD configurations. The user supplies at least two files; the tool parses network objects, service objects, and object-groups, compares literal and recursively resolved content, then writes a Markdown report and optionally JSON. The single source file implements the runtime. The README documents the overall workflow and report formats; the excerpts show parsing, resolution, comparison, rendering, and CLI responsibilities, but omit some wiring details.

Main entry points: [`fw_dedup_analyzer.py`](https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py) (Command-line entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("CLI user"))
node_cli["Command-line entry"]
node_configs["ASA/FTD configs"]
node_parser["Config parser"]
node_objects["Object records"]
node_resolver["Group resolver"]
node_compare["Duplicate analysis"]
node_markdown["Markdown renderer"]
node_json["JSON renderer"]
node_reports["Report files"]

node_user -->|"runs with paths"| node_cli
node_cli -->|"reads inputs"| node_configs
node_cli -->|"parses configs"| node_parser
node_parser -->|"extracts objects"| node_objects
node_objects -->|"resolves groups"| node_resolver
node_objects -->|"compares content"| node_compare
node_resolver -->|"supplies resolved sets"| node_compare
node_cli -->|"renders report"| node_markdown
node_cli -->|"optionally renders"| node_json
node_markdown -->|"writes Markdown"| node_reports
node_json -->|"writes JSON"| node_reports

click node_cli "https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py"
click node_parser "https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py"
click node_objects "https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py"
click node_resolver "https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py"
click node_compare "https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py"
click node_markdown "https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py"
click node_json "https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.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_user toneBlue
class node_cli,node_parser,node_objects,node_resolver,node_compare,node_markdown,node_json toneTeal
class node_configs,node_reports toneIndigo
```

## Components

### Other components

- **CLI user**
- [Command-line entry](https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py): `fw_dedup_analyzer.py`
- **ASA/FTD configs**
- [Config parser](https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py): `fw_dedup_analyzer.py`
- [Object records](https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py): `fw_dedup_analyzer.py`
- [Group resolver](https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py): `fw_dedup_analyzer.py`
- [Duplicate analysis](https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py): `fw_dedup_analyzer.py`
- [Markdown renderer](https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py): `fw_dedup_analyzer.py`
- [JSON renderer](https://github.com/lingyang15359/fw_dedup_analyzer/blob/main/fw_dedup_analyzer.py): `fw_dedup_analyzer.py`
- **Report files**

## Connections

- CLI user → Command-line entry: runs with paths (evidence: `README.md`)
- Command-line entry → ASA/FTD configs: reads inputs (evidence: `README.md`)
- Command-line entry → Config parser: parses configs (evidence: `README.md`)
- Config parser → Object records: extracts objects (evidence: `fw_dedup_analyzer.py`)
- Object records → Group resolver: resolves groups (evidence: `fw_dedup_analyzer.py`)
- Object records → Duplicate analysis: compares content (evidence: `README.md`)
- Group resolver → Duplicate analysis: supplies resolved sets (evidence: `README.md`)
- Command-line entry → Markdown renderer: renders report (evidence: `README.md`)
- Command-line entry → JSON renderer: optionally renders (evidence: `README.md`)
- Markdown renderer → Report files: writes Markdown (evidence: `README.md`)
- JSON renderer → Report files: writes JSON (evidence: `README.md`)
