# nabheetcloud/graphiffy-abap architecture

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

- Interactive diagram: https://gitdiagram.com/nabheetcloud/graphiffy-abap
- Repository: https://github.com/nabheetcloud/graphiffy-abap

## Overview

graphiffy-abap is a knowledge-graph builder for ABAP/SAP and other code and document corpora. Users point its CLI at a folder; discovery classifies inputs, extraction builds deterministic structural graph data, cross-file resolution stitches references, and an optional semantic pass adds inferred relationships. The result can be analyzed and written as interactive or portable graph outputs. ABAP-specific parsers cover language constructs and SAP metadata; caching and watch mode support repeated runs. Edges reflect README-described stages or SOURCE INDEX references; some implementation details were not sampled.

Main entry points: [`graphiffy_abap/extract.py`](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/extract.py) (Structural extraction), [`graphiffy_abap/__main__.py`](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/__main__.py) (CLI), [`graphiffy_abap/build.py`](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/build.py) (Graph build), [`graphiffy_abap/watch.py`](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/watch.py) (Watch mode)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input and control"]
  node_cli["CLI<br/>[__main__.py]"]
  node_discovery["File discovery<br/>[detect.py]"]
  node_ingest["URL ingestion<br/>[ingest.py]"]
  node_security["Fetch safeguards<br/>[security.py]"]
  node_watch["Watch mode<br/>[watch.py]"]
end

subgraph group_extract["Extraction and resolution"]
  node_extractor["Structural extraction<br/>[extract.py]"]
  node_abap["ABAP extraction<br/>[abap_extract.py]"]
  node_ddic["DDIC XML<br/>[ddic_xml.py]"]
  node_cds["CDS DDL<br/>[cds_ddl.py]"]
  node_classxml["Class XML<br/>[clas_xml.py]"]
  node_enhancement["Enhancement XML<br/>[enho_xml.py]"]
  node_rapbdef["RAP behavior<br/>[rap_bdef.py]"]
  node_rapsrvd["RAP services<br/>[rap_srvd.py]"]
  node_cache[("File cache<br/>[cache.py]")]
  node_semantic["Semantic pass<br/>[extract.py]"]
end

subgraph group_analysis["Graph analysis"]
  node_builder["Graph build<br/>[build.py]"]
  node_cluster["Communities<br/>[cluster.py]"]
  node_analyze["Graph insights<br/>[analyze.py]"]
  node_report["Analysis report<br/>[report.py]"]
end

subgraph group_outputs["Outputs and access"]
  node_export["Graph exporters<br/>[export.py]"]
  node_html["SAP graph view<br/>[sap_html.py]"]
  node_server["Graph server<br/>[serve.py]"]
end

node_user(("Analyst"))
node_abaplint{{"abaplint runtime"}}

node_user -->|"runs"| node_cli
node_cli -->|"scans inputs"| node_discovery
node_cli -->|"starts extraction"| node_extractor
node_cli -->|"builds graph"| node_builder
node_cli -.->|"fetches sources"| node_ingest
node_ingest -->|"validates fetches"| node_security
node_extractor -->|"dispatches ABAP"| node_abap
node_abap -->|"parses via"| node_abaplint
node_extractor -->|"parses DDIC"| node_ddic
node_extractor -->|"parses CDS"| node_cds
node_extractor -->|"parses class XML"| node_classxml
node_extractor -->|"parses enhancements"| node_enhancement
node_extractor -->|"parses behavior"| node_rapbdef
node_extractor -->|"parses services"| node_rapsrvd
node_extractor -->|"uses cache"| node_cache
node_extractor -->|"adds inferred links"| node_semantic
node_extractor -->|"emits graph data"| node_builder
node_builder -.->|"groups nodes"| node_cluster
node_cluster -->|"informs insights"| node_analyze
node_builder -->|"produces findings"| node_report
node_analyze -->|"summarizes graph"| node_report
node_builder -->|"writes formats"| node_export
node_builder -.->|"renders SAP view"| node_html
node_cli -->|"serves graph"| node_server
node_cli -->|"starts monitoring"| node_watch
node_watch -->|"re-extracts changes"| node_extractor
node_watch -->|"updates graph"| node_builder

