# hlxsites/wknd architecture

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

- Interactive diagram: https://gitdiagram.com/hlxsites/wknd
- Repository: https://github.com/hlxsites/wknd

## Overview

##### Project type and purpose
- This is a Helix-based static site project (“WKND Demo”) that uses Adobe Edge Delivery Services to build and deliver a block-driven website.
- Key features:
- Document‐based content authoring (content lives in SharePoint/Google Drive)
- A/B experimentation and campaigns (client‐side plugin + RUM conversion tracking)
- Slack Bot integration for Lighthouse/conversion monitoring
- Standard CI (GitHub Actions) for test and release

##### File structure
- Top‐level directories:
- blocks/           → reusable UI components (JS+CSS)
- plugins/          → optional Helix plugins (experimentation, rum-conversion)
- scripts/          → client‐side utilities (Franklin core, analytics, consent)
- styles/           → global and feature CSS
- documentation/    → conceptual docs (audiences, experiments, campaigns)
- test/             → unit tests (blocks, scripts) + Puppeteer traffic simulator
- .github/workflows → CI jobs (run-tests, release)
- Config files: package.json (build & dev scripts), fstab.yaml (content source mapping), helix-version.txt

##### README for additional insights
- Describes local development: Helix CLI (`hlx up`) to proxy pages locally.
- CI/CD: GitHub Actions deploy to Preview & Live via Edge Delivery Services.
- External integrations:
- AEM Sidekick extension (for authoring + publishing)
- RUM service (helix-rum-js) for sampling & conversion tracking
- Slack Bot (helix-bot) for reporting

##### Final advice
- You capture both build‐time (CI/CD) and run‐time (delivery + client execution) phases.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Authoring
    subgraph "Content Authoring"
        CM["SharePoint / Google Drive"]:::external
    end

    %% Build Pipeline
    subgraph "Development / Build Pipeline"
        GH["GitHub Repository"]:::build
        FST["fstab.yaml"]:::build
        RT["Run Tests"]:::build
        RL["Release / Deploy"]:::build
    end

    %% Edge Delivery
    subgraph "Edge Delivery Services"
        ED["Helix Pages (CDN & Edge Functions)"]:::runtime
    end

    %% Client Runtime
    subgraph "Client Browser"
        BR((Browser)):::client
        subgraph "UI Components & Plugins"
            BLK["Blocks"]:::client
            EXP["A/B Experimentation Plugin"]:::client
            RUMP["RUM Conversion Plugin"]:::client
        end
        subgraph "Client-side Utilities"
            FR["Franklin Core"]:::client
            AN["Analytics"]:::client
            CC["Cookie Consent"]:::client
            SS["Main Scripts"]:::client
        end
    end

    %% External Services
    subgraph "External Services"
        RUMB["RUM Backend Service"]:::external
        SB["Slack Bot Service"]:::external
        SBAPI["Slack API"]:::external
    end

    %% Connections
    CM -->|"content mapping"| FST
    GH -->|push code| RT
    RT -->|tests pass| RL
    RL -->|deploy| ED
    BR -->|"GET /index.html"| ED
    ED -->|"200 HTML + assets"| BR
    BR -->|"load Blocks"| BLK
    BR -->|"load Plugin"| EXP
    BR -->|"load Plugin"| RUMP
    BR -->|"load Utils"| FR
    BR -->|"load Utils"| AN
    BR -->|"load Utils"| CC
    BR -->|"load Utils"| SS
    BR -->|"RUM beacon / experiment event"| RUMB
    RUMB -->|"metrics query"| SB
    SB -->|"Slack post"| SBAPI

    %% Click Events
    click FST "https://github.com/hlxsites/wknd/blob/main/fstab.yaml"
    click GH "https://github.com/hlxsites/wknd/tree/main/[root]/"
    click RT "https://github.com/hlxsites/wknd/blob/main/.github/workflows/run-tests.yaml"
    click RL "https://github.com/hlxsites/wknd/blob/main/.github/workflows/release.yaml"
    click EXP "https://github.com/hlxsites/wknd/blob/main/plugins/experimentation/src/index.js"
    click RUMP "https://github.com/hlxsites/wknd/blob/main/plugins/rum-conversion/src/index.js"
    click BLK "https://github.com/hlxsites/wknd/tree/main/blocks/"
    click FR "https://github.com/hlxsites/wknd/blob/main/scripts/lib-franklin.js"
    click AN "https://github.com/hlxsites/wknd/tree/main/scripts/analytics/"
    click CC "https://github.com/hlxsites/wknd/tree/main/scripts/cookie-consent/"
    click SS "https://github.com/hlxsites/wknd/blob/main/scripts/scripts.js"

    %% Styles
    classDef build fill:#D0E6FF,stroke:#005BBB,color:#000;
    classDef runtime fill:#D6F8D6,stroke:#009900,color:#000;
    classDef client fill:#FFE5B4,stroke:#FF8C00,color:#000;
    classDef external fill:#E8D6F8,stroke:#800080,color:#000;
```
