# bobbyalbertson8/zucrow-se-purchase-notifier architecture

> Architecture diagram of the GitHub repository bobbyalbertson8/zucrow-se-purchase-notifier, 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/bobbyalbertson8/zucrow-se-purchase-notifier
- Repository: https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier

## Overview

This Google Apps Script project notifies a requester when a spreadsheet row changes to the configured Ordered status. The documented flow starts with an edit trigger, uses configurable sheet headers and values, sends an email with cost and GitHub-hosted logos, then records a notification timestamp to prevent duplicates. The README documents these behaviors but no source excerpts were provided, so internal call ownership and the specific HTML template used cannot be verified.

Main entry points: [`src/Code.gs`](https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/Code.gs) (Edit handler), [`src/Email.gs`](https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/Email.gs) (Email handling), [`src/Config.gs`](https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/Config.gs) (Runtime configuration), [`src/email-ordered.html`](https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/email-ordered.html) (Ordered email template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Order workflow"]
  node_sheet[("Purchase sheet")]
  node_edit_trigger["Edit trigger"]
  node_handler["Edit handler<br/>[Code.gs]"]
  node_sheet_helpers["Sheet utilities<br/>[SheetUtils.gs]"]
end

subgraph group_configuration["Configuration"]
  node_properties[("Script properties")]
  node_config["Runtime configuration<br/>[Config.gs]"]
end

subgraph group_messaging["Email and assets"]
  node_email["Email handling<br/>[Email.gs]"]
  node_ordered_template["Ordered email template<br/>[email-ordered.html]"]
  node_github_assets["GitHub logo assets"]
  node_mailapp["Google MailApp"]
end

node_editor(("Sheet editor"))

node_editor -->|"edits row"| node_sheet
node_sheet -->|"fires edit"| node_edit_trigger
node_edit_trigger -->|"invokes"| node_handler
node_handler -->|"reads settings"| node_properties
node_handler -->|"checks status, reads cost"| node_sheet
node_handler -->|"sends notification"| node_email
node_email -->|"sends email"| node_mailapp
node_email -->|"uses logo URLs"| node_github_assets
node_handler -->|"records sent timestamp"| node_sheet
node_email -.->|"may render"| node_ordered_template
node_config -.->|"defines defaults"| node_properties

click node_handler "https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/Code.gs"
click node_sheet_helpers "https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/SheetUtils.gs"
click node_config "https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/Config.gs"
click node_email "https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/Email.gs"
click node_ordered_template "https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/email-ordered.html"
click node_github_assets "https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/tree/main/assets"

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_sheet,node_edit_trigger,node_handler,node_sheet_helpers toneBlue
class node_properties,node_config toneAmber
class node_email,node_ordered_template,node_github_assets,node_mailapp toneMint
class node_editor toneIndigo
```

## Components

### Order workflow

- **Purchase sheet**
- **Edit trigger**
- [Edit handler](https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/Code.gs): `src/Code.gs`
- [Sheet utilities](https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/SheetUtils.gs): `src/SheetUtils.gs`

### Configuration

- **Script properties**
- [Runtime configuration](https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/Config.gs): `src/Config.gs`

### Email and assets

- [Email handling](https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/Email.gs): `src/Email.gs`
- [Ordered email template](https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/blob/main/src/email-ordered.html): `src/email-ordered.html`
- [GitHub logo assets](https://github.com/bobbyalbertson8/zucrow-se-purchase-notifier/tree/main/assets): `assets`
- **Google MailApp**

### Other components

- **Sheet editor**

## Connections

- Sheet editor → Purchase sheet: edits row (evidence: `README.md`)
- Purchase sheet → Edit trigger: fires edit (evidence: `README.md`)
- Edit trigger → Edit handler: invokes (evidence: `README.md`)
- Edit handler → Script properties: reads settings (evidence: `README.md`)
- Edit handler → Purchase sheet: checks status, reads cost (evidence: `README.md`)
- Edit handler → Email handling: sends notification (evidence: `README.md`)
- Email handling → Google MailApp: sends email (evidence: `README.md`)
- Email handling → GitHub logo assets: uses logo URLs (evidence: `README.md`)
- Edit handler → Purchase sheet: records sent timestamp (evidence: `README.md`)
- Email handling → Ordered email template: may render
- Runtime configuration → Script properties: defines defaults
