# azure/logicappstemplates architecture

> Architecture diagram of the GitHub repository azure/logicappstemplates, 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/azure/logicappstemplates
- Repository: https://github.com/azure/logicappstemplates

## Overview

##### Project Type and Purpose
- The project appears to be an accelerator or template repository filled with multiple workflow-based modules. Each module is contained in its own folder (for example, “accelerator-index-retrieve-ai-sharepoint-aisearch”, “chat-with-documents-ai”, “ingest-index-ai-blob-storage-rag”, etc.) and contains a manifest.json plus a workflow.json. This indicates that the project’s purpose is to provide a set of pre-built “accelerator” workflows or integration templates – likely meant for ingestion, indexing, retrieval, and interactions with various data sources (SharePoint, SQL, blob storage, OneDrive, etc.) as well as messaging systems (IBM MQ, Azure Service Bus, etc.).
- The README doesn’t detail the technical internals (since it’s still in a templated state), but it does offer guidance on contribution processes and licensing. This further positions the repository as an open-source, modular toolkit aimed at rapidly integrating various systems and services.

##### File Structure
- Top-Level Organization: At the root you have GitHub-specific directories (workflows, security, support), configuration files (e.g., manifest-related files, package.json, etc.), and a large number of subdirectories, each representing a distinct accelerator or workflow module.
- Module Structure: In many subdirectories (for instance, under “chat-with-documents-ai”, “ingest-index-ai-…”, “get-message-…” etc.), each module is subdivided into a “default” folder containing a manifest.json and workflow.json. This format implies that each accelerator is self-contained and defined by its “manifest” (defining metadata and perhaps integration points) and its “workflow” (detailing the process or orchestration logic).
- Utility Scripts: Files like patch_template_variables.js and restructure_templates.js suggest there is a system to dynamically adjust or configure templates. These likely play into the build or deployment process.
- CI/CD Integration: The .github/workflows folder holds definitions for code analysis and validation, pointing to an automated build and testing pipeline.

a. Main Components:
- Accelerator / Workflow Modules: Each of the numerous folders (e.g., “chat-with-documents-ai”, “ingest-index-ai-sharepoint-rag”, “get-message-service-bus-…” etc.) represents a modular component. Group these by purpose:
- Ingestion/Indexing Modules (e.g., ingest-index-ai-blob-storage-rag, ingest-index-ai-azure-files-*, ingest-index-ai-one-drive-*)
- Document Interaction Modules (e.g., chat-with-documents-ai, chat-with-documents-sql)
- Data Analysis Modules (e.g., analyze-documents-ai-docintelligence, analyze-images-ai-rag)
- Messaging/Integration Modules (e.g., get-message-ibm-mq-*, get-message-service-bus-*, get-sales-order-status-sap-teams-bapi, etc.)
- Utility and Supporting Modules (e.g., vectorize-* modules, send-alerts-business-process-tracking, send-avs-logs-to-log-server)
- CI/CD Pipeline: Represent the GitHub workflows that automate code analysis (CodeQL, validation) and possibly deployment.
- External Services: Indicate integration points with external systems such as:
- Cloud storage or file systems (Azure Files, Blob Storage, OneDrive, SharePoint)
- Messaging and event services (IBM MQ, Azure Service Bus, SAP systems via BAPI)
- Log or alert servers (from send-avs-logs-to-log-server and send-alert modules)

b. Relationships and Interactions:
- Ingestion modules capture data from external sources and forward it to indexing or analysis modules.
- Chat or query modules consume indexed data to provide search or retrieval capabilities.
- Messaging modules interface with external queues or topics to either trigger workflows or to receive/process data.
- Utility components (such as vectorize modules) likely preprocess data before passing it along.
- The CI/CD pipeline connects to all modules as it continuously validates and deploys these workflows.

c. Architectural Patterns and Design Principles:
- Modular/Microservice Design: Each accelerator is a self-contained unit defined by its manifest and workflow files.
- Loose Coupling: Modules are designed in such a way that exchanging one component (e.g., swapping one ingestion template for another) is straightforward.
- Extensibility: With many accelerators available, adding new modules for other integrations or modifying existing ones can be done without impacting the system core.

d. Relevant Technologies:
- Workflow and manifest specifications (using JSON files) indicate that orchestration follows a declarative configuration style.
- Integration with various external services (as the names imply support for IBM MQ, Azure Service Bus, SAP via BAPI, etc.) means the solutions are leaning on cloud and enterprise integration patterns.
- Use of CI/CD (GitHub Actions) ensures that standard development and testing tools are part of the overall architecture.

