# danghung1202/akamai-automation architecture

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

- Interactive diagram: https://gitdiagram.com/danghung1202/akamai-automation
- Repository: https://github.com/danghung1202/akamai-automation

## Overview

##### Component Relationships

**[Task Modules] → [Core Services] → [Puppeteer Browser] → [Akamai Control Panel]**
- ↑

- [Helper Utilities]

##### Specific Elements

a) Task Execution Layer:
- Parallel processing capabilities
- Clustering support
- Task-specific workflows

b) Core Service Layer:
- Property management workflows
- Cloudlets configuration handling
- Rule and behavior management
- Variable handling

c) Helper Layer:
- File I/O operations (CSV, JSON, general files)
- Logging mechanisms
- Navigation helpers

d) External Integration:
- Puppeteer browser automation
- Akamai Control Panel interaction points

##### Important Flows to Highlight

- Authentication flow
- Property configuration workflow
- Version control process
- Active/Staging deployment flow
- Parallel execution patterns

##### Technical Details to Emphasize

- Puppeteer integration points
- File system interactions
- Parallel processing capabilities
- Documentation generation flow

Remember to include these specific aspects of the project:
- Documentation generation system (Docusaurus)
- Task parallelization capabilities
- File system interactions for data persistence
- Logging system integration points

This system design should clearly communicate how the automation tool interacts with Akamai's platform while maintaining a clear separation of concerns between different functional areas.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client["Client Layer"]
        direction TB
        Tasks["Task Execution Modules"]:::task
        Cluster["Parallel Processing"]:::task
        ActiveStaging["Active/Staging Tasks"]:::task
        PropertyVersion["Property Version Tasks"]:::task
        CloudletsActive["Cloudlets Active Tasks"]:::task
    end

    subgraph Core["Core Service Layer"]
        direction TB
        Property["Property Management"]:::core
        Cloudlets["Cloudlets Management"]:::core
        Rule["Rule Management"]:::core
        Behavior["Behavior Management"]:::core
        Variable["Variable Management"]:::core
        CloudletsRule["Cloudlets Rule Management"]:::core
        Criteria["Criteria Management"]:::core
    end

    subgraph Helper["Helper/Utility Layer"]
        direction TB
        HelperUtils["Helper Utilities"]:::helper
        CSV["CSV Operations"]:::helper
        JSON["JSON Operations"]:::helper
        FileOps["File Operations"]:::helper
        Download["Download Operations"]:::helper
        Log["Logging System"]:::helper
        Menu["Menu System"]:::helper
    end

    subgraph External["External Integration Layer"]
        direction TB
        Puppeteer["Puppeteer Browser"]:::external
        Akamai["Akamai Control Panel"]:::external
    end

    subgraph Docs["Documentation Layer"]
        direction TB
        PropertyDocs["Property Documentation"]:::docs
        CloudletsDocs["Cloudlets Documentation"]:::docs
        UseCases["Use Cases"]:::docs
    end

    %% Connections
    Tasks --> Core
    Core --> Puppeteer
    Puppeteer --> Akamai
    Helper --> Core
    Core --> Docs

    %% Task Layer Connections
    Tasks --> Cluster
    Tasks --> ActiveStaging
    Tasks --> PropertyVersion
    Tasks --> CloudletsActive

    %% Helper Layer Connections
    HelperUtils --> CSV
    HelperUtils --> JSON
    HelperUtils --> FileOps
    HelperUtils --> Download

    %% Core Layer Connections
    Property --> CloudletsRule
    Cloudlets --> CloudletsRule
    Property --> Criteria
    Rule --> Behavior
    Rule --> Variable

    %% Documentation Layer Connections
    PropertyDocs --> UseCases
    CloudletsDocs --> UseCases

    %% Click Events
    click Property "https://github.com/danghung1202/akamai-automation/blob/main/property.js"
    click Cloudlets "https://github.com/danghung1202/akamai-automation/blob/main/cloudlets.js"
    click Rule "https://github.com/danghung1202/akamai-automation/blob/main/rule.js"
    click Behavior "https://github.com/danghung1202/akamai-automation/blob/main/behavior.js"
    click Variable "https://github.com/danghung1202/akamai-automation/blob/main/variable.js"
    click Log "https://github.com/danghung1202/akamai-automation/blob/main/log.js"
    click Menu "https://github.com/danghung1202/akamai-automation/blob/main/menu.js"
    click HelperUtils "https://github.com/danghung1202/akamai-automation/tree/main/helper/"
    click CSV "https://github.com/danghung1202/akamai-automation/blob/main/helper/csv-io.js"
    click JSON "https://github.com/danghung1202/akamai-automation/blob/main/helper/json-io.js"
    click FileOps "https://github.com/danghung1202/akamai-automation/blob/main/helper/file-io.js"
    click Download "https://github.com/danghung1202/akamai-automation/blob/main/helper/file-download.js"
    click Tasks "https://github.com/danghung1202/akamai-automation/tree/main/tasks/"
    click ActiveStaging "https://github.com/danghung1202/akamai-automation/tree/main/tasks/active-staging/"
    click PropertyVersion "https://github.com/danghung1202/akamai-automation/tree/main/tasks/property-get-version/"
    click CloudletsActive "https://github.com/danghung1202/akamai-automation/tree/main/tasks/cloudlets-active/"
    click Cluster "https://github.com/danghung1202/akamai-automation/tree/main/tasks/cluster/"
    click PropertyDocs "https://github.com/danghung1202/akamai-automation/tree/main/docs/docs/property/"
    click CloudletsDocs "https://github.com/danghung1202/akamai-automation/tree/main/docs/docs/cloudlets/"
    click UseCases "https://github.com/danghung1202/akamai-automation/tree/main/docs/docs/usecases/"
    click Criteria "https://github.com/danghung1202/akamai-automation/blob/main/criteria.js"
    click CloudletsRule "https://github.com/danghung1202/akamai-automation/blob/main/cloudlets-rule.js"

    %% Styles
    classDef core fill:#2374ab,stroke:#333,stroke-width:2px
    classDef helper fill:#57cc99,stroke:#333,stroke-width:2px
    classDef task fill:#9b5de5,stroke:#333,stroke-width:2px
    classDef external fill:#f15bb5,stroke:#333,stroke-width:2px
    classDef docs fill:#fee440,stroke:#333,stroke-width:2px
```
