# rg-coyot3/coyot3pp architecture

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

- Interactive diagram: https://gitdiagram.com/rg-coyot3/coyot3pp
- Repository: https://github.com/rg-coyot3/coyot3pp

## Overview

##### Project Type and Purpose
- That Coyot3pp is a C++ toolkit/library composed of multiple interrelated components. Its main purpose is to encapsulate common development routines (like timings, logging, and module management) and domain-specific functionalities (e.g., image processing, real-time streaming, network communication, and database connectivity) into self-contained modules.
- The README emphasizes that it’s designed to “store” and recall low-level implementations so that developers don’t have to remember the exact implementation details each time they code.

##### File Structure
- The top-level directories clearly separate components by functionality. For instance:
- av/ contains multimedia-related modules such as image content (“Imag3”) and RTSP server (H264Rtsp).
- communication/ houses network connectors for MQTT and REST (“R3st”).
- cor3/ contains the core utilities (logger, module controller, and generic base classes).
- database/ splits into separate connectors for PostgreSQL, SQLite3, and QSqlit3.
- ros/ provides wrappers and integration with ROS2.
- services/ and minimal-examples/ further demonstrate usage (e.g., a websocket server and sample code).
- There is a consistent use of CMake build scripts in each module (e.g., CMakeLists.txt files), which indicates that the build system is unified even though the implementations are specialized.

##### Examining the README
- The README reinforces that the project is a toolkit for internal use, showing that components are “chosen” through preprocessor CMake options.
- It mentions each component has its own documentation and details installation, building, and dependency setup processes.
- The “choose components” section in the CMakeLists.txt confirms the modular nature—each feature is optionally built.

- Clear labels for each major component (e.g., “Cor3 Core,” “Imag3 – Image Processing,” “H264Rtsp Server,” “MQTT Connector,” “REST Connector,” “Database Connectors”).
- Annotations for build integration (e.g., “CMake Configuration Options” node) which explain that components are compiled conditionally based on user selections in the CMake options.

## Diagram (Mermaid)

```mermaid
flowchart TD
    T("Coyot3pp Toolkit"):::central

    subgraph "Core Utilities"
        C("Cor3 Core: Logging & Module Management"):::core
    end

    subgraph "Multimedia Modules"
        I("Imag3 - Image Processing"):::multimedia
        R("H264Rtsp Server"):::multimedia
    end

    subgraph "Communication Modules"
        M("MQTT Connector"):::communication
        S("REST Connector"):::communication
    end

    subgraph "Database Connectors"
        P("PostgreSQL Connector"):::database
        SQ("Sqlit3 Connector"):::database
        Q("QSqlit3 Connector"):::database
    end

    subgraph "Integration"
        R2("ROS2 Integration"):::integration
    end

    subgraph "Additional Services"
        W("Websocket Server"):::service
        E("Minimal Examples"):::example
    end

    cm("CMake Build System"):::build

    %% Connections
    T --> C
    T -->|"CMakeOptions"| cm
    C --> I
    I -->|"feedsData"| R
    C --> M
    C --> S
    C --> P
    C --> SQ
    C --> Q
    C --> R2
    C --> W
    C --> E

    %% Click Events
    click C "https://github.com/rg-coyot3/coyot3pp/tree/main/cor3"
    click I "https://github.com/rg-coyot3/coyot3pp/tree/main/av/image_content"
    click R "https://github.com/rg-coyot3/coyot3pp/tree/main/av/rtsp_server"
    click M "https://github.com/rg-coyot3/coyot3pp/tree/main/communication/mqtt"
    click S "https://github.com/rg-coyot3/coyot3pp/tree/main/communication/rest_connector"
    click P "https://github.com/rg-coyot3/coyot3pp/tree/main/database/postgresql"
    click SQ "https://github.com/rg-coyot3/coyot3pp/tree/main/database/sqlite3"
    click Q "https://github.com/rg-coyot3/coyot3pp/tree/main/database/qsqlite"
    click R2 "https://github.com/rg-coyot3/coyot3pp/tree/main/ros/ros2"
    click W "https://github.com/rg-coyot3/coyot3pp/tree/main/services/websocket_server"
    click E "https://github.com/rg-coyot3/coyot3pp/tree/main/minimal-examples"

    %% Styles
    classDef central fill:#ffcc00,stroke:#000,stroke-width:2px, color:#000
    classDef core fill:#cce5ff,stroke:#000,stroke-width:2px, color:#000
    classDef multimedia fill:#d1e7dd,stroke:#000,stroke-width:2px, color:#000
    classDef communication fill:#f8d7da,stroke:#000,stroke-width:2px, color:#000
    classDef database fill:#fff3cd,stroke:#000,stroke-width:2px, color:#000
    classDef integration fill:#d4edda,stroke:#000,stroke-width:2px, color:#000
    classDef service fill:#d1c4e9,stroke:#000,stroke-width:2px, color:#000
    classDef example fill:#fefefe,stroke:#000,stroke-width:2px, color:#000
    classDef build fill:#c6f6d5,stroke:#000,stroke-width:2px, color:#000
```