##### Final Advice
- Since the repository is structured around a modular system with many accelerators, try to be exhaustive by including as many components as practically possible – this will make integration points and data flows explicitly clear.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Accelerator Modules"
        subgraph "Ingestion & Indexing"
            ingest1["Ingest - SharePoint"]:::module
            ingest2["Ingest - Blob Storage"]:::module
            ingest3["Ingest - Azure Files"]:::module
            ingest4["Ingest - Azure Files Recurrence"]:::module
            ingest5["Ingest - Azure Files Schedule"]:::module
            ingest6["Ingest - HTTP"]:::module
            ingest7["Ingest - OneDrive Business"]:::module
            ingest8["Ingest - OneDrive Schedule"]:::module
            ingest9["Ingest - SFTP"]:::module
        end
        subgraph "Document Interaction (Chat)"
            chat1["Chat with Documents (SharePoint)"]:::module
            chat2["Chat with Documents (SQL)"]:::module
            chat3["Chat with Documents (Standalone)"]:::module
        end
        subgraph "Data Analysis"
            analyze1["Analyze Documents (DocIntelligence)"]:::module
            analyze2["Analyze Images (RAG)"]:::module
        end
        subgraph "Messaging / Integration"
            msg1["IBM MQ Queue Browse Lock Abort"]:::module
            msg2["Service Bus Queue Peek Lock Abandon"]:::module
            msg3["Service Bus Queue Peek Lock Renew Sequential"]:::module
            msg4["Service Bus Queue Peek Lock Renew"]:::module
            msg5["Service Bus Topic Peek Lock Abandon"]:::module
            msg6["Service Bus Topic Peek Lock Renew"]:::module
            msg7["Sales Order Status SAP Teams BAPI"]:::module
            msg8["Post SAP Goodsmovement BAPI"]:::module
            msg9["Unblock User SAP Teams Self-Service BAPI"]:::module
            msg10["Receive Request Send Response"]:::module
        end
        subgraph "Synchronization / Integration"
            sync1["Sync Business Partner SAP SharePoint OData"]:::module
            sync2["Sync Sales Order SAP Blob Storage OData"]:::module
        end
        subgraph "Vectorization / Preprocessing"
            vector1["Vectorize OneDrive AISearch Request"]:::module
            vector2["Vectorize OneDrive AISearch Schedule"]:::module
            vector3["Vectorize OneDriveForBusiness AISearch Request"]:::module
            vector4["Vectorize OneDriveForBusiness AISearch Schedule"]:::module
            vector5["Vectorize SharePoint AISearch Request"]:::module
            vector6["Vectorize SharePoint AISearch Schedule"]:::module
        end
        subgraph "Utility Modules"
            util1["Send Alerts Business Process Tracking"]:::utility
            util2["Send AVS Logs to Log Server"]:::utility
            util3["Try Catch"]:::utility
        end
    end

    subgraph "CI/CD Pipeline"
        cicd["GitHub Actions Workflows"]:::cicd
    end

    subgraph "Utility Scripts"
        script1["Patch Template Variables"]:::utilityScript
        script2["Restructure Templates"]:::utilityScript
        script3["Validate Templates"]:::utilityScript
    end

    %% CI/CD Pipeline to Accelerators and Scripts
    cicd --> ingest1
    cicd --> ingest2
    cicd --> ingest3
    cicd --> ingest4
    cicd --> ingest5
    cicd --> ingest6
    cicd --> ingest7
    cicd --> ingest8
    cicd --> ingest9
    cicd --> chat1
    cicd --> chat2
    cicd --> chat3
    cicd --> analyze1
    cicd --> analyze2
    cicd --> msg1
    cicd --> msg2
    cicd --> msg3
    cicd --> msg4
    cicd --> msg5
    cicd --> msg6
    cicd --> msg7
    cicd --> msg8
    cicd --> msg9
    cicd --> msg10
    cicd --> sync1
    cicd --> sync2
    cicd --> vector1
    cicd --> vector2
    cicd --> vector3
    cicd --> vector4
    cicd --> vector5
    cicd --> vector6
    cicd --> util1
    cicd --> util2
    cicd --> util3
    cicd --> script1
    cicd --> script2
    cicd --> script3

    %% Example data flows between modules
    ingest1 -->|"FetchData"| chat1
    ingest2 -->|"IndexData"| analyze1
    chat1 -->|"QueryData"| analyze2
    msg1 -->|"Integration"| chat1
    sync1 -->|"Synchronize"| analyze1
    vector1 -->|"Preprocess"| chat1
    vector5 -->|"Preprocess"| analyze1

    %% Styles
    classDef module fill:#e0f7fa,stroke:#006064,stroke-width:2px;
    classDef utility fill:#ffecb3,stroke:#ff9800,stroke-width:2px;
    classDef cicd fill:#e1bee7,stroke:#8e24aa,stroke-width:2px;
    classDef utilityScript fill:#c8e6c9,stroke:#43a047,stroke-width:2px;

    %% Click Events for Ingestion/Indexing
    click ingest1 "https://github.com/azure/logicappstemplates/tree/main/accelerator-index-retrieve-ai-sharepoint-aisearch/ingest-index-ai-sharepoint-rag"
    click ingest2 "https://github.com/azure/logicappstemplates/tree/main/ingest-index-ai-blob-storage-rag"
    click ingest3 "https://github.com/azure/logicappstemplates/tree/main/ingest-index-ai-azure-files-rag"
    click ingest4 "https://github.com/azure/logicappstemplates/tree/main/ingest-index-ai-azure-files-recurrence-rag"
    click ingest5 "https://github.com/azure/logicappstemplates/tree/main/ingest-index-ai-azure-files-schedule-rag"
    click ingest6 "https://github.com/azure/logicappstemplates/tree/main/ingest-index-ai-http-rag"
    click ingest7 "https://github.com/azure/logicappstemplates/tree/main/ingest-index-ai-one-drive-business-rag"
    click ingest8 "https://github.com/azure/logicappstemplates/tree/main/ingest-index-ai-one-drive-schedule-rag"
    click ingest9 "https://github.com/azure/logicappstemplates/tree/main/ingest-index-ai-sftp-rag"

    %% Click Events for Document Interaction (Chat)
    click chat1 "https://github.com/azure/logicappstemplates/tree/main/accelerator-index-retrieve-ai-sharepoint-aisearch/chat-with-documents-ai"
    click chat2 "https://github.com/azure/logicappstemplates/tree/main/accelerator-index-retrieve-resumes-sql/chat-with-documents-sql"
    click chat3 "https://github.com/azure/logicappstemplates/tree/main/chat-with-documents-ai"

    %% Click Events for Data Analysis
    click analyze1 "https://github.com/azure/logicappstemplates/tree/main/analyze-documents-ai-docintelligence"
    click analyze2 "https://github.com/azure/logicappstemplates/tree/main/analyze-images-ai-rag"

    %% Click Events for Messaging/Integration
    click msg1 "https://github.com/azure/logicappstemplates/tree/main/get-message-ibm-mq-queue-browse-lock-abort"
    click msg2 "https://github.com/azure/logicappstemplates/tree/main/get-message-service-bus-queue-peek-lock-abandon"
    click msg3 "https://github.com/azure/logicappstemplates/tree/main/get-message-service-bus-queue-peek-lock-renew-sequential-convoy"
    click msg4 "https://github.com/azure/logicappstemplates/tree/main/get-message-service-bus-queue-peek-lock-renew"
    click msg5 "https://github.com/azure/logicappstemplates/tree/main/get-message-service-bus-topic-peek-lock-abandon"
    click msg6 "https://github.com/azure/logicappstemplates/tree/main/get-message-service-bus-topic-peek-lock-renew"
    click msg7 "https://github.com/azure/logicappstemplates/tree/main/get-sales-order-status-sap-teams-bapi"
    click msg8 "https://github.com/azure/logicappstemplates/tree/main/post-sap-goodsmovement-using-bapi"
    click msg9 "https://github.com/azure/logicappstemplates/tree/main/unblock-user-sap-teams-self-service-bapi"
    click msg10 "https://github.com/azure/logicappstemplates/tree/main/receive-request-send-response"

    %% Click Events for Synchronization / Integration
    click sync1 "https://github.com/azure/logicappstemplates/tree/main/sync-business-partner-sap-sharepoint-odata"
    click sync2 "https://github.com/azure/logicappstemplates/tree/main/sync-sales-order-sap-blob-storage-odata"

    %% Click Events for Vectorization/Preprocessing
    click vector1 "https://github.com/azure/logicappstemplates/tree/main/vectorize-onedrive-aisearch-request"
    click vector2 "https://github.com/azure/logicappstemplates/tree/main/vectorize-onedrive-aisearch-schedule"
    click vector3 "https://github.com/azure/logicappstemplates/tree/main/vectorize-onedriveforbusiness-aisearch-request"
    click vector4 "https://github.com/azure/logicappstemplates/tree/main/vectorize-onedriveforbusiness-aisearch-schedule"
    click vector5 "https://github.com/azure/logicappstemplates/tree/main/vectorize-sharepoint-aisearch-request"
    click vector6 "https://github.com/azure/logicappstemplates/tree/main/vectorize-sharepoint-aisearch-schedule"

    %% Click Events for Utility Modules
    click util1 "https://github.com/azure/logicappstemplates/tree/main/send-alerts-business-process-tracking"
    click util2 "https://github.com/azure/logicappstemplates/tree/main/send-avs-logs-to-log-server"
    click util3 "https://github.com/azure/logicappstemplates/tree/main/try-catch"

    %% Click Event for CI/CD Pipeline
    click cicd "https://github.com/azure/logicappstemplates/tree/main/.github/workflows"

    %% Click Events for Utility Scripts
    click script1 "https://github.com/azure/logicappstemplates/blob/main/patch_template_variables.js"
    click script2 "https://github.com/azure/logicappstemplates/blob/main/restructure_templates.js"
    click script3 "https://github.com/azure/logicappstemplates/blob/main/validate_templates.ts"
```
