# qaqo0o/smart5g-nonrtric-plt-ranpm architecture

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

- Interactive diagram: https://gitdiagram.com/qaqo0o/smart5g-nonrtric-plt-ranpm
- Repository: https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm

## Overview

##### Main Components
- Data Ingestion & Collection: Components such as “datafilecollector” (with FTP/SFTP and HTTP clients) are responsible for gathering files. They interact with configuration (e.g., certificates, truststores) and contain controllers/endpoints (e.g., StatusController) to monitor health.
- Data Transformation & Processing: The “pm‑file‑converter” module takes care of data conversion (e.g., XML to JSON) and includes components for Kafka integration and miniocollector functionality.
- Data Production & Distribution: The “pmproducer” module, with its repository, OAuth2, and Kafka topic listener implementations, handles the publishing of PM data to messaging systems.
- Logging & Metrics: “influxlogger” is designed to interface with time series databases like InfluxDB. It manages metric ingestion via Kafka, and configuration files indicate a REST client (AsyncRestClient) for sending PM logs.
- Additional Modules and Simulators: Modules such as “es‑rapp”, “https‑server”, “o1‑sim”, and “pm‑rapp” serve additional roles (for predictive analytics, secure communications, or simulation of network functions).
- Deployment & Orchestration: The “docker‑proj” directory and the “install/helm” folder (with multiple Helm charts) define the containerized deployments and the Kubernetes resource definitions. They outline services such as Kafka clusters (Strimzi), minio instances, InfluxDB setups, and other microservices.

##### Interactions and Data Flow
- Flow from external or network sources (for instance, FTP/SFTP sources or HTTPS endpoints) feeding into the Datafile Collector.
- Passage of processed or raw files from the Datafile Collector to the PM Producer, possibly via an internal API or directly to messaging (Kafka) channels.
- Components for authentication & security (e.g., OAuth2 elements in both the Datafile Collector and PM Producer) that secure the data flow.
- Integration with external infrastructure services like Kafka, InfluxDB, and potentially a storage service (Minio) for file/object storage.

##### Architectural Patterns and Technologies
- Modular Microservices: Each main functionality (collection, transformation, production, logging) is divided into separate services.
- Containerization & Orchestration: Use Docker and Helm to deploy these services on Kubernetes, as shown by the extensive Helm charts and Dockerfiles.
- Asynchronous Messaging: The use of Kafka-related listeners and producers in several services indicates event-driven communication.
- Security & Configuration Management: The existence of separate configuration directories (with certificates, truststores, and keystores) and OAuth2-related classes shows security is built into each service.
- RESTful Interfaces: The presence of Swagger configuration classes and REST client implementations in several modules implies internal APIs built on REST principles.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Sources
    FTP["FTP/SFTP Source"]:::external
    HTTPSrc["HTTPS External Request"]:::external
    OAUTH["OAuth2 Service"]:::external

    %% Data Ingestion & Collection Layer
    subgraph "Data Ingestion & Collection"
        DFC["Datafile Collector"]:::services
        HS["HTTPS Server"]:::services
    end

    %% Data Transformation & Processing Layer
    subgraph "Data Transformation & Processing"
        PFC["PM File Converter"]:::services
        PP["PM Producer"]:::services
    end

    %% Messaging / Integration Layer
    subgraph "Messaging/Integration"
        K["Kafka"]:::external
    end

    %% Logging & Metrics Layer
    subgraph "Logging & Metrics"
        IL["Influx Logger"]:::services
        IDB["InfluxDB"]:::external
    end

    %% Simulators & Analytics Layer
    subgraph "Simulators & Analytics"
        ER["ES RAPP"]:::services
        O1["O1 Simulator"]:::services
        PR["PM RAPP"]:::services
    end

    %% Deployment & Orchestration
    subgraph "Deployment & Orchestration"
        DP["Docker-Proj"]:::deployment
        IH["Helm Charts"]:::deployment
    end

    %% Data Flow Connections
    FTP -->|"sends_data"| DFC
    HTTPSrc -->|"feeds"| HS
    HS -->|"monitors"| DFC

    DFC -->|"forwards_raw_data"| PFC
    PFC -->|"converts_to_ready_format"| PP

    %% Security Connections
    DFC -->|"authenticates_via"| OAUTH
    PP -->|"authenticates_via"| OAUTH

    %% Data Distribution Connections
    PP -->|"publishes_to"| K
    K -->|"streams_to"| IL
    IL -->|"stores_into"| IDB
    PP -->|"sends_for_analytics"| ER
    PP -->|"sends_for_simulation"| PR

    %% Deployment Influence (services are deployed via orchestration)
    DP --> DFC
    DP --> HS
    DP --> PFC
    DP --> PP
    DP --> IL
    DP --> ER
    DP --> O1
    DP --> PR
    IH --> DP

    %% Click Events
    click DFC "https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm/tree/master/datafilecollector"
    click PFC "https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm/tree/master/pm-file-converter"
    click PP "https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm/tree/master/pmproducer"
    click IL "https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm/tree/master/influxlogger"
    click HS "https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm/tree/master/https-server"
    click ER "https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm/tree/master/es-rapp"
    click O1 "https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm/tree/master/o1-sim"
    click PR "https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm/tree/master/pm-rapp"
    click DP "https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm/tree/master/docker-proj"
    click IH "https://github.com/qaqo0o/smart5g-nonrtric-plt-ranpm/tree/master/install/helm"

    %% Styles
    classDef services fill:#bbdefb,stroke:#0d47a1,stroke-width:2px;
    classDef external fill:#ffe082,stroke:#ff6f00,stroke-width:2px;
    classDef deployment fill:#d1c4e9,stroke:#512da8,stroke-width:2px;
```
