# openaicellular/oaic architecture

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

- Interactive diagram: https://gitdiagram.com/openaicellular/oaic
- Repository: https://github.com/openaicellular/oaic

## Overview

##### Project Type and Purpose
- The project is an open-source cellular network control solution with a focus on RAN Intelligent Controller (RIC) functions.
- It integrates various modules for monitoring, control, and potential machine learning enhancements within a cellular network. The name “Open AI Cellular” and file names (e.g., ric-app-ic-e2like, ric-app-ml-e2like, srsRAN-e2) indicate a system that interfaces with components of a cellular network (such as srsRAN) while deploying custom RIC applications.
- The README emphasizes installation, quick-start documentation, and integration with GitHub Pages for the documentation site.

##### Analyzing the File Structure
- Top-level directories/files provide clues about architectural components:
– The docs directory contains extensive documentation on network setups, workshop guides, and deployment instructions, suggesting that the project supports multiple deployment scenarios (cloud, 5G networks, and workshop environments).
– Directories and scripts such as RIC-Deployment, deployKPIMON.sh, setup5GNetwork.sh, and generate_installation_script.py indicate that several automated deployment and configuration tools are provided.
– The presence of multiple “ric-app-…” directories (e.g., ric-app-ic-e2like, ric-app-ml-e2like, ric-plt-e2, ric-scp-kpimon) points to a modular approach where each app implements a specific function or service.
– asn1c likely relates to ASN.1 processing, which is common in telecommunication protocols.
– The srsRAN-e2 directory shows integration with a known open-source RAN implementation.
- There is also the oaic-t directory and a set of scripts which may be for testing or additional core functionalities.

a. Main Components:
– RIC Core: The central control unit that orchestrates interactions between various RIC apps and external network elements.
– RIC Applications/Modules: Include ric-app-ic-e2like, ric-app-ml-e2like, ric-plt-e2, and ric-scp-kpimon. These components handle specific functionalities (e.g., interference control, machine learning-based decisions, performance monitoring, etc.).
– External Network Interfaces: Integration with srsRAN-e2, which acts as part of the Radio Access Network (RAN) or as a simulation of one.
– ASN.1 Processing Module: The asn1c component might be used to compile or process protocol definitions.
– Deployment and Orchestration Tools: RIC-Deployment scripts, deployKPIMON.sh, setup5GNetwork.sh, and related files. These automate the configuration and deployment of the system in various environments.
– Documentation & Configuration: The docs directory, makefile, and configuration files support building and maintaining documentation as well as configuring the system.
– Supporting Tools/Services: GitHub workflows (.github) ensure CI/CD pipelines, which help in automated testing and deployment.

b. Relationships and Interactions:
– Indicate data/control flows between the RIC Core and its modular RIC Applications. Show how RIC core delegates tasks to or aggregates data from the individual apps.
– Demonstrate interactions with the external RAN (e.g., srsRAN-e2) where the RIC core issues commands, receives telemetry, or applies policy-based changes.
– Connect the deployment scripts and orchestration tools with the rest of the system to indicate the automation of setup and maintenance.
– The ASN.1 component should be connected to any modules that require protocol parsing or message decoding.

c. Architectural Patterns and Design Principles:
– Emphasize a modular design. Each "ric-app" is a self-contained module that plugs into a central RIC core.
– Note any separation of concerns (for instance, deployment/configuration is separated from operational control).
– Highlight the integration layer acting as a bridge to external network elements (srsRAN, possibly cloud environments reflected in some docs).

d. Technologies, Frameworks, or Libraries:
– Python-based tools (as seen in requirements.txt and the use of Sphinx for documentation) indicate that certain components are developed in Python.
– Shell scripting for deployment (deployKPIMON.sh, setup5GNetwork.sh).
– GitHub Actions for CI/CD (workflows in .github/workflows).
– Open-source telecom integration tools (srsRAN-e2 and asn1c).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Deployment & Automation"
        DA1("RIC-Deployment"):::deploy
        DA2("deployKPIMON.sh"):::deploy
        DA3("setup5GNetwork.sh"):::deploy
        DA4("generate_installation_script.py"):::deploy
    end

    subgraph "Documentation & CI/CD"
        DOC1("docs"):::doc
        DOC2("makefile"):::doc
        CI1(".github"):::doc
    end

    subgraph "Control Plane"
        CORE("RIC Core"):::core
        APP1("ric-app-ic-e2like"):::app
        APP2("ric-app-ml-e2like"):::app
        APP3("ric-plt-e2"):::app
        APP4("ric-scp-kpimon"):::app
        ASN("asn1c"):::app
    end

    subgraph "External RAN"
        EXT("srsRAN-e2"):::ext
    end

    subgraph "Support Services"
        SUP("oaic-t"):::support
    end

    DA1 -->|"automates"| CORE
    DOC1 -->|"supports"| CORE
    CI1 -->|"supports"| CORE

    CORE -->|"controls"| APP1
    CORE -->|"controls"| APP2
    CORE -->|"controls"| APP3
    CORE -->|"controls"| APP4
    CORE -->|"parses"| ASN
    CORE -->|"commands"| EXT
    SUP -->|"integrates"| CORE

    classDef core fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef app fill:#D5F5E3,stroke:#1E8449,stroke-width:2px;
    classDef ext fill:#FCF3CF,stroke:#B7950B,stroke-width:2px;
    classDef deploy fill:#FADBD8,stroke:#C0392B,stroke-width:2px;
    classDef doc fill:#F9E79F,stroke:#B9770E,stroke-width:2px;
    classDef support fill:#E8DAEF,stroke:#8E44AD,stroke-width:2px;

    click APP1 "https://github.com/openaicellular/oaic/tree/master/ric-app-ic-e2like"
    click APP2 "https://github.com/openaicellular/oaic/tree/master/ric-app-ml-e2like"
    click APP3 "https://github.com/openaicellular/oaic/tree/master/ric-plt-e2"
    click APP4 "https://github.com/openaicellular/oaic/tree/master/ric-scp-kpimon"
    click EXT "https://github.com/openaicellular/oaic/tree/master/srsRAN-e2"
    click ASN "https://github.com/openaicellular/oaic/tree/master/asn1c"
    click DA1 "https://github.com/openaicellular/oaic/tree/master/RIC-Deployment"
    click DA2 "https://github.com/openaicellular/oaic/blob/master/deployKPIMON.sh"
    click DA3 "https://github.com/openaicellular/oaic/blob/master/setup5GNetwork.sh"
    click DA4 "https://github.com/openaicellular/oaic/blob/master/generate_installation_script.py"
    click DOC1 "https://github.com/openaicellular/oaic/tree/master/docs"
    click DOC2 "https://github.com/openaicellular/oaic/tree/master/makefile"
    click CI1 "https://github.com/openaicellular/oaic/blob/master/.github"
    click SUP "https://github.com/openaicellular/oaic/tree/master/oaic-t"
```
