# bc913/cpp_cmake_scaffold architecture

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

- Interactive diagram: https://gitdiagram.com/bc913/cpp_cmake_scaffold
- Repository: https://github.com/bc913/cpp_cmake_scaffold

## Overview

This repository is a C++/CMake scaffold demonstrating how an executable consumes header-only, static, and shared libraries. Its example workflow sorts data through the header-only library, computes a longest-consecutive-sequence result through the static library, and uses an employee object from the shared library. The README also describes internal and external dependency use; the graph focuses on the sampled runtime components. Edges follow the client calls and library implementations shown in source, with the additional shared-to-static dependency documented in the README.

Main entry points: [`src/DynamicLib/employee.cpp`](https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/DynamicLib/employee.cpp) (Employee library), [`src/Client/main.cpp`](https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/Client/main.cpp) (Example client), [`src/StaticLib/array_algs.cpp`](https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/StaticLib/array_algs.cpp) (LCS library), [`src/HeaderOnly/include/bcheaderonly/sort.h`](https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/HeaderOnly/include/bcheaderonly/sort.h) (Heap sort)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_client["Example client<br/>[main.cpp]"]
end

subgraph group_libs["Libraries"]
  node_lcs["LCS library<br/>[array_algs.cpp]"]
  node_employee["Employee library<br/>[employee.cpp]"]
  node_dynapi["Export API<br/>[BcDynApi.h]"]
end

subgraph group_algorithms["Algorithms"]
  node_sort["Heap sort<br/>[sort.h]"]
end

node_client -->|"sorts via"| node_sort
node_client -->|"computes via"| node_lcs
node_client -->|"uses"| node_employee
node_lcs -->|"sorts with"| node_sort
node_employee -->|"sorts with"| node_sort
node_employee -->|"exports through"| node_dynapi
node_employee -->|"consumes"| node_lcs

click node_client "https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/Client/main.cpp"
click node_sort "https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/HeaderOnly/include/bcheaderonly/sort.h"
click node_lcs "https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/StaticLib/array_algs.cpp"
click node_employee "https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/DynamicLib/employee.cpp"
click node_dynapi "https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/DynamicLib/include/bcdynamic/BcDynApi.h"

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_client toneBlue
class node_lcs,node_employee,node_dynapi toneAmber
class node_sort toneMint
```

## Components

### Application

- [Example client](https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/Client/main.cpp): `src/Client/main.cpp`

### Libraries

- [LCS library](https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/StaticLib/array_algs.cpp): `src/StaticLib/array_algs.cpp`
- [Employee library](https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/DynamicLib/employee.cpp): `src/DynamicLib/employee.cpp`
- [Export API](https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/DynamicLib/include/bcdynamic/BcDynApi.h): `src/DynamicLib/include/bcdynamic/BcDynApi.h`

### Algorithms

- [Heap sort](https://github.com/bc913/cpp_cmake_scaffold/blob/master/src/HeaderOnly/include/bcheaderonly/sort.h): `src/HeaderOnly/include/bcheaderonly/sort.h`

## Connections

- Example client → Heap sort: sorts via (evidence: `src/Client/main.cpp`)
- Example client → LCS library: computes via (evidence: `src/Client/main.cpp`)
- Example client → Employee library: uses (evidence: `src/Client/main.cpp`)
- LCS library → Heap sort: sorts with (evidence: `src/StaticLib/array_algs.cpp`)
- Employee library → Heap sort: sorts with (evidence: `src/DynamicLib/employee.cpp`)
- Employee library → Export API: exports through
- Employee library → LCS library: consumes (evidence: `README.md`)
