# mihemihe/myadmonitor architecture

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

- Interactive diagram: https://gitdiagram.com/mihemihe/myadmonitor
- Repository: https://github.com/mihemihe/myadmonitor

## Overview

myADMonitor tracks Active Directory changes and exposes them through a REST API and React interface. Startup initializes directory state, discovers a domain controller, and performs an initial synchronization; a hosted task periodically fetches deltas. DirectoryState and Metaverse hold and aggregate the in-memory object/change state, which the API exposes for filtered queries and statistics. The React2024 interface fetches changes and header data and presents filtering, refresh controls, and change details. README capabilities are included; unsampled implementation details are not inferred.

Main entry points: [`backend/myADMonitor/Helpers/DirectoryState.cs`](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Helpers/DirectoryState.cs) (Directory state), [`backend/myADMonitor/Models/Metaverse.cs`](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/Metaverse.cs) (Object and change tracking), [`frontends/myADMonitorReact/src/App.jsx`](https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/App.jsx) (Legacy React dashboard), [`backend/myADMonitor/Helpers/LDAPUtil.cs`](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Helpers/LDAPUtil.cs) (LDAP access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Backend runtime"]
  node_program["Application startup<br/>[Program.cs]"]
  node_fetcher["Delta scheduler<br/>[FetchADChanges.cs]"]
end

subgraph group_directory["Directory tracking"]
  node_state[("Directory state<br/>[DirectoryState.cs]")]
  node_ldap["LDAP access<br/>[LDAPUtil.cs]"]
  node_metaverse[("Object and change tracking<br/>[Metaverse.cs]")]
  node_adobject["Directory object model<br/>[ADObject.cs]"]
  node_syntax["Attribute syntax model"]
  node_change["Change record<br/>[Change.cs]"]
  node_changecompact["Compact change view<br/>[ChangeCompact.cs]"]
  node_header["Sync statistics<br/>[HeaderData.cs]"]
  node_userdto["User summary<br/>[UserDTO.cs]"]
end

subgraph group_api["REST API"]
  node_controller["Change API"]
end

subgraph group_ui["React interface"]
  node_reactentry["React entry point<br/>[main.tsx]"]
  node_reactapp["Monitor dashboard<br/>[App.tsx]"]
  node_legacyapp["Legacy React dashboard<br/>[App.jsx]"]
  node_legacytable["Legacy change table<br/>[ChangeTable.jsx]"]
  node_legacyrow["Legacy change row<br/>[ChangeTableRow.jsx]"]
  node_deltafragment["Delta value display"]
  node_legacyheader["Legacy statistics<br/>[HeaderData.jsx]"]
  node_navbar["Legacy navigation<br/>[Navbar.jsx]"]
end

node_operator(("Monitor user"))

node_program -->|"initializes"| node_state
node_program -->|"registers service"| node_fetcher
node_fetcher -->|"fetches deltas"| node_state
node_state -->|"queries directory"| node_ldap
node_state -->|"updates tracking"| node_metaverse
node_metaverse -->|"reads syntax"| node_ldap
node_ldap -->|"uses syntax model"| node_syntax
node_metaverse -->|"tracks objects"| node_adobject
node_metaverse -->|"records changes"| node_change
node_state -->|"updates statistics"| node_header
node_state -->|"returns user summaries"| node_userdto
node_metaverse -->|"builds compact view"| node_changecompact
node_controller -->|"retrieves results"| node_state
node_reactentry -->|"renders"| node_reactapp
node_reactapp -->|"fetches API data"| node_controller
node_operator -.->|"views and filters"| node_reactapp
node_legacyapp -->|"renders changes"| node_legacytable
node_legacyapp -->|"renders statistics"| node_legacyheader
node_legacyapp -->|"renders navigation"| node_navbar
node_legacytable -->|"renders rows"| node_legacyrow
node_legacyrow -->|"renders deltas"| node_deltafragment
node_legacyapp -.->|"fetches API data"| node_controller

click node_program "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Program.cs"
click node_fetcher "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/BackgroundTasks/FetchADChanges.cs"
click node_state "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Helpers/DirectoryState.cs"
click node_ldap "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Helpers/LDAPUtil.cs"
click node_metaverse "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/Metaverse.cs"
click node_adobject "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/ADObject.cs"
click node_syntax "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/ADPropertySyntaxAndType.cs"
click node_change "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/Change.cs"
click node_changecompact "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/ChangeCompact.cs"
click node_header "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/HeaderData.cs"
click node_userdto "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/UserDTO.cs"
click node_controller "https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Controllers/adupdatesController.cs"
click node_reactentry "https://github.com/mihemihe/myadmonitor/blob/main/frontends/React2024/src/main.tsx"
click node_reactapp "https://github.com/mihemihe/myadmonitor/blob/main/frontends/React2024/src/App.tsx"
click node_legacyapp "https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/App.jsx"
click node_legacytable "https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/ChangeTable.jsx"
click node_legacyrow "https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/ChangeTableRow.jsx"
click node_deltafragment "https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/DeltaValuesFragment.jsx"
click node_legacyheader "https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/HeaderData.jsx"
click node_navbar "https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/Navbar.jsx"

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_program,node_fetcher,node_operator toneBlue
class node_state,node_ldap,node_metaverse,node_adobject,node_syntax,node_change,node_changecompact,node_header,node_userdto toneAmber
class node_controller toneMint
class node_reactentry,node_reactapp,node_legacyapp,node_legacytable,node_legacyrow,node_deltafragment,node_legacyheader,node_navbar toneRose
```

## Components

### Backend runtime

- [Application startup](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Program.cs): `backend/myADMonitor/Program.cs`
- [Delta scheduler](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/BackgroundTasks/FetchADChanges.cs): `backend/myADMonitor/BackgroundTasks/FetchADChanges.cs`

### Directory tracking

- [Directory state](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Helpers/DirectoryState.cs): `backend/myADMonitor/Helpers/DirectoryState.cs`
- [LDAP access](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Helpers/LDAPUtil.cs): `backend/myADMonitor/Helpers/LDAPUtil.cs`
- [Object and change tracking](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/Metaverse.cs): `backend/myADMonitor/Models/Metaverse.cs`
- [Directory object model](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/ADObject.cs): `backend/myADMonitor/Models/ADObject.cs`
- [Attribute syntax model](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/ADPropertySyntaxAndType.cs): `backend/myADMonitor/Models/ADPropertySyntaxAndType.cs`
- [Change record](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/Change.cs): `backend/myADMonitor/Models/Change.cs`
- [Compact change view](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/ChangeCompact.cs): `backend/myADMonitor/Models/ChangeCompact.cs`
- [Sync statistics](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/HeaderData.cs): `backend/myADMonitor/Models/HeaderData.cs`
- [User summary](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Models/UserDTO.cs): `backend/myADMonitor/Models/UserDTO.cs`

### REST API

- [Change API](https://github.com/mihemihe/myadmonitor/blob/main/backend/myADMonitor/Controllers/adupdatesController.cs): `backend/myADMonitor/Controllers/adupdatesController.cs`

### React interface

- [React entry point](https://github.com/mihemihe/myadmonitor/blob/main/frontends/React2024/src/main.tsx): `frontends/React2024/src/main.tsx`
- [Monitor dashboard](https://github.com/mihemihe/myadmonitor/blob/main/frontends/React2024/src/App.tsx): `frontends/React2024/src/App.tsx`
- [Legacy React dashboard](https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/App.jsx): `frontends/myADMonitorReact/src/App.jsx`
- [Legacy change table](https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/ChangeTable.jsx): `frontends/myADMonitorReact/src/ChangeTable.jsx`
- [Legacy change row](https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/ChangeTableRow.jsx): `frontends/myADMonitorReact/src/ChangeTableRow.jsx`
- [Delta value display](https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/DeltaValuesFragment.jsx): `frontends/myADMonitorReact/src/DeltaValuesFragment.jsx`
- [Legacy statistics](https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/HeaderData.jsx): `frontends/myADMonitorReact/src/HeaderData.jsx`
- [Legacy navigation](https://github.com/mihemihe/myadmonitor/blob/main/frontends/myADMonitorReact/src/Navbar.jsx): `frontends/myADMonitorReact/src/Navbar.jsx`

### Other components

- **Monitor user**

## Connections

- Application startup → Directory state: initializes (evidence: `backend/myADMonitor/Program.cs`)
- Application startup → Delta scheduler: registers service (evidence: `backend/myADMonitor/Program.cs`)
- Delta scheduler → Directory state: fetches deltas (evidence: `backend/myADMonitor/BackgroundTasks/FetchADChanges.cs`)
- Directory state → LDAP access: queries directory (evidence: `backend/myADMonitor/Helpers/DirectoryState.cs`)
- Directory state → Object and change tracking: updates tracking (evidence: `backend/myADMonitor/Helpers/DirectoryState.cs`)
- Object and change tracking → LDAP access: reads syntax (evidence: `backend/myADMonitor/Models/Metaverse.cs`)
- LDAP access → Attribute syntax model: uses syntax model (evidence: `backend/myADMonitor/Helpers/LDAPUtil.cs`)
- Object and change tracking → Directory object model: tracks objects (evidence: `backend/myADMonitor/Models/Metaverse.cs`)
- Object and change tracking → Change record: records changes (evidence: `backend/myADMonitor/Models/Metaverse.cs`)
- Directory state → Sync statistics: updates statistics (evidence: `backend/myADMonitor/Helpers/DirectoryState.cs`)
- Directory state → User summary: returns user summaries (evidence: `backend/myADMonitor/Helpers/DirectoryState.cs`)
- Object and change tracking → Compact change view: builds compact view (evidence: `backend/myADMonitor/Models/Metaverse.cs`)
- Change API → Directory state: retrieves results (evidence: `backend/myADMonitor/Controllers/adupdatesController.cs`)
- React entry point → Monitor dashboard: renders (evidence: `frontends/React2024/src/main.tsx`)
- Monitor dashboard → Change API: fetches API data (evidence: `frontends/React2024/src/App.tsx`)
- Monitor user → Monitor dashboard: views and filters (evidence: `README.md`)
- Legacy React dashboard → Legacy change table: renders changes (evidence: `frontends/myADMonitorReact/src/App.jsx`)
- Legacy React dashboard → Legacy statistics: renders statistics (evidence: `frontends/myADMonitorReact/src/App.jsx`)
- Legacy React dashboard → Legacy navigation: renders navigation (evidence: `frontends/myADMonitorReact/src/App.jsx`)
- Legacy change table → Legacy change row: renders rows (evidence: `frontends/myADMonitorReact/src/ChangeTable.jsx`)
- Legacy change row → Delta value display: renders deltas (evidence: `frontends/myADMonitorReact/src/ChangeTableRow.jsx`)
- Legacy React dashboard → Change API: fetches API data
