# glued2/public architecture

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

- Interactive diagram: https://gitdiagram.com/glued2/public
- Repository: https://github.com/glued2/public

## Overview

##### Project type and purpose
- This is not a single “application” but rather a toolbox of standalone administrative scripts.
- Purpose: Each script automates a different IT/admin task against external systems (Azure AD, Azure VM Scale Sets, SharePoint, Teams, Linux servers).

##### File structure
- Top‐level scripts:
- Last-Login-Query.ps1, aad-device-rename.ps1, assign-local-admin-master.ps1, azure-vmss-cmds.ps1, sharepoint-large-previous-versions.ps1, sharepoint-large-previous-version-archive.ps1
- linux-server-backup.sh
- Subfolder “teams/”: contains single-user-federation.ps1
- No “src/tests” separation or build/deployment config—each file is a self-contained utility.

##### README for additional insights
- Confirms these are “public scripts” for ad-hoc use.
- Highlights only the Teams “single-user-federation” script as an example.

a. Main components
- Script groups (each grouping)
- External services: Azure AD, Azure VMSS, SharePoint Online, Microsoft Teams, Linux Servers
- Admin user / operator
b. Relationships & interactions
- Operator invokes scripts → PowerShell or shell runtime
- Each script authenticates (e.g., via Az Module or SharePoint CSOM) → external service API
- Data flows: query, modify, archive, rename, backup
c. Architectural patterns
- “Utility client” pattern: small, single-responsibility clients talking to cloud services
- No central orchestrator—scripts run independently
d. Key technologies
- PowerShell Az modules, MSOnline module, PnP/CSOM for SharePoint, Teams PowerShell module, SSH/rsync or shell commands for Linux backup

## Diagram (Mermaid)

```mermaid
flowchart TD
    Operator([Admin Operator]):::operator
    Auth["AzModule Auth"]:::auth

    subgraph "Azure AD Scripts"
        LastLogin["Last-Login-Query.ps1"]:::script
        DeviceRename["aad-device-rename.ps1"]:::script
        AssignAdmin["assign-local-admin-master.ps1"]:::script
    end

    subgraph "Azure VMSS Scripts"
        VMSSCmds["azure-vmss-cmds.ps1"]:::script
    end

    subgraph "SharePoint Online Scripts"
        SPQuery["sharepoint-large-previous-versions.ps1"]:::script
        SPArchive["sharepoint-large-previous-version-archive.ps1"]:::script
    end

    subgraph "Microsoft Teams Script"
        TeamsFed["single-user-federation.ps1"]:::script
    end

    subgraph "Linux Server Backup"
        LinuxBackup["linux-server-backup.sh"]:::script
    end

    subgraph "External Services"
        AD["Azure AD"]:::service
        VMSS["Azure VM Scale Sets"]:::service
        SP["SharePoint Online"]:::service
        Teams["Microsoft Teams"]:::service
        LinuxSRV["Linux Servers"]:::service
    end

    Operator -->|"run"| LastLogin
    Operator -->|"run"| DeviceRename
    Operator -->|"run"| AssignAdmin
    Operator -->|"run"| VMSSCmds
    Operator -->|"run"| SPQuery
    Operator -->|"run"| SPArchive
    Operator -->|"run"| TeamsFed
    Operator -->|"run"| LinuxBackup

    LastLogin -->|"authenticate"| Auth
    DeviceRename -->|"authenticate"| Auth
    AssignAdmin -->|"authenticate"| Auth
    VMSSCmds -->|"authenticate"| Auth

    Auth -->|"Connect-AzAccount"| AD
    Auth -->|"Connect-AzAccount"| VMSS

    LastLogin -->|"query"| AD
    DeviceRename -->|"update"| AD
    AssignAdmin -->|"update roles"| AD
    VMSSCmds -->|"manage VMSS"| VMSS

    SPQuery -->|"auth CSOM/PNP"| SP
    SPArchive -->|"auth CSOM/PNP"| SP
    SPQuery -->|"query versions"| SP
    SPArchive -->|"archive versions"| SP

    TeamsFed -->|"auth TeamsMod"| Teams
    TeamsFed -->|"setup federation"| Teams

    LinuxBackup -->|"ssh/rsync"| LinuxSRV
    LinuxBackup -->|"backup"| LinuxSRV

    click LastLogin "https://github.com/glued2/public/blob/main/Azure-AD/Last-Login-Query.ps1"
    click DeviceRename "https://github.com/glued2/public/blob/main/aad-device-rename.ps1"
    click AssignAdmin "https://github.com/glued2/public/blob/main/assign-local-admin-master.ps1"
    click VMSSCmds "https://github.com/glued2/public/blob/main/azure-vmss-cmds.ps1"
    click SPQuery "https://github.com/glued2/public/blob/main/sharepoint-large-previous-versions.ps1"
    click SPArchive "https://github.com/glued2/public/blob/main/sharepoint-large-previous-version-archive.ps1"
    click TeamsFed "https://github.com/glued2/public/blob/main/teams/single-user-federation.ps1"
    click LinuxBackup "https://github.com/glued2/public/blob/main/linux-server-backup.sh"

    classDef operator fill:#f9f,stroke:#333,stroke-width:1px
    classDef script fill:#ccf,stroke:#333,stroke-width:1px
    classDef service fill:#cfc,stroke:#333,stroke-width:1px
    classDef auth fill:#fffa65,stroke:#333,stroke-width:1px
```
