# breakersol/activityframework architecture

> Architecture diagram of the GitHub repository breakersol/activityframework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/breakersol/activityframework
- Repository: https://github.com/breakersol/activityframework

## Overview

##### Project Type and Purpose
- This is a modular C++ framework (“Activity Framework”) that provides compile-time reflection, serialization, signal-slot connections, asynchronous Activities, Pipelines, and a Thread Pool for building complex C++ applications.
- It is distributed as a C++ library with accompanying unit tests (GoogleTest) and benchmarks (Google Benchmark), built via CMake.

##### File Structure Analysis
- Top-level:
- CMakeLists.txt, .github/workflows/cmake.yml – build and CI configuration
- LICENSE, README.md
- ActivityFramework/
- CMakeLists.txt – defines library target
- Src/Components/ – implementation and headers for each module: TA_MetaReflex, TA_Serializer, TA_Connection, TA_Activity*, TA_Pipeline*, TA_ThreadPool, TA_Variant, TA_Buffer, etc.
- Global header: TA_ActivityFramework_global.h
- Benchmark/
- CMakeLists.txt, bundled Google Benchmark source under benchmark-1.9.0/ – produces benchmark executable
- Test/
- CMakeLists.txt, ActivityFrameworkTest/ – unit tests for each component
- ThirdParty/googletest/ – embedded GoogleTest framework

##### Insights from README
- Features are organized into independent modules that rely only on the C++ Standard Library.
- Build requires CMake 3.20+, compiles library, test and benchmark executables.
- Usage examples show tight coupling between reflection info and serializer, connection, activity creation.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Core Modules
    subgraph "Core Modules"
        direction TB
        Reflection["Reflection Module"]:::core
        Serialization["Serialization Module"]:::core
        Connection["Connection Module"]:::core
        Activity["Activity Module"]:::core
        Pipeline["Pipeline Module"]:::core
        ThreadPool["Thread Pool Module"]:::core
    end

    %% Utilities
    subgraph "Utilities"
        direction TB
        Buffer["TA_Buffer"]:::utils
        Variant["TA_Variant"]:::utils
        TypeList["TA_TypeList"]:::utils
        TypeFilter["TA_TypeFilter"]:::utils
        CommonTools["TA_CommonTools"]:::utils
    end

    %% Build Configuration
    subgraph "Build & CI"
        direction TB
        CMakeRoot["Root CMakeLists.txt"]:::build
        CMakeLib["ActivityFramework CMakeLists.txt"]:::build
        CI["CI Pipeline (.github/workflows)"]:::build
    end

    %% Tests
    subgraph "Unit Tests"
        direction TB
        Tests["GoogleTest Executables"]:::tests
    end

    %% Benchmarks
    subgraph "Benchmarks"
        direction TB
        Bench["Google Benchmark Executable"]:::bench
    end

    %% Relationships
    Reflection -->|"provides metadata to"| Serialization
    Reflection -->|"provides metadata to"| Connection
    Reflection -->|"provides metadata to"| Activity
    Serialization -->|"uses"| Buffer
    Serialization -->|"uses"| Variant
    Connection -->|"uses reflection for signals"| Reflection
    Activity -->|"triggers via"| Connection
    Activity -->|"scheduled on"| ThreadPool
    Pipeline -->|"assembles"| Activity
    Pipeline -->|"emits signals via"| Connection
    ThreadPool -->|"executes"| Activity

    CMakeRoot -->|builds| CMakeLib
    CMakeLib -->|builds| Reflection
    CMakeLib -->|builds| Serialization
    CMakeLib -->|builds| Connection
    CMakeLib -->|builds| Activity
    CMakeLib -->|builds| Pipeline
    CMakeLib -->|builds| ThreadPool
    CMakeLib -->|builds| Utilities
    CMakeRoot -->|configures| Tests
    CMakeRoot -->|configures| Bench

    CI -->|triggers| CMakeRoot
    CI -->|runs| Tests
    CI -->|runs| Bench

    %% Click Events
    click Reflection "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/Components/TA_MetaReflex.h"
    click Serialization "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/Components/TA_Serialization.h"
    click Connection "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/ITA_Connection.h"
    click Activity "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/ITA_ActivityCreator.h"
    click Pipeline "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/ITA_PipelineCreator.h"
    click ThreadPool "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/Components/TA_ThreadPool.h"
    click Buffer "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/Components/TA_Buffer.h"
    click Variant "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/Components/TA_Variant.h"
    click TypeList "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/Components/TA_TypeList.h"
    click TypeFilter "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/Components/TA_TypeFilter.h"
    click CommonTools "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/Src/Components/TA_CommonTools.cpp"
    click CMakeRoot "https://github.com/breakersol/activityframework/blob/master/CMakeLists.txt"
    click CMakeLib "https://github.com/breakersol/activityframework/blob/master/ActivityFramework/CMakeLists.txt"
    click CI "https://github.com/breakersol/activityframework/blob/master/.github/workflows/cmake.yml"
    click Tests "https://github.com/breakersol/activityframework/blob/master/Test/CMakeLists.txt"
    click Bench "https://github.com/breakersol/activityframework/blob/master/Benchmark/CMakeLists.txt"

    %% Styles
    classDef core fill:#cce5ff,stroke:#333,stroke-width:1px;
    classDef utils fill:#e5ccff,stroke:#333,stroke-width:1px;
    classDef build fill:#f2f2f2,stroke:#333,stroke-width:1px;
    classDef tests fill:#ccffcc,stroke:#333,stroke-width:1px;
    classDef bench fill:#ffe5cc,stroke:#333,stroke-width:1px;
```
