# stefanmaron/msdyn365bc.sandbox.code.history architecture

> Architecture diagram of the GitHub repository stefanmaron/msdyn365bc.sandbox.code.history, 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/stefanmaron/msdyn365bc.sandbox.code.history
- Repository: https://github.com/stefanmaron/msdyn365bc.sandbox.code.history

## Overview

This repository is both a versioned archive of Business Central application code and automation for refreshing it. Users select country/major-version branches to inspect or compare code; scheduled automation retrieves artifacts and updates those branches. The README also documents separate current and vNext updates, localized branches, and scripts for bringing rewritten branch histories into local clones. The tree and README support these responsibilities, but the sampled source only shows the ranged ZIP downloader, so links between individual scripts and workflows are not asserted.

Main entry points: [`.github/workflows/BuildNewCommits.yml`](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/.github/workflows/BuildNewCommits.yml) (Regular updates), [`.github/workflows/BuildNewCommitsvNext.yml`](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/.github/workflows/BuildNewCommitsvNext.yml) (vNext updates), [`scripts/Download-ApplicationsRange.ps1`](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/Download-ApplicationsRange.ps1) (Range downloader), [`scripts/Auto_load_versions.ps1`](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/Auto_load_versions.ps1) (Version loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_refresh["Artifact refresh"]
  node_regular_schedule["Regular updates"]
  node_vnext_schedule["vNext updates"]
  node_regular_loader["Version loader"]
  node_vnext_loader["vNext loader"]
  node_range_download["Range downloader"]
  node_range_helper["ZIP range helper"]
  node_country_list["Country discovery"]
  node_vnext_country_list["vNext countries"]
  node_repo_update["Repository updater<br/>[UpdateALRepo.ps1]"]
end

subgraph group_archive["Version archive"]
  node_archive[("Country/version branches")]
end

subgraph group_maintenance["Branch maintenance"]
  node_branch_update["Branch updater"]
  node_branch_update_shell["Shell updater<br/>[update-branches.sh]"]
end

node_maintainer(("Repository maintainer"))
node_artifacts[("BC artifacts")]
node_clone_user(("Clone user"))

node_artifacts -.->|"provides downloads"| node_range_download
node_range_download -->|"invokes helper"| node_range_helper
node_regular_schedule -->|"pulls daily"| node_artifacts
node_vnext_schedule -->|"pulls daily"| node_artifacts
node_regular_loader -->|"updates versions"| node_archive
node_vnext_loader -->|"updates versions"| node_archive
node_repo_update -->|"commits updates"| node_archive
node_clone_user -->|"selects branches"| node_archive
node_branch_update -->|"updates clones"| node_archive
node_branch_update_shell -->|"updates clones"| node_archive
node_maintainer -->|"maintains"| node_regular_schedule
node_maintainer -->|"maintains"| node_vnext_schedule

click node_regular_schedule "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/.github/workflows/BuildNewCommits.yml"
click node_vnext_schedule "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/.github/workflows/BuildNewCommitsvNext.yml"
click node_regular_loader "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/Auto_load_versions.ps1"
click node_vnext_loader "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/Auto_load_versions_vNext.ps1"
click node_range_download "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/Download-ApplicationsRange.ps1"
click node_range_helper "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/download_range_helper.py"
click node_country_list "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/GetAllCountries.ps1"
click node_vnext_country_list "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/GetAllCountries_vNext.ps1"
click node_repo_update "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/UpdateALRepo.ps1"
click node_branch_update "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/Update-Branches.ps1"
click node_branch_update_shell "https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/update-branches.sh"

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_regular_schedule,node_vnext_schedule,node_regular_loader,node_vnext_loader,node_range_download,node_range_helper,node_country_list,node_vnext_country_list,node_repo_update,node_clone_user toneBlue
class node_archive,node_artifacts toneAmber
class node_branch_update,node_branch_update_shell toneMint
class node_maintainer toneIndigo
```

## Components

### Artifact refresh

- [Regular updates](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/.github/workflows/BuildNewCommits.yml): `.github/workflows/BuildNewCommits.yml`
- [vNext updates](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/.github/workflows/BuildNewCommitsvNext.yml): `.github/workflows/BuildNewCommitsvNext.yml`
- [Version loader](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/Auto_load_versions.ps1): `scripts/Auto_load_versions.ps1`
- [vNext loader](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/Auto_load_versions_vNext.ps1): `scripts/Auto_load_versions_vNext.ps1`
- [Range downloader](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/Download-ApplicationsRange.ps1): `scripts/Download-ApplicationsRange.ps1`
- [ZIP range helper](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/download_range_helper.py): `scripts/download_range_helper.py`
- [Country discovery](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/GetAllCountries.ps1): `scripts/GetAllCountries.ps1`
- [vNext countries](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/GetAllCountries_vNext.ps1): `scripts/GetAllCountries_vNext.ps1`
- [Repository updater](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/UpdateALRepo.ps1): `scripts/UpdateALRepo.ps1`

### Version archive

- **Country/version branches**

### Branch maintenance

- [Branch updater](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/Update-Branches.ps1): `scripts/Update-Branches.ps1`
- [Shell updater](https://github.com/stefanmaron/msdyn365bc.sandbox.code.history/blob/main/scripts/update-branches.sh): `scripts/update-branches.sh`

### Other components

- **Repository maintainer**
- **BC artifacts**
- **Clone user**

## Connections

- BC artifacts → Range downloader: provides downloads
- Range downloader → ZIP range helper: invokes helper
- Regular updates → BC artifacts: pulls daily
- vNext updates → BC artifacts: pulls daily
- Version loader → Country/version branches: updates versions
- vNext loader → Country/version branches: updates versions
- Repository updater → Country/version branches: commits updates
- Clone user → Country/version branches: selects branches
- Branch updater → Country/version branches: updates clones
- Shell updater → Country/version branches: updates clones
- Repository maintainer → Regular updates: maintains
- Repository maintainer → vNext updates: maintains
