# alienoro/test architecture

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

- Interactive diagram: https://gitdiagram.com/alienoro/test
- Repository: https://github.com/alienoro/test

## Overview

LIA_HistorySync is a small SQL Server history-sync prototype. Its executable connects to AdventureWorks2022 and VersionChecker, transfers Person and Product data, then runs update-checking and pending-update procedures for both domains. The Person path stages rows and computes hashes in its insert; the Product path bulk-copies rows directly. SQL procedure implementations and schema contents were not sampled, so their internal behavior and any links to the listed TransferData procedures are not inferred.

Main entry points: [`C# files/TestInsert.cs`](https://github.com/alienoro/test/blob/main/C%23%20files/TestInsert.cs) (Procedure runner), [`C# files/Program.cs`](https://github.com/alienoro/test/blob/main/C%23%20files/Program.cs) (Program entry), [`Database files/Schemas/Person/Schema.sql`](https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Person/Schema.sql) (Person schema), [`Database files/Schemas/Product/Schema.sql`](https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Product/Schema.sql) (Product schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Sync runtime"]
  node_program["Program entry<br/>[Program.cs]"]
  node_person_transfer["Person transfer<br/>[TestInsert.cs]"]
  node_product_transfer["Product transfer<br/>[TestInsert.cs]"]
  node_runners["Procedure runner<br/>[TestInsert.cs]"]
end

subgraph group_database["Database objects"]
  node_person_schema["Person schema<br/>[Schema.sql]"]
  node_product_schema["Product schema<br/>[Schema.sql]"]
  node_person_check["Person update check"]
  node_person_process["Person pending process"]
  node_person_sql_transfer["Person SQL transfer<br/>[TransferData.sql]"]
  node_product_check["Product update check"]
  node_product_process["Product pending process"]
  node_product_sql_transfer["Product SQL transfer<br/>[TransferData.sql]"]
end

subgraph group_stores["SQL databases"]
  node_source_db[("AdventureWorks2022")]
  node_target_db[("VersionChecker")]
end

node_user(("Operator"))

node_user -->|"starts"| node_program
node_program -->|"calls"| node_person_transfer
node_program -->|"calls"| node_product_transfer
node_program -->|"calls"| node_runners
node_person_transfer -->|"reads Person"| node_source_db
node_person_transfer -->|"stages and inserts"| node_target_db
node_product_transfer -->|"reads Product"| node_source_db
node_product_transfer -->|"bulk-copies"| node_target_db
node_runners -->|"executes"| node_person_check
node_runners -->|"executes"| node_person_process
node_runners -->|"executes"| node_product_check
node_runners -->|"executes"| node_product_process
node_person_schema -->|"defines schema"| node_target_db
node_product_schema -->|"defines schema"| node_target_db

click node_program "https://github.com/alienoro/test/blob/main/C%23%20files/Program.cs"
click node_person_transfer "https://github.com/alienoro/test/blob/main/C%23%20files/TestInsert.cs"
click node_product_transfer "https://github.com/alienoro/test/blob/main/C%23%20files/TestInsert.cs"
click node_runners "https://github.com/alienoro/test/blob/main/C%23%20files/TestInsert.cs"
click node_person_schema "https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Person/Schema.sql"
click node_product_schema "https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Product/Schema.sql"
click node_person_check "https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Person/Procedures/CheckForUpdates.sql"
click node_person_process "https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Person/Procedures/ProcessPendingUpdates.sql"
click node_person_sql_transfer "https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Person/Procedures/TransferData.sql"
click node_product_check "https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Product/Procedures/CheckForUpdates.sql"
click node_product_process "https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Product/Procedures/ProcessPendingUpdates.sql"
click node_product_sql_transfer "https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Product/Procedures/TransferData.sql"

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_program,node_person_transfer,node_product_transfer,node_runners toneBlue
class node_person_schema,node_product_schema,node_person_check,node_person_process,node_person_sql_transfer,node_product_check,node_product_process,node_product_sql_transfer toneAmber
class node_source_db,node_target_db toneMint
class node_user toneIndigo
```

## Components

### Sync runtime

- [Program entry](https://github.com/alienoro/test/blob/main/C%23%20files/Program.cs): `C# files/Program.cs`
- [Person transfer](https://github.com/alienoro/test/blob/main/C%23%20files/TestInsert.cs): `C# files/TestInsert.cs`
- [Product transfer](https://github.com/alienoro/test/blob/main/C%23%20files/TestInsert.cs): `C# files/TestInsert.cs`
- [Procedure runner](https://github.com/alienoro/test/blob/main/C%23%20files/TestInsert.cs): `C# files/TestInsert.cs`

### Database objects

- [Person schema](https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Person/Schema.sql): `Database files/Schemas/Person/Schema.sql`
- [Product schema](https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Product/Schema.sql): `Database files/Schemas/Product/Schema.sql`
- [Person update check](https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Person/Procedures/CheckForUpdates.sql): `Database files/Schemas/Person/Procedures/CheckForUpdates.sql`
- [Person pending process](https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Person/Procedures/ProcessPendingUpdates.sql): `Database files/Schemas/Person/Procedures/ProcessPendingUpdates.sql`
- [Person SQL transfer](https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Person/Procedures/TransferData.sql): `Database files/Schemas/Person/Procedures/TransferData.sql`
- [Product update check](https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Product/Procedures/CheckForUpdates.sql): `Database files/Schemas/Product/Procedures/CheckForUpdates.sql`
- [Product pending process](https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Product/Procedures/ProcessPendingUpdates.sql): `Database files/Schemas/Product/Procedures/ProcessPendingUpdates.sql`
- [Product SQL transfer](https://github.com/alienoro/test/blob/main/Database%20files/Schemas/Product/Procedures/TransferData.sql): `Database files/Schemas/Product/Procedures/TransferData.sql`

### SQL databases

- **AdventureWorks2022**
- **VersionChecker**

### Other components

- **Operator**

## Connections

- Operator → Program entry: starts
- Program entry → Person transfer: calls
- Program entry → Product transfer: calls
- Program entry → Procedure runner: calls
- Person transfer → AdventureWorks2022: reads Person
- Person transfer → VersionChecker: stages and inserts
- Product transfer → AdventureWorks2022: reads Product
- Product transfer → VersionChecker: bulk-copies
- Procedure runner → Person update check: executes
- Procedure runner → Person pending process: executes
- Procedure runner → Product update check: executes
- Procedure runner → Product pending process: executes
- Person schema → VersionChecker: defines schema
- Product schema → VersionChecker: defines schema
