# evotecit/adessentials architecture

> Architecture diagram of the GitHub repository evotecit/adessentials, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/evotecit/adessentials
- Repository: https://github.com/evotecit/adessentials

## Overview

##### Project type and purpose
- ADEssentials is a PowerShell module (library/tool) designed to simplify and standardize day-to-day Active Directory administration tasks.
- It exposes a large set of Cmdlets (Public/*.ps1) built on top of helper routines (Private/*.ps1), packaged as ADEssentials.psm1/psd1, with accompanying documentation (Docs/), examples (Examples/), tests (Tests/), and CI/build scripts (Build/).

##### File structure
- Top-level module manifest and module file:
- ADEssentials.psd1 (metadata)
- ADEssentials.psm1 (imports functions)
- “Public” directory: all exported Cmdlets.
- “Private” directory: internal helper functions and configuration scripts.
- “Docs” directory: one Markdown per Cmdlet describing usage.
- “Examples” directory: sample scripts grouped by feature areas (ACL, general AD tasks).
- “Tests” directory: Pester/PowerShell tests verifying module behavior.
- “Build” directory: scripts to package and publish module.
- CI: .github folder (FUNDING.yml) hints at GitHub Actions for build/release.

##### README for additional insights
- Confirms module’s purpose: AD Essentials for day-to-day activities.
- Mentions published to PowerShell Gallery.

##### Main components
a. PowerShell Host: user or automation invoking ADEssentials.
b. ADEssentials Module:
- Module Manifest (psd1) + Module File (psm1)
- Public Cmdlets (Public/*.ps1)
- Private Helpers (Private/*.ps1)
c. Documentation & Examples: (Docs/, Examples/)
d. Testing & CI:
- Tests/ (Pester tests)
- Build/ scripts
- GitHub Actions (implied via .github/)
e. External Dependencies & Services:
- Active Directory (LDAP, DNS, GPO)
- PowerShell Gallery (publish target)
- Downstream tools: GPOZaurr, Testimo

##### Relationships and interactions
- PowerShell Host loads ADEssentials.psd1 → imports ADEssentials.psm1
- ADEssentials.psm1 imports all Public/*.ps1 and Private/*.ps1
- Public Cmdlets call Private helper functions to interact with Active Directory services (LDAP queries, ACL adjustments, DNS lookups, Bitlocker, LAPS, etc.)
- Examples scripts exercise Public Cmdlets (for user guidance).
- Tests invoke Public Cmdlets against mock or live AD environments to validate behavior.
- Build scripts package module, run tests, and publish to PowerShell Gallery via CI pipeline.
- Docs directory serves static website or GitHub Pages to host command docs.

##### Architectural patterns and design principles
- “Facade” pattern: Public/*.ps1 files provide simplified surface area.
- “Helper/Utility” modules: Private functions encapsulate reusable logic and reduce duplication.
- Separation of concerns:
- Public API vs internal helpers
- Documentation vs examples vs code
- Build/test/publish pipeline
- Idempotency and testability: tests folder with Pester scripts ensures reliability.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Host["PowerShell Host / User / Automation"]:::external

    subgraph "ADEssentials Module"
        Manifest["ADEssentials.psd1"] 
        ModuleFile["ADEssentials.psm1"]
        subgraph "Public Cmdlets"
            Public["Public/*.ps1"]
        end
        subgraph "Private Helpers"
            Private["Private/*.ps1"]
        end
    end

    subgraph "External Systems"
        AD["Active Directory Domain Services"]:::external
        PSGallery["PowerShell Gallery"]:::external
        Evotec["EvotecIT Tools\n(GPOZaurr, Testimo)"]:::external
    end

    subgraph "Support Artifacts"
        Docs["Docs/"]
        Examples["Examples/"]
        Tests["Tests/Get-WinADObjects.Tests.ps1"]
        Build["Build/Manage-Module.ps1"]
        CI[".github/FUNDING.yml"]
        README["README.md"]
    end

    Host -->|"Import-Module ADEssentials"| Manifest
    Manifest -->|loads| ModuleFile
    ModuleFile -->|imports| Public
    ModuleFile -->|imports| Private
    Public -->|calls| Private
    Public -->|"LDAP/DNS/GPO Calls"| AD
    Private -->|"LDAP/DNS/GPO Calls"| AD
    ModuleFile -->|publish| PSGallery
    PSGallery -->|consume| ModuleFile
    ModuleFile -->|interop| Evotec

    Docs -->|describes| Public
    Examples -->|exercises| Public
    Tests -->|validates| Public
    Build -->|packages & publishes| ModuleFile
    CI -->|runs Pipeline| Build
    README -->|overview| Host

    click Manifest "https://github.com/evotecit/adessentials/blob/master/ADEssentials.psd1"
    click ModuleFile "https://github.com/evotecit/adessentials/blob/master/ADEssentials.psm1"
    click Public "https://github.com/evotecit/adessentials/tree/master/Public"
    click Private "https://github.com/evotecit/adessentials/tree/master/Private"
    click Docs "https://github.com/evotecit/adessentials/tree/master/Docs/"
    click Examples "https://github.com/evotecit/adessentials/tree/master/Examples/"
    click Tests "https://github.com/evotecit/adessentials/blob/master/Tests/Get-WinADObjects.Tests.ps1"
    click Build "https://github.com/evotecit/adessentials/blob/master/Build/Manage-Module.ps1"
    click CI "https://github.com/evotecit/adessentials/blob/master/.github/FUNDING.yml"

    classDef code fill:#AED6F1,stroke:#333,stroke-width:1px;
    classDef external fill:#ABEBC6,stroke:#333,stroke-width:1px;
    classDef artifacts fill:#F9E79F,stroke:#333,stroke-width:1px;

    class Manifest,ModuleFile,Public,Private code
    class AD,PSGallery,Evotec external
    class Docs,Examples,Tests,Build,CI,README artifacts
```
