# ashketchum2017/autolabel architecture

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

- Interactive diagram: https://gitdiagram.com/ashketchum2017/autolabel
- Repository: https://github.com/ashketchum2017/autolabel

## Overview

AutoLabel is a pair of CorelDRAW VBA forms for composing and placing production labels. Users enter text or folder/date tokens, choose a label mode and formatting, optionally save settings, then submit; the macro creates the label on the active page or Master Page. A separate MacroRunner bridge opens either form and supports validated Behavior-driven submission. The README documents class responsibilities and integration contracts, but source excerpts were unavailable, so internal calls beyond those documented are omitted.

Main entry points: [`src/modules/MRTargetBridge.bas`](https://github.com/ashketchum2017/autolabel/blob/main/src/modules/MRTargetBridge.bas) (Target bridge), [`src/forms/AutoLabel.vba`](https://github.com/ashketchum2017/autolabel/blob/main/src/forms/AutoLabel.vba) (Auto Label form), [`src/forms/AutoLabelBP.vba`](https://github.com/ashketchum2017/autolabel/blob/main/src/forms/AutoLabelBP.vba) (Auto Label BP form), [`src/classes/ALPresenter.cls`](https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALPresenter.cls) (Label presenter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_forms["Label Forms"]
  node_form["Auto Label form<br/>[AutoLabel.vba]"]
  node_form_bp["Auto Label BP form<br/>[AutoLabelBP.vba]"]
end

subgraph group_engine["Label Engine"]
  node_presenter["Label presenter<br/>[ALPresenter.cls]"]
  node_input_model["Token input model<br/>[ALInputModel.cls]"]
  node_options["Label options<br/>[ALLabelOptions.cls]"]
end

subgraph group_behavior["Behavior Integration"]
  node_bridge["Target bridge<br/>[MRTargetBridge.bas]"]
  node_contract["Behavior contract"]
  node_session["Behavior session"]
  node_behavior_block["Behavior block"]
  node_behavior_instruction["Behavior instruction"]
  node_behavior_parser["Behavior parser"]
end

subgraph group_external["Host Integrations"]
  node_macro_runner(("MacroRunner"))
  node_coreldraw["CorelDRAW document"]
  node_vba_settings[("VBA settings")]
end

node_user(("CorelDRAW user"))

node_user -->|"opens"| node_form
node_user -->|"opens"| node_form_bp
node_form -->|"submits label"| node_presenter
node_form_bp -->|"submits label"| node_presenter
node_form -->|"loads and saves"| node_vba_settings
node_form_bp -->|"loads and saves"| node_vba_settings
node_presenter -->|"creates label"| node_coreldraw
node_input_model -->|"reads CDR path"| node_coreldraw
node_macro_runner -.->|"invokes"| node_bridge
node_bridge -.->|"opens form"| node_form
node_bridge -.->|"opens form"| node_form_bp
node_bridge -.->|"validates Behavior"| node_contract
node_bridge -.->|"runs Behavior"| node_session

click node_form "https://github.com/ashketchum2017/autolabel/blob/main/src/forms/AutoLabel.vba"
click node_form_bp "https://github.com/ashketchum2017/autolabel/blob/main/src/forms/AutoLabelBP.vba"
click node_presenter "https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALPresenter.cls"
click node_input_model "https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALInputModel.cls"
click node_options "https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALLabelOptions.cls"
click node_bridge "https://github.com/ashketchum2017/autolabel/blob/main/src/modules/MRTargetBridge.bas"
click node_contract "https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALBehaviorContract.cls"
click node_session "https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALBehaviorSession.cls"
click node_behavior_block "https://github.com/ashketchum2017/autolabel/blob/main/src/classes/MRBehaviorBlock.cls"
click node_behavior_instruction "https://github.com/ashketchum2017/autolabel/blob/main/src/classes/MRBehaviorInstruction.cls"
click node_behavior_parser "https://github.com/ashketchum2017/autolabel/blob/main/src/classes/MRBehaviorParser.cls"

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_form,node_form_bp,node_user toneBlue
class node_presenter,node_input_model,node_options toneAmber
class node_bridge,node_contract,node_session,node_behavior_block,node_behavior_instruction,node_behavior_parser toneMint
class node_macro_runner,node_coreldraw,node_vba_settings toneRose
```

## Components

### Label Forms

- [Auto Label form](https://github.com/ashketchum2017/autolabel/blob/main/src/forms/AutoLabel.vba): `src/forms/AutoLabel.vba`
- [Auto Label BP form](https://github.com/ashketchum2017/autolabel/blob/main/src/forms/AutoLabelBP.vba): `src/forms/AutoLabelBP.vba`

### Label Engine

- [Label presenter](https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALPresenter.cls): `src/classes/ALPresenter.cls`
- [Token input model](https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALInputModel.cls): `src/classes/ALInputModel.cls`
- [Label options](https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALLabelOptions.cls): `src/classes/ALLabelOptions.cls`

### Behavior Integration

- [Target bridge](https://github.com/ashketchum2017/autolabel/blob/main/src/modules/MRTargetBridge.bas): `src/modules/MRTargetBridge.bas`
- [Behavior contract](https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALBehaviorContract.cls): `src/classes/ALBehaviorContract.cls`
- [Behavior session](https://github.com/ashketchum2017/autolabel/blob/main/src/classes/ALBehaviorSession.cls): `src/classes/ALBehaviorSession.cls`
- [Behavior block](https://github.com/ashketchum2017/autolabel/blob/main/src/classes/MRBehaviorBlock.cls): `src/classes/MRBehaviorBlock.cls`
- [Behavior instruction](https://github.com/ashketchum2017/autolabel/blob/main/src/classes/MRBehaviorInstruction.cls): `src/classes/MRBehaviorInstruction.cls`
- [Behavior parser](https://github.com/ashketchum2017/autolabel/blob/main/src/classes/MRBehaviorParser.cls): `src/classes/MRBehaviorParser.cls`

### Host Integrations

- **MacroRunner**
- **CorelDRAW document**
- **VBA settings**

### Other components

- **CorelDRAW user**

## Connections

- CorelDRAW user → Auto Label form: opens
- CorelDRAW user → Auto Label BP form: opens
- Auto Label form → Label presenter: submits label
- Auto Label BP form → Label presenter: submits label
- Auto Label form → VBA settings: loads and saves
- Auto Label BP form → VBA settings: loads and saves
- Label presenter → CorelDRAW document: creates label
- Token input model → CorelDRAW document: reads CDR path
- MacroRunner → Target bridge: invokes
- Target bridge → Auto Label form: opens form
- Target bridge → Auto Label BP form: opens form
- Target bridge → Behavior contract: validates Behavior
- Target bridge → Behavior session: runs Behavior
