# pablopicose/nexusnodeframework architecture

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

- Interactive diagram: https://gitdiagram.com/pablopicose/nexusnodeframework
- Repository: https://github.com/pablopicose/nexusnodeframework

## Overview

##### Core Library
- Contains the fundamental logic for an “application node”– including central classes like Application, Node, NodePtr, Timer, and utilities for command-line parsing.
- Acts as the backbone of the framework, managing the application’s initialization and core processing flow.

##### GUI Library
- Provides the basic classes to create a graphical user interface, including abstract base classes (GUIBase) and window management (GUIWindow).
- Likely used to facilitate cross-platform or common GUI elements for the framework’s applications.

##### Graphics Library
- Houses components such as MainWindow and supporting graphics-related routines.
- May build upon or extend functionality from the GUI module, focusing on rendering and visual presentation of data.

##### Network Library
- Implements networking capabilities with classes such as AbstractSocket, IOSocket, TcpServer, and TcpSocket.
- Encapsulates low-level network operations and I/O context management, enabling separation of networking concerns from core logic.

##### Build, Tests, and Deployment
- The project uses CMake as its building system (as seen with multiple CMakeLists.txt files) and Conan (conanfile.py) for dependency management.
- Tests are organized in separate directories according to the modules they verify (core, network, graphics).
- Dockerfile and GitHub workflows indicate that the project supports containerized builds and continuous integration.

B. Define Relationships and Interactions:
- That the Core module is central and interacts directly with each of the other libraries.
- That the GUI module might depend on or extend some of Core functionalities, and that Graphics is a specialized extension/implementation of the GUI framework.
- That the Network module provides auxiliary services such as networking capabilities and communicates with the Core component as needed (e.g., for handling network events or messages).

C. Emphasize Architectural Patterns and Design Principles:
- Modular design where each library is logically separated yet integrated through the Core component.
- Use of dependency injection or separation of concerns if known (the separation between Core, GUI, Graphics, and Network suggests a clear modular architecture).

D. Incorporate the Technologies and Tools:
- That the framework is developed in C/C++ (use of a .clang-format and .gitignore specific to C/C++ projects).

E. Visual Guidelines:
- Use clear, descriptive labels for each component.

F. Tailoring for the Specific Project:
- Since this is a framework (and not a typical application), emphasize the extensibility: note that additional services may be “plugged into” the Core architecture.

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Framework Components"
        MainApp("Main Application (main.cpp)"):::entry
        CoreLib("Core Library"):::lib
        GUILib("GUI Library"):::lib
        GraphicsLib("Graphics Library"):::lib
        NetworkLib("Network Library"):::lib
    end

    subgraph "Supporting Services"
        BuildDeploy("Build & Deployment"):::build
        Tests("Tests"):::tests
    end

    MainApp -->|"initializes"| CoreLib
    CoreLib -->|"integrates"| GUILib
    CoreLib -->|"integrates"| GraphicsLib
    CoreLib -->|"integrates"| NetworkLib

    MainApp -->|"triggers"| BuildDeploy
    CoreLib -->|"CI/CD"| BuildDeploy
    GUILib -->|"CI/CD"| BuildDeploy
    GraphicsLib -->|"CI/CD"| BuildDeploy
    NetworkLib -->|"CI/CD"| BuildDeploy

    Tests -->|"validates"| CoreLib
    Tests -->|"validates"| NetworkLib
    Tests -->|"validates"| GraphicsLib

    click CoreLib "https://github.com/pablopicose/nexusnodeframework/tree/main/lib/Core"
    click GUILib "https://github.com/pablopicose/nexusnodeframework/tree/main/lib/GUI"
    click GraphicsLib "https://github.com/pablopicose/nexusnodeframework/tree/main/lib/Graphics"
    click NetworkLib "https://github.com/pablopicose/nexusnodeframework/tree/main/lib/Network"
    click MainApp "https://github.com/pablopicose/nexusnodeframework/blob/main/main.cpp"
    click BuildDeploy "https://github.com/pablopicose/nexusnodeframework/blob/main/CMakeLists.txt"
    click Tests "https://github.com/pablopicose/nexusnodeframework/tree/main/tests"

    classDef lib fill:#AED6F1,stroke:#2471A3,stroke-width:2px;
    classDef entry fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef build fill:#A9DFBF,stroke:#28B463,stroke-width:2px;
    classDef tests fill:#F5B7B1,stroke:#CB4335,stroke-width:2px;
```
