# hugo-lcqh/auto-tools architecture

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

- Interactive diagram: https://gitdiagram.com/hugo-lcqh/auto-tools
- Repository: https://github.com/hugo-lcqh/auto-tools

## Overview

Auto Tools is a Windows PowerShell toolkit for Material Control, with a central launcher for Excel- and Outlook-based workflows. The user starts the launcher and selects a task: shortage checks, supplier commitment, MR pull-in, vendor stock, Pre-CD, PO, or CD processing. Results include analyzed shortage or pull-in needs, downloaded supplier data, draft emails, and generated CD/PO files. The README documents these capabilities and the launcher, but no source excerpts were provided, so internal calls and workflow-specific integrations cannot be verified; the edges below reflect documented relationships only.

Main entry points: [`Launcher.ps1`](https://github.com/hugo-lcqh/auto-tools/blob/main/Launcher.ps1) (Tool launcher), [`Scripts/PreCD-Outlook.ps1`](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/PreCD-Outlook.ps1) (Pre-CD), [`Scripts/CheckCD_Shortage.ps1`](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/CheckCD_Shortage.ps1) (Shortage checks), [`Scripts/Check-MR-PullIn.ps1`](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Check-MR-PullIn.ps1) (MR Pull-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher"]
  node_launcher["Tool launcher<br/>[Launcher.ps1]"]
  node_launcher_config["Tool list"]
end

subgraph group_material["Material Control"]
  node_shortage["Shortage checks"]
  node_mr_pullin["MR Pull-in"]
  node_paths_config["Data paths"]
end

subgraph group_supplier["Supplier Workflows"]
  node_supplier_commitment["Supplier commitment"]
  node_supplier_reminders["Supplier reminders"]
  node_vendor_stock["Vendor stock"]
  node_supplier_config["Supplier rules<br/>[suppliers.csv]"]
end

subgraph group_documents["Document Generation"]
  node_pre_cd["Pre-CD<br/>[PreCD-Outlook.ps1]"]
  node_cd_processing["CD processing<br/>[Process-CDs.ps1]"]
  node_po_processing["PO processing<br/>[Process-PO.ps1]"]
end

node_user(("Material controller"))
node_excel["Microsoft Excel"]
node_outlook["Microsoft Outlook"]

node_user -->|"starts"| node_launcher
node_launcher -->|"uses tool list"| node_launcher_config
node_launcher -.->|"offers tool"| node_shortage
node_launcher -.->|"offers tool"| node_mr_pullin
node_launcher -.->|"offers tool"| node_supplier_commitment
node_launcher -.->|"offers tool"| node_supplier_reminders
node_launcher -.->|"offers tool"| node_vendor_stock
node_launcher -.->|"offers tool"| node_pre_cd
node_launcher -.->|"offers tool"| node_cd_processing
node_launcher -.->|"offers tool"| node_po_processing
node_shortage -.->|"uses workbooks"| node_excel
node_mr_pullin -.->|"uses workbooks"| node_excel
node_supplier_commitment -->|"downloads attachments"| node_outlook
node_supplier_reminders -->|"drafts reminders"| node_outlook
node_vendor_stock -->|"downloads stock"| node_outlook
node_pre_cd -->|"drafts email"| node_outlook
node_pre_cd -.->|"creates import file"| node_excel
node_cd_processing -.->|"processes workbooks"| node_excel
node_po_processing -.->|"creates PO files"| node_excel

click node_launcher "https://github.com/hugo-lcqh/auto-tools/blob/main/Launcher.ps1"
click node_launcher_config "https://github.com/hugo-lcqh/auto-tools/blob/main/launcher-config.json"
click node_shortage "https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/CheckCD_Shortage.ps1"
click node_mr_pullin "https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Check-MR-PullIn.ps1"
click node_supplier_commitment "https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Download-SupplierCommitment.ps1"
click node_supplier_reminders "https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Check-Shortage-Supplier%20Commitment.ps1"
click node_vendor_stock "https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Download-VendorStock.ps1"
click node_pre_cd "https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/PreCD-Outlook.ps1"
click node_cd_processing "https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Process-CDs/Process-CDs.ps1"
click node_po_processing "https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Process-PO/Process-PO.ps1"
click node_paths_config "https://github.com/hugo-lcqh/auto-tools/blob/main/Config/autotools-paths.json"
click node_supplier_config "https://github.com/hugo-lcqh/auto-tools/blob/main/Config/suppliers.csv"

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_launcher,node_launcher_config toneBlue
class node_shortage,node_mr_pullin,node_paths_config toneAmber
class node_supplier_commitment,node_supplier_reminders,node_vendor_stock,node_supplier_config toneMint
class node_pre_cd,node_cd_processing,node_po_processing toneRose
class node_user,node_excel,node_outlook toneIndigo
```

## Components

### Launcher

- [Tool launcher](https://github.com/hugo-lcqh/auto-tools/blob/main/Launcher.ps1): `Launcher.ps1`
- [Tool list](https://github.com/hugo-lcqh/auto-tools/blob/main/launcher-config.json): `launcher-config.json`

### Material Control

- [Shortage checks](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/CheckCD_Shortage.ps1): `Scripts/CheckCD_Shortage.ps1`
- [MR Pull-in](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Check-MR-PullIn.ps1): `Scripts/Check-MR-PullIn.ps1`
- [Data paths](https://github.com/hugo-lcqh/auto-tools/blob/main/Config/autotools-paths.json): `Config/autotools-paths.json`

### Supplier Workflows

- [Supplier commitment](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Download-SupplierCommitment.ps1): `Scripts/Download-SupplierCommitment.ps1`
- [Supplier reminders](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Check-Shortage-Supplier%20Commitment.ps1): `Scripts/Check-Shortage-Supplier Commitment.ps1`
- [Vendor stock](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Download-VendorStock.ps1): `Scripts/Download-VendorStock.ps1`
- [Supplier rules](https://github.com/hugo-lcqh/auto-tools/blob/main/Config/suppliers.csv): `Config/suppliers.csv`

### Document Generation

- [Pre-CD](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/PreCD-Outlook.ps1): `Scripts/PreCD-Outlook.ps1`
- [CD processing](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Process-CDs/Process-CDs.ps1): `Scripts/Process-CDs/Process-CDs.ps1`
- [PO processing](https://github.com/hugo-lcqh/auto-tools/blob/main/Scripts/Process-PO/Process-PO.ps1): `Scripts/Process-PO/Process-PO.ps1`

### Other components

- **Material controller**
- **Microsoft Excel**
- **Microsoft Outlook**

## Connections

- Material controller → Tool launcher: starts (evidence: `README.md`)
- Tool launcher → Tool list: uses tool list (evidence: `README.md`)
- Tool launcher → Shortage checks: offers tool
- Tool launcher → MR Pull-in: offers tool
- Tool launcher → Supplier commitment: offers tool
- Tool launcher → Supplier reminders: offers tool
- Tool launcher → Vendor stock: offers tool
- Tool launcher → Pre-CD: offers tool
- Tool launcher → CD processing: offers tool
- Tool launcher → PO processing: offers tool
- Shortage checks → Microsoft Excel: uses workbooks
- MR Pull-in → Microsoft Excel: uses workbooks
- Supplier commitment → Microsoft Outlook: downloads attachments (evidence: `README.md`)
- Supplier reminders → Microsoft Outlook: drafts reminders (evidence: `README.md`)
- Vendor stock → Microsoft Outlook: downloads stock (evidence: `README.md`)
- Pre-CD → Microsoft Outlook: drafts email (evidence: `README.md`)
- Pre-CD → Microsoft Excel: creates import file
- CD processing → Microsoft Excel: processes workbooks
- PO processing → Microsoft Excel: creates PO files
