# rocketcommunicationsinc/astro architecture

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

- Interactive diagram: https://gitdiagram.com/rocketcommunicationsinc/astro
- Repository: https://github.com/rocketcommunicationsinc/astro

## Overview

##### Project type and purpose
- This is a monorepo of UI component libraries (Astro UXDS Web Components) and their framework wrappers, managed with Lerna.
- Core purpose: author platform-agnostic web components in Stencil, then expose them to Angular and React, provide testing sandboxes, Storybook docs, and a CI/CD release pipeline.

##### File structure
- Root: configuration (lerna.json, package.json, Husky and commitlint hooks, GitHub workflows), utility scripts.
- packages/react, packages/angular-workspace: thin wrapper packages that consume the core web-components and expose React/Angular bindings.
- packages/framework-testing: sandbox apps (Astro+Angular/React/Vue) that pull in the web-components for integration testing.
- wrapper-bindings: shared Angular/React type fixes.
- CI: GitHub Actions workflows (build, test, release, publish).

##### Readme insights
- Core stack: Stencil + TypeScript for components, Angular CLI, React TSX for wrappers.
- Storybook for documentation, Netlify for hosting docs.
- Publish to npm on a bi-weekly cadence, major releases bi-annually.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer and Repo
    Dev["Developer Workstation"]:::external
    GitHub["GitHub Repository"]:::external
    Dev --> GitHub
    GitHub --> CI

    %% CI/CD Pipeline
    CI["CI/CD Pipeline"]:::process

    %% Monorepo Root Config
    Monorepo["Monorepo Root Configuration"]:::code
    CI --> Monorepo

    %% Core Package
    subgraph "Core Web Components Package" 
        direction TB
        CW["packages/web-components"]:::code
        CWSrc["src (Stencil TSX)"]:::code
        CWConfig["stencil.config.ts"]:::code
        CWTS["tsconfig.json"]:::code
        SBConfig[".storybook"]:::code
        Stories["src/stories"]:::code
        UtilsDir["src/utils"]:::code
        GenIcons["generate-icons.js"]:::code
        Rollup["rollup-svg.js"]:::code
        Deploy["tools/deploy.sh"]:::code
        VRT["vrt-snaps"]:::code
        CW --> CWSrc
        CW --> CWConfig
        CW --> CWTS
        CW --> SBConfig
        CW --> Stories
        CW --> UtilsDir
        UtilsDir --> GenIcons
        UtilsDir --> Rollup
        CW --> Deploy
        CW --> VRT
    end
    CI --> CW

    %% Wrapper Bindings
    subgraph "Wrapper Bindings" 
        direction TB
        WBAng["angular.bindings.ts"]:::code
        WBReactFix["react-boolean-fix.ts"]:::code
    end
    CW --> WBAng
    CW --> WBReactFix

    %% React Wrapper Package
    subgraph "React Wrapper Package" 
        direction TB
        RWDir["packages/react"]:::code
        RWIndex["src/index.ts"]:::code
        RWComp["src/components.tsx"]:::code
        RWLib["src/react-component-lib"]:::code
        RWDir --> RWIndex
        RWDir --> RWComp
        RWDir --> RWLib
    end
    CW --> RWDir
    WBReactFix --> RWDir
    CI --> RWDir

    %% Angular Wrapper Package
    subgraph "Angular Wrapper Package" 
        direction TB
        AWRoot["packages/angular-workspace"]:::code
        AWProj["projects/angular"]:::code
        AWDirect["src/directives"]:::code
        AWLib["src/lib"]:::code
        AWRoot --> AWProj
        AWProj --> AWDirect
        AWProj --> AWLib
    end
    CW --> AWProj
    WBAng --> AWProj
    CI --> AWProj

    %% Framework Testing Sandboxes
    subgraph "Framework-Testing Sandboxes" 
        direction TB
        FT1["packages/framework-testing/astro-angular"]:::code
        FT2["packages/framework-testing/astro-react"]:::code
        FT3["packages/framework-testing/astro-vue"]:::code
    end
    CI --> FT1
    CI --> FT2
    CI --> FT3

    %% Storybook Documentation & Netlify
    SB["Storybook Documentation Site"]:::process
    Netlify["Netlify"]:::external
    CI --> SB
    SB --> Netlify

    %% npm Registry
    NPM["npm Registry"]:::external
    CI --> NPM

    %% Click Events
    click Monorepo "https://github.com/rocketcommunicationsinc/astro/blob/main/lerna.json"
    click CW "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/web-components"
    click CWSrc "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/web-components/src"
    click CWConfig "https://github.com/rocketcommunicationsinc/astro/blob/main/packages/web-components/stencil.config.ts"
    click CWTS "https://github.com/rocketcommunicationsinc/astro/blob/main/packages/web-components/tsconfig.json"
    click SBConfig "https://github.com/rocketcommunicationsinc/astro/blob/main/packages/web-components/.storybook"
    click Stories "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/web-components/src/stories"
    click GenIcons "https://github.com/rocketcommunicationsinc/astro/blob/main/packages/web-components/src/utils/generate-icons.js"
    click Rollup "https://github.com/rocketcommunicationsinc/astro/blob/main/packages/web-components/src/utils/rollup-svg.js"
    click Deploy "https://github.com/rocketcommunicationsinc/astro/blob/main/packages/web-components/tools/deploy.sh"
    click WBAng "https://github.com/rocketcommunicationsinc/astro/blob/main/packages/web-components/wrapper-bindings/angular.bindings.ts"
    click WBReactFix "https://github.com/rocketcommunicationsinc/astro/blob/main/packages/web-components/wrapper-bindings/react-boolean-fix.ts"
    click RWDir "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/react"
    click RWIndex "https://github.com/rocketcommunicationsinc/astro/blob/main/packages/react/src/index.ts"
    click RWComp "https://github.com/rocketcommunicationsinc/astro/blob/main/packages/react/src/components.tsx"
    click RWLib "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/react/src/react-component-lib"
    click AWRoot "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/angular-workspace/projects/angular"
    click AWDirect "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/angular-workspace/projects/angular/src/directives"
    click AWLib "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/angular-workspace/projects/angular/src/lib"
    click FT1 "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/framework-testing/astro-angular"
    click FT2 "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/framework-testing/astro-react"
    click FT3 "https://github.com/rocketcommunicationsinc/astro/tree/main/packages/framework-testing/astro-vue"
    click NPM "https://github.com/rocketcommunicationsinc/astro/tree/main/npm"

    %% Styles
    classDef code fill:#e5f5e0,stroke:#2a5934,color:#2a5934
    classDef process fill:#e0f0f8,stroke:#217fa1,color:#217fa1
    classDef external fill:#fff4e5,stroke:#a86006,color:#a86006
```
