# lemick/open-iframe-resizer architecture

> Architecture diagram of the GitHub repository lemick/open-iframe-resizer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lemick/open-iframe-resizer
- Repository: https://github.com/lemick/open-iframe-resizer

## Overview

##### Project type and purpose
- This is a monorepo for an open‑source frontend library (“Open Iframe Resizer”) that provides a core ES module plus React and Vue wrappers, full documentation site, automated tests, and CI/CD workflows.
- Purpose: Dynamically resize iframes in a lightweight, framework‑agnostic way, with optional React and Vue integrations and a published website for docs and demos.

##### File structure
- Top-level:
- `.github/workflows`: CI workflows for build, test, release, website deploy
- `packages/`: monorepo packages
– `core/`: core iframe resizer library (TS source, tests, use‑cases, build configs)
– `react/`: React wrapper package
– `vue/`: Vue wrapper package
- `scripts/`: utility scripts (e.g., generate Use Cases HTML, prerelease hooks)
- `website/`: Astro‑based documentation and demo site
- `README.md`, `package.json`, lockfiles, config files (TS, biome)
- Patterns: Lerna/Yarn‑workspaces or pnpm‑style monorepo, each package has its own build/test setup; E2E use‑cases under each package, core has Playwright & Vitest.

##### README for additional insights
- It confirms core ES6 module usage, npm installation, React/Vue wrappers, links to full docs on GitHub Pages.
- No backend services—pure client‑side code, published to npm and GitHub Pages.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Monorepo Root
    subgraph "Monorepo Root"
        direction TB
        RootConfig["package.json & tsconfig.json"]:::code
        subgraph "Packages"
            direction TB
            Core["Core Library"]:::code
            React["React Wrapper"]:::code
            Vue["Vue Wrapper"]:::code
        end
        subgraph "Scripts"
            direction TB
            GenHTML["generate-use-cases-html.js"]:::script
            PreRel["prerelease.sh"]:::script
        end
        subgraph "Website"
            direction TB
            SiteConfig["astro.config.mjs"]:::code
            Content["docs & guides (.mdx)"]:::code
            Public["public assets"]:::code
        end
        subgraph "CI/CD"
            direction TB
            DevFlow["develop.yml"]:::ci
            RelFlow["release.yml"]:::ci
            DepFlow["deploy-website.yml"]:::ci
        end
    end

    %% External Services and Users
    NPM["npm Registry"]:::service
    GHPages["GitHub Pages"]:::service
    Browser["User Browser"]:::external

    %% Dependencies and Flows
    Core -->|dependency| React
    Core -->|dependency| Vue
    GenHTML -->|generates use-case HTML for| Core
    GenHTML -->|generates use-case HTML for| React
    GenHTML -->|generates use-case HTML for| Vue
    PreRel -->|prerelease hooks for| Core
    PreRel -->|prerelease hooks for| React
    PreRel -->|prerelease hooks for| Vue

    Core -->|publishes| NPM
    React -->|publishes| NPM
    Vue -->|publishes| NPM
    DepFlow -->|deploys site to| GHPages

    DevFlow -->|runs tests & builds| Core
    DevFlow -->|runs tests & builds| React
    DevFlow -->|runs tests & builds| Vue
    DevFlow -->|builds site| SiteConfig

    RelFlow -->|publishes packages to| NPM
    RelFlow -->|publishes docs to| GHPages

    Browser -->|visits| GHPages
    Browser -->|installs| NPM

    %% Click Events
    click DevFlow "https://github.com/lemick/open-iframe-resizer/blob/main/.github/workflows/develop.yml"
    click RelFlow "https://github.com/lemick/open-iframe-resizer/blob/main/.github/workflows/release.yml"
    click DepFlow "https://github.com/lemick/open-iframe-resizer/blob/main/.github/workflows/deploy-website.yml"
    click Core "https://github.com/lemick/open-iframe-resizer/blob/main/packages/core/src/index.ts"
    click React "https://github.com/lemick/open-iframe-resizer/blob/main/packages/react/src/index.ts"
    click Vue "https://github.com/lemick/open-iframe-resizer/blob/main/packages/vue/src/index.ts"
    click GenHTML "https://github.com/lemick/open-iframe-resizer/blob/main/scripts/generate-use-cases-html.js"
    click PreRel "https://github.com/lemick/open-iframe-resizer/blob/main/scripts/prerelease.sh"
    click SiteConfig "https://github.com/lemick/open-iframe-resizer/blob/main/website/astro.config.mjs"
    click Content "https://github.com/lemick/open-iframe-resizer/tree/main/website/src/content/docs/"
    click RootConfig "https://github.com/lemick/open-iframe-resizer/blob/main/package.json"

    %% Styles
    classDef code fill:#bbdefb,stroke:#1e88e5,color:#0d47a1;
    classDef script fill:#ffcc80,stroke:#fb8c00,color:#e65100;
    classDef ci fill:#d1c4e9,stroke:#8e24aa,color:#4a148c;
    classDef service fill:#c8e6c9,stroke:#43a047,color:#1b5e20;
    classDef external fill:#f5f5f5,stroke:#9e9e9e,color:#424242;
```
