# mulesoft/docs-accelerators architecture

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

- Interactive diagram: https://gitdiagram.com/mulesoft/docs-accelerators
- Repository: https://github.com/mulesoft/docs-accelerators

## Overview

##### Project Type & Purpose
- This repository is **not** an application or service but a **static documentation site** built with **Antora**, organizing AsciiDoc-based documentation for multiple “accelerator” modules (e.g., consumer-goods, financial-services, healthcare, etc.) and their versioned releases.
- The goal is to maintain modular, versioned docs for each domain area, render them into a unified website, and publish the static site to a hosting platform (e.g., GitHub Pages, S3/CloudFront).

##### File Structure Analysis
- Top-level directories (`accelerators-cim/`, `consumer-goods/`, `financial-services/`, `healthcare/`, `retail/`, etc.) each contain versioned subfolders (`1.3/`, `2.0/`, `3.0/`, …), each with:
- an **antora.yml** descriptor
- a **modules/ROOT/pages** tree of `.adoc` files
- optional **assets** (images, Graffle files)
- The **modules/ROOT/pages/accel** folder holds global/shared AsciiDoc content.
- Root files (`README.adoc`, `CODE_OF_CONDUCT.adoc`, etc.) govern repository-wide policies and may seed the Antora playbook.

##### Key Insights from README
- Minimal content; focuses on contribution guidelines, licensing, and security.
- No runtime code or server components—Antora is invoked to compile the docs.

##### Components
a. **Git Repository (Source)**
- Houses all versioned content modules and documentation policies.
b. **Antora Playbook & UI Bundle**
- Playbook (typically `antora-playbook.yml`) references modules via file paths.
- UI Bundle (themes, templates, CSS/JS) provides branding and layout.
c. **AsciiDoc Processor & Node.js**
- Underlying engine invoked by Antora CLI to convert `.adoc` → HTML.
d. **Build/CI System**
- CI pipeline (GitHub Actions / Jenkins / Travis) triggers on push/PR:
- Lints AsciiDoc
- Runs Antora build
- Uploads artifacts
e. **Static Site Output**
- Directory of generated HTML/CSS/JS/images.
- Packaged and deployed to hosting (S3 bucket / GitHub Pages / CDN).
f. **Hosting & CDN**
- Serves static files with low latency.
- Optional search index (ElasticSearch or Algolia) for full-text search.
g. **End Users / Contributors**
- Browser clients consume the static site.
- Contributors submit PRs back to Git repo.

##### Relationships & Data Flow
- **Developers/Contributors** → commit `.adoc` changes → **Git**
- **CI System** fetches repo → runs **Antora CLI + AsciiDoc Processor** using **Playbook** + **UI Bundle** → produces **Static Site**
- **CI** deploys static output to **Hosting/CDN** → **End User Browsers** fetch pages
- (Optional) **Search Service** consumes generated search index during build, serves search queries client-side

##### Architectural Patterns & Principles
- **Modular Composition**: Each domain/version is an independent module. Antora aggregates them into one site.
- **Content Versioning**: Parallel version folders allow historical docs.
- **Separation of Concerns**:
- Content (AsciiDoc) vs. Presentation (UI bundle) vs. Build Logic (playbook, CI).
- **Immutable Deployment**: Static artifacts ensure predictable, cacheable delivery.

