# mabdraboh/arcgis-portal-governance architecture

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

- Interactive diagram: https://gitdiagram.com/mabdraboh/arcgis-portal-governance
- Repository: https://github.com/mabdraboh/arcgis-portal-governance

## Overview

This repository implements ArcGIS Enterprise portal governance: a schema is prepared, the Python engine audits portal items against security, integrity, lifecycle, metadata, and governance rules, and audit results feed a hosted feature layer used by an operational Dashboard. Dashboard Arcade formatting and an HTML list template provide an actionable presentation. The README documents the end-to-end deployment; the sampled engine excerpts show feature-service table updates, but not every audit-stage implementation detail.

Main entry points: [`governance_engine.py`](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py) (Governance Engine), [`create_gdb_schema.py`](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/create_gdb_schema.py) (Schema Generator), [`dashboard_arcade.js`](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/dashboard_arcade.js) (List Formatting), [`dashboard_list_layout.html`](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/dashboard_list_layout.html) (List Template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Data Setup"]
  node_schema["Schema Generator"]
  node_geodatabase[("File Geodatabase")]
end

subgraph group_audit["Governance Audit"]
  node_engine["Governance Engine"]
  node_portal[("ArcGIS Portal")]
  node_security["Security Checks"]
  node_integrity["Integrity Checks"]
  node_lifecycle["Lifecycle Checks"]
  node_metadata["Metadata Checks"]
  node_governance["Governance Checks"]
end

subgraph group_results["Audit Results"]
  node_hosted[("Hosted Feature Layer")]
  node_itemaudit[("Item Audit")]
  node_violations[("Violation Instances")]
  node_ownersummary[("Owner Summary")]
  node_auditsummary[("Audit Summary")]
end

subgraph group_dashboard["Dashboard"]
  node_dashboard["ArcGIS Dashboard"]
  node_arcade["List Formatting"]
  node_layout["List Template"]
end

node_operator(("Portal Operator"))

node_operator -->|"prepares schema"| node_schema
node_schema -->|"creates tables"| node_geodatabase
node_operator -->|"publishes schema"| node_hosted
node_operator -->|"runs audit"| node_engine
node_engine -->|"enumerates items"| node_portal
node_engine -->|"evaluates rules"| node_security
node_engine -->|"evaluates rules"| node_integrity
node_engine -->|"evaluates rules"| node_lifecycle
node_engine -->|"evaluates rules"| node_metadata
node_engine -->|"evaluates rules"| node_governance
node_engine -->|"updates tables"| node_hosted
node_hosted -->|"stores item audit"| node_itemaudit
node_hosted -->|"stores violations"| node_violations
node_hosted -->|"stores owner totals"| node_ownersummary
node_hosted -->|"stores run totals"| node_auditsummary
node_dashboard -->|"uses data source"| node_hosted
node_dashboard -->|"applies formatting"| node_arcade
node_dashboard -->|"renders list"| node_layout

click node_schema "https://github.com/mabdraboh/arcgis-portal-governance/blob/main/create_gdb_schema.py"
click node_engine "https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py"
click node_security "https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py"
click node_integrity "https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py"
click node_lifecycle "https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py"
click node_metadata "https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py"
click node_governance "https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py"
click node_arcade "https://github.com/mabdraboh/arcgis-portal-governance/blob/main/dashboard_arcade.js"
click node_layout "https://github.com/mabdraboh/arcgis-portal-governance/blob/main/dashboard_list_layout.html"

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_schema,node_geodatabase toneBlue
class node_engine,node_portal,node_security,node_integrity,node_lifecycle,node_metadata,node_governance toneAmber
class node_hosted,node_itemaudit,node_violations,node_ownersummary,node_auditsummary toneMint
class node_dashboard,node_arcade,node_layout toneRose
class node_operator toneIndigo
```

## Components

### Data Setup

- [Schema Generator](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/create_gdb_schema.py): `create_gdb_schema.py`
- **File Geodatabase**

### Governance Audit

- [Governance Engine](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py): `governance_engine.py`
- **ArcGIS Portal**
- [Security Checks](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py): `governance_engine.py`
- [Integrity Checks](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py): `governance_engine.py`
- [Lifecycle Checks](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py): `governance_engine.py`
- [Metadata Checks](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py): `governance_engine.py`
- [Governance Checks](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/governance_engine.py): `governance_engine.py`

### Audit Results

- **Hosted Feature Layer**
- **Item Audit**
- **Violation Instances**
- **Owner Summary**
- **Audit Summary**

### Dashboard

- **ArcGIS Dashboard**
- [List Formatting](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/dashboard_arcade.js): `dashboard_arcade.js`
- [List Template](https://github.com/mabdraboh/arcgis-portal-governance/blob/main/dashboard_list_layout.html): `dashboard_list_layout.html`

### Other components

- **Portal Operator**

## Connections

- Portal Operator → Schema Generator: prepares schema (evidence: `README.md`)
- Schema Generator → File Geodatabase: creates tables (evidence: `README.md`)
- Portal Operator → Hosted Feature Layer: publishes schema (evidence: `README.md`)
- Portal Operator → Governance Engine: runs audit (evidence: `README.md`)
- Governance Engine → ArcGIS Portal: enumerates items (evidence: `README.md`)
- Governance Engine → Security Checks: evaluates rules (evidence: `README.md`)
- Governance Engine → Integrity Checks: evaluates rules (evidence: `README.md`)
- Governance Engine → Lifecycle Checks: evaluates rules (evidence: `README.md`)
- Governance Engine → Metadata Checks: evaluates rules (evidence: `README.md`)
- Governance Engine → Governance Checks: evaluates rules (evidence: `README.md`)
- Governance Engine → Hosted Feature Layer: updates tables (evidence: `governance_engine.py`)
- Hosted Feature Layer → Item Audit: stores item audit
- Hosted Feature Layer → Violation Instances: stores violations
- Hosted Feature Layer → Owner Summary: stores owner totals
- Hosted Feature Layer → Audit Summary: stores run totals
- ArcGIS Dashboard → Hosted Feature Layer: uses data source (evidence: `README.md`)
- ArcGIS Dashboard → List Formatting: applies formatting (evidence: `README.md`)
- ArcGIS Dashboard → List Template: renders list (evidence: `README.md`)