click node_cli "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/__main__.py"
click node_discovery "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/detect.py"
click node_ingest "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/ingest.py"
click node_security "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/security.py"
click node_watch "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/watch.py"
click node_extractor "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/extract.py"
click node_abap "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/abap_extract.py"
click node_ddic "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/ddic_xml.py"
click node_cds "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/cds_ddl.py"
click node_classxml "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/clas_xml.py"
click node_enhancement "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/enho_xml.py"
click node_rapbdef "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/rap_bdef.py"
click node_rapsrvd "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/rap_srvd.py"
click node_cache "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/cache.py"
click node_semantic "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/extract.py"
click node_builder "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/build.py"
click node_cluster "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/cluster.py"
click node_analyze "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/analyze.py"
click node_report "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/report.py"
click node_export "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/export.py"
click node_html "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/sap_html.py"
click node_server "https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/serve.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_cli,node_discovery,node_ingest,node_security,node_watch toneBlue
class node_extractor,node_abap,node_ddic,node_cds,node_classxml,node_enhancement,node_rapbdef,node_rapsrvd,node_cache,node_semantic toneAmber
class node_builder,node_cluster,node_analyze,node_report toneMint
class node_export,node_html,node_server toneRose
class node_user,node_abaplint toneIndigo
```

## Components

### Input and control

- [CLI](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/__main__.py): `graphiffy_abap/__main__.py`
- [File discovery](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/detect.py): `graphiffy_abap/detect.py`
- [URL ingestion](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/ingest.py): `graphiffy_abap/ingest.py`
- [Fetch safeguards](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/security.py): `graphiffy_abap/security.py`
- [Watch mode](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/watch.py): `graphiffy_abap/watch.py`

### Extraction and resolution

- [Structural extraction](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/extract.py): `graphiffy_abap/extract.py`
- [ABAP extraction](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/abap_extract.py): `graphiffy_abap/abap_extract.py`
- [DDIC XML](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/ddic_xml.py): `graphiffy_abap/ddic_xml.py`
- [CDS DDL](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/cds_ddl.py): `graphiffy_abap/cds_ddl.py`
- [Class XML](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/clas_xml.py): `graphiffy_abap/clas_xml.py`
- [Enhancement XML](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/enho_xml.py): `graphiffy_abap/enho_xml.py`
- [RAP behavior](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/rap_bdef.py): `graphiffy_abap/rap_bdef.py`
- [RAP services](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/rap_srvd.py): `graphiffy_abap/rap_srvd.py`
- [File cache](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/cache.py): `graphiffy_abap/cache.py`
- [Semantic pass](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/extract.py): `graphiffy_abap/extract.py`

### Graph analysis

- [Graph build](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/build.py): `graphiffy_abap/build.py`
- [Communities](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/cluster.py): `graphiffy_abap/cluster.py`
- [Graph insights](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/analyze.py): `graphiffy_abap/analyze.py`
- [Analysis report](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/report.py): `graphiffy_abap/report.py`

### Outputs and access

- [Graph exporters](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/export.py): `graphiffy_abap/export.py`
- [SAP graph view](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/sap_html.py): `graphiffy_abap/sap_html.py`
- [Graph server](https://github.com/nabheetcloud/graphiffy-abap/blob/main/graphiffy_abap/serve.py): `graphiffy_abap/serve.py`

### Other components

- **Analyst**
- **abaplint runtime**

## Connections

- Analyst → CLI: runs (evidence: `README.md`)
- CLI → File discovery: scans inputs (evidence: `graphiffy_abap/__main__.py`)
- CLI → Structural extraction: starts extraction (evidence: `graphiffy_abap/__main__.py`)
- CLI → Graph build: builds graph (evidence: `graphiffy_abap/__main__.py`)
- CLI → URL ingestion: fetches sources (evidence: `graphiffy_abap/__main__.py`)
- URL ingestion → Fetch safeguards: validates fetches (evidence: `graphiffy_abap/ingest.py`)
- Structural extraction → ABAP extraction: dispatches ABAP (evidence: `graphiffy_abap/extract.py`)
- ABAP extraction → abaplint runtime: parses via (evidence: `README.md`)
- Structural extraction → DDIC XML: parses DDIC (evidence: `graphiffy_abap/extract.py`)
- Structural extraction → CDS DDL: parses CDS (evidence: `graphiffy_abap/extract.py`)
- Structural extraction → Class XML: parses class XML (evidence: `graphiffy_abap/extract.py`)
- Structural extraction → Enhancement XML: parses enhancements (evidence: `graphiffy_abap/extract.py`)
- Structural extraction → RAP behavior: parses behavior (evidence: `graphiffy_abap/extract.py`)
- Structural extraction → RAP services: parses services (evidence: `graphiffy_abap/extract.py`)
- Structural extraction → File cache: uses cache (evidence: `graphiffy_abap/extract.py`)
- Structural extraction → Semantic pass: adds inferred links (evidence: `README.md`)
- Structural extraction → Graph build: emits graph data (evidence: `README.md`)
- Graph build → Communities: groups nodes
- Communities → Graph insights: informs insights (evidence: `graphiffy_abap/analyze.py`)
- Graph build → Analysis report: produces findings (evidence: `README.md`)
- Graph insights → Analysis report: summarizes graph (evidence: `graphiffy_abap/report.py`)
- Graph build → Graph exporters: writes formats (evidence: `README.md`)
- Graph build → SAP graph view: renders SAP view
- CLI → Graph server: serves graph (evidence: `graphiffy_abap/__main__.py`)
- CLI → Watch mode: starts monitoring (evidence: `graphiffy_abap/__main__.py`)
- Watch mode → Structural extraction: re-extracts changes (evidence: `graphiffy_abap/watch.py`)
- Watch mode → Graph build: updates graph (evidence: `graphiffy_abap/watch.py`)
