How hiro-dev-aem/wknd works
Project Type and Purpose
• This is a static site/web-app built on Adobe Helix (Edge Delivery Services).
• It uses a Git-based CMS approach: documents live in AEM/SharePoint/Google Drive, are pulled through a Helix pipeline, transformed with “blocks” and “plugins,” then published as static HTML/CSS/JS to hlx.live pages.
• Features: document-based authoring, A/B experimentation, real-user monitoring (RUM) & conversion tracking, Slack Bot integration, CI/CD via GitHub Actions.
High-Level File-Structure Analysis
• Root config & infra:
• fstab.yaml – defines content sources (AEM, SharePoint).
• head.html – HTML head template.
• .github/workflows/run-tests.yaml – CI workflow.
• “blocks/” – modular UI components (each with .js and .css).
• “plugins/” – Helix pipeline plugins (experimentation, rum-conversion).
• “scripts/” – client-side libraries (Franklin runtime, analytics, cookie consent).
• “styles/” – global & cookie-consent CSS.
• “test/” – unit & Puppeteer tests.
• “tools/sidekick” – utilities for AEM Sidekick integration.
Key README Insights
• The pipeline is powered by the Helix CLI (hlx up) and GitHub Actions (tests, build, publish).
• Authoring is document-driven; content is fetched at build-time or on-demand.
• Experiments & RUM data feed into a Slack Bot via GitHub App (helix-bot).
• Puppeteer script generates synthetic traffic for conversion demos.
Main Components & Their Interactions
a. Content Sources
• AEM / SharePoint / Google Drive (configured in fstab.yaml).
b. Developer Workflow & CI/CD
• Local: Helix CLI (hlx up) → proxies content + runs pipeline → localhost:3000.
• CI: Git push → GitHub Actions → Run tests → Build & deploy to Preview / Live via Helix.
c. Helix Pipeline
• Input: raw HTML/Markdown from content sources.
• Processors:
• Block Runner – loads each block’s JS/CSS, renders component markup.
• Plugins – e.g., experimentation plugin injects experiment metadata; RUM plugin instruments pages.
• Output: static HTML, bundled CSS/JS assets.
d. Static Hosting & CDN
• hlx.live / hlx.page endpoints serve pre-rendered pages & assets at the edge.
e. Client Browser
• Fetches HTML + global scripts (lib-franklin.js, analytics, cookie consent).
• Block scripts hydrate interactive components.
• Sends telemetry to RUM endpoints.
• Interacts with Experimentation UI via Sidekick extension.
f. External Services
• Adobe Experience Cloud (Alloy.js) for analytics.
• Slack (helix-bot) for experiment & conversion reports.
• Puppeteer for test traffic generation.
Architectural Patterns & Principles
• Pipeline-based rendering: build-time SSR with pluggable transforms.
• Modular components (“blocks”) encapsulate UI + logic.
• Convention-over-configuration (fstab, head.html, block folder naming).
• GitOps: content and code in Git; deployments triggered by commits.
• Separation of concerns: data sources → pipeline → hosting → client runtime.
Capturing Detail
• Config files (fstab.yaml → drives the content layer; .github/workflows → CI trigger).
• Both build-time and run-time flows.
• How the Puppeteer script plugs into tests, funnels data into RUM, and surfaces in Slack.