# pavanvzm/enterprise-data-ontology-knowledge-graph architecture

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

- Interactive diagram: https://gitdiagram.com/pavanvzm/enterprise-data-ontology-knowledge-graph
- Repository: https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph

## Overview

This Python service manages enterprise entities and relationships in an ontology, mirrors that state into an in-memory knowledge graph, and exposes CRUD, neighborhood queries, metrics, and an HTML dashboard through FastAPI. The main request flow is client → API, with validation on entity creation and ontology updates synchronized to graph state. The README documents broader filtering and dashboard visualization capabilities. Source evidence is partial, so relationships for omitted routes and dashboard internals are not inferred.

Main entry points: [`src/api/app.py`](https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/api/app.py) (FastAPI Routes), [`src/knowledge_graph/graph_manager.py`](https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/knowledge_graph/graph_manager.py) (Graph Operations), [`src/ontology/ontology_builder.py`](https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/ontology/ontology_builder.py) (Ontology CRUD), [`src/utils/validators.py`](https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/utils/validators.py) (Payload Validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_api_app["FastAPI Routes<br/>[app.py]"]
  node_dashboard["HTML Dashboard<br/>[app.py]"]
end

subgraph group_ontology["Ontology Model"]
  node_ontology_builder["Ontology CRUD"]
end

subgraph group_graph["Knowledge Graph"]
  node_graph_manager["Graph Operations<br/>[graph_manager.py]"]
end

subgraph group_validation["Validation"]
  node_validators["Payload Validation<br/>[validators.py]"]
end

node_client(("API Client"))

node_client -->|"sends requests"| node_api_app
node_api_app -->|"validates entities"| node_validators
node_api_app -->|"CRUD operations"| node_ontology_builder
node_api_app -->|"syncs graph"| node_graph_manager
node_api_app -->|"queries neighbors"| node_graph_manager
node_api_app -->|"reads statistics"| node_graph_manager
node_api_app -->|"serves HTML"| node_dashboard
node_dashboard -->|"reads statistics"| node_graph_manager
node_dashboard -->|"reads records"| node_ontology_builder
node_graph_manager -->|"copies ontology state"| node_ontology_builder

click node_api_app "https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/api/app.py"
click node_dashboard "https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/api/app.py"
click node_ontology_builder "https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/ontology/ontology_builder.py"
click node_graph_manager "https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/knowledge_graph/graph_manager.py"
click node_validators "https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/utils/validators.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_api_app,node_dashboard,node_client toneBlue
class node_ontology_builder toneAmber
class node_graph_manager toneMint
class node_validators toneRose
```

## Components

### HTTP API

- [FastAPI Routes](https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/api/app.py): `src/api/app.py`
- [HTML Dashboard](https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/api/app.py): `src/api/app.py`

### Ontology Model

- [Ontology CRUD](https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/ontology/ontology_builder.py): `src/ontology/ontology_builder.py`

### Knowledge Graph

- [Graph Operations](https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/knowledge_graph/graph_manager.py): `src/knowledge_graph/graph_manager.py`

### Validation

- [Payload Validation](https://github.com/pavanvzm/enterprise-data-ontology-knowledge-graph/blob/main/src/utils/validators.py): `src/utils/validators.py`

### Other components

- **API Client**

## Connections

- API Client → FastAPI Routes: sends requests (evidence: `README.md`)
- FastAPI Routes → Payload Validation: validates entities (evidence: `src/api/app.py`)
- FastAPI Routes → Ontology CRUD: CRUD operations (evidence: `src/api/app.py`)
- FastAPI Routes → Graph Operations: syncs graph (evidence: `src/api/app.py`)
- FastAPI Routes → Graph Operations: queries neighbors (evidence: `src/api/app.py`)
- FastAPI Routes → Graph Operations: reads statistics (evidence: `src/api/app.py`)
- FastAPI Routes → HTML Dashboard: serves HTML (evidence: `README.md`)
- HTML Dashboard → Graph Operations: reads statistics (evidence: `src/api/app.py`)
- HTML Dashboard → Ontology CRUD: reads records (evidence: `src/api/app.py`)
- Graph Operations → Ontology CRUD: copies ontology state (evidence: `src/knowledge_graph/graph_manager.py`)