##### Relevant Technologies & Frameworks
- **Antora** (documentation site generator)
- **AsciiDoc** (markup)
- **Node.js** (runtime for Antora CLI)
- **Git/GitHub** (source control and PRs)
- **CI/CD** (GitHub Actions / Jenkins / Travis)
- **CDN/Hosting** (S3, CloudFront, GitHub Pages)
- **Search** (optional Algolia or Lunr.js)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Source & Contribution Layer
    subgraph "Source & Contribution Layer"
        direction TB
        Contrib("Contributors"):::user
        GitRepo["Git Repository (./)"]:::storage
        Policies["Repository-wide Policy & Docs"]:::doc
        SharedModule["Shared AsciiDoc Module"]:::module
        subgraph "Domain Modules"
            direction TB
            HomeMod["Accelerators Home Module"]:::module
            CIM13["CIM Module v1.3"]:::module
            CIM20["CIM Module v2.0"]:::module
            CG30["Consumer Goods v3.0"]:::module
            CG40["Consumer Goods v4.0"]:::module
            FS18["Financial Services v1.8"]:::module
            HC218["Healthcare v2.18"]:::module
            LS11["Life Sciences v1.1"]:::module
            MF13["Manufacturing v1.3"]:::module
            RT27["Retail v2.7"]:::module
            SF10["Salesforce OMS v1.0"]:::module
        end
    end

    %% Build & Render Layer
    subgraph "Build & Render Layer"
        direction TB
        CI["CI System"]:::service
        AntoraCLI["Antora CLI"]:::service
        Playbook["Antora Playbook"]:::config
        UIBundle["UI Bundle"]:::asset
        AsciiProc["AsciiDoc Processor"]:::service
    end

    %% Deployment & Delivery Layer
    subgraph "Deployment & Delivery Layer"
        direction TB
        StaticOut["Static Site Output"]:::artifact
        Hosting["Hosting/CDN (S3/CloudFront)"]:::cloud
        SearchSvc["Search Service (Algolia/Lunr.js)"]:::cloud
    end

    %% Consumption Layer
    subgraph "Consumption Layer"
        direction TB
        Browser["End User Browser"]:::user
    end

    %% Connections
    Contrib -->|"submit PRs"| GitRepo
    GitRepo -->|"trigger"| CI
    CI -->|"uses"| Playbook
    CI -->|"invokes"| AntoraCLI
    AntoraCLI -->|"processes"| AsciiProc
    AntoraCLI -->|"applies"| UIBundle
    Playbook -->|"aggregates modules"| SharedModule
    Playbook -->|"aggregates modules"| HomeMod
    Playbook -->|"aggregates modules"| CIM13
    Playbook -->|"aggregates modules"| CIM20
    Playbook -->|"aggregates modules"| CG30
    Playbook -->|"aggregates modules"| CG40
    Playbook -->|"aggregates modules"| FS18
    Playbook -->|"aggregates modules"| HC218
    Playbook -->|"aggregates modules"| LS11
    Playbook -->|"aggregates modules"| MF13
    Playbook -->|"aggregates modules"| RT27
    Playbook -->|"aggregates modules"| SF10
    AntoraCLI -->|"generates"| StaticOut
    CI -->|"deploys"| Hosting
    StaticOut --> Hosting
    StaticOut --> SearchSvc
    Hosting --> Browser
    SearchSvc --> Browser

    %% Click Events for Mapped Components
    click GitRepo "https://github.com/mulesoft/docs-accelerators/tree/latest/./"
    click Policies "https://github.com/mulesoft/docs-accelerators/blob/latest/CODE_OF_CONDUCT.adoc"
    click Policies "https://github.com/mulesoft/docs-accelerators/blob/latest/CONTRIBUTING.md"
    click Policies "https://github.com/mulesoft/docs-accelerators/blob/latest/LICENSE.txt"
    click Policies "https://github.com/mulesoft/docs-accelerators/blob/latest/README.adoc"
    click Policies "https://github.com/mulesoft/docs-accelerators/blob/latest/SECURITY.adoc"
    click SharedModule "https://github.com/mulesoft/docs-accelerators/tree/latest/modules/ROOT/pages/accel"
    click SharedModule "https://github.com/mulesoft/docs-accelerators/blob/latest/modules/ROOT/pages/accel/shared-assets.adoc"
    click HomeMod "https://github.com/mulesoft/docs-accelerators/blob/latest/accelerators-home/antora.yml"
    click HomeMod "https://github.com/mulesoft/docs-accelerators/tree/latest/accelerators-home/modules/ROOT/pages"
    click CIM13 "https://github.com/mulesoft/docs-accelerators/blob/latest/accelerators-cim/1.3/antora.yml"
    click CIM13 "https://github.com/mulesoft/docs-accelerators/tree/latest/accelerators-cim/1.3/modules/ROOT/pages"
    click CIM20 "https://github.com/mulesoft/docs-accelerators/blob/latest/accelerators-cim/2.0/antora.yml"
    click CIM20 "https://github.com/mulesoft/docs-accelerators/tree/latest/accelerators-cim/2.0/modules/ROOT/pages"
    click CG30 "https://github.com/mulesoft/docs-accelerators/blob/latest/consumer-goods/3.0/antora.yml"
    click CG30 "https://github.com/mulesoft/docs-accelerators/tree/latest/consumer-goods/3.0/modules/ROOT/pages"
    click CG40 "https://github.com/mulesoft/docs-accelerators/blob/latest/consumer-goods/4.0/antora.yml"
    click CG40 "https://github.com/mulesoft/docs-accelerators/tree/latest/consumer-goods/4.0/modules/ROOT/pages"
    click FS18 "https://github.com/mulesoft/docs-accelerators/blob/latest/financial-services/1.8/antora.yml"
    click FS18 "https://github.com/mulesoft/docs-accelerators/tree/latest/financial-services/1.8/modules/ROOT/pages"
    click HC218 "https://github.com/mulesoft/docs-accelerators/blob/latest/healthcare/2.18/antora.yml"
    click HC218 "https://github.com/mulesoft/docs-accelerators/tree/latest/healthcare/2.18/modules/ROOT/pages"
    click LS11 "https://github.com/mulesoft/docs-accelerators/blob/latest/life-sciences/1.1/antora.yml"
    click LS11 "https://github.com/mulesoft/docs-accelerators/tree/latest/life-sciences/1.1/modules/ROOT/pages"
    click MF13 "https://github.com/mulesoft/docs-accelerators/blob/latest/manufacturing/1.3/antora.yml"
    click MF13 "https://github.com/mulesoft/docs-accelerators/tree/latest/manufacturing/1.3/modules/ROOT/pages"
    click RT27 "https://github.com/mulesoft/docs-accelerators/blob/latest/retail/2.7/antora.yml"
    click RT27 "https://github.com/mulesoft/docs-accelerators/tree/latest/retail/2.7/modules/ROOT/pages"
    click SF10 "https://github.com/mulesoft/docs-accelerators/blob/latest/salesforce-oms/1.0/antora.yml"
    click SF10 "https://github.com/mulesoft/docs-accelerators/tree/latest/salesforce-oms/1.0/modules/ROOT/pages"

    %% Styles
    classDef user fill:#f9f,stroke:#333,stroke-width:1px
    classDef storage fill:#bbf,stroke:#333,stroke-width:1px
    classDef doc fill:#eef,stroke:#333,stroke-width:1px
    classDef module fill:#cfc,stroke:#333,stroke-width:1px
    classDef service fill:#fcf,stroke:#333,stroke-width:1px
    classDef config fill:#ffd,stroke:#333,stroke-width:1px
    classDef asset fill:#fdd,stroke:#333,stroke-width:1px
    classDef artifact fill:#ddf,stroke:#333,stroke-width:1px
    classDef cloud fill:#def,stroke:#333,stroke-width:1px
```
