# gomah/bulmil architecture

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

- Interactive diagram: https://gitdiagram.com/gomah/bulmil
- Repository: https://github.com/gomah/bulmil

## Overview

##### Main Components Architecture

a) Core Library Layer:
- Stencil.js compiler and Web Components runtime
- Core components directory structure (elements, form, grid, layout)

b) Framework Integration Layer:
- This as a wrapper around the core
- Bindings for:
- React (@bulmil/react)
- Vue (@bulmil/vue)
- Angular (@bulmil/angular)
- Svelte (@bulmil/svelte)

c) Distribution Layer:
- Output channels:
- NPM packages
- CDN distribution
- Framework-specific packages

##### Component Organization

Create sub-sections showing:

a) Core Components Categories:
- Form Components (input, select, checkbox, etc.)
- Layout Components (container, section, footer)
- Grid System (columns, column)
- Components (card, modal, navbar, etc.)

b) Build Pipeline:
- Stencil compiler
- CSS processing
- Framework bindings generation
- Distribution packaging

##### Data Flow and Dependencies

- Component compilation flow
- Framework binding generation
- Style inheritance from Bulma
- Package distribution paths

##### Integration Points

Highlight:
- Framework-specific entry points
- Polyfill application process
- CSS inclusion methods
- Custom element registration

##### Specific Implementation Details

- Component definition process
- Style compilation pipeline
- Framework-specific wrapper generation
- Testing infrastructure

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core["Core Library"]
        direction TB
        Stencil["Stencil.js Compiler"]:::build
        WebComp["Web Components Runtime"]:::runtime
        
        subgraph Components["Core Components"]
            Elements["Elements"]:::component
            FormComps["Form Components"]:::component
            LayoutComps["Layout Components"]:::component
            GridSystem["Grid System"]:::component
            UIComps["UI Components"]:::component
        end
        
        StencilConfig["Stencil Config"]:::config
        PackageConfig["Package Config"]:::config
    end
    
    subgraph Frameworks["Framework Integration Layer"]
        React["React Binding"]:::framework
        Vue["Vue Binding"]:::framework
        Angular["Angular Binding"]:::framework
        Svelte["Svelte Binding"]:::framework
    end
    
    subgraph Distribution["Distribution Layer"]
        NPM["NPM Packages"]:::dist
        CDN["CDN Distribution"]:::dist
        FrameworkPkgs["Framework Packages"]:::dist
    end
    
    subgraph Testing["Testing & Documentation"]
        Storybook["Storybook"]:::testing
        CompStories["Component Stories"]:::testing
    end
    
    %% Core relationships
    Stencil --> Components
    WebComp --> Components
    StencilConfig --> Stencil
    
    %% Framework binding relationships
    Components --> React
    Components --> Vue
    Components --> Angular
    Components --> Svelte
    
    %% Distribution relationships
    React --> FrameworkPkgs
    Vue --> FrameworkPkgs
    Angular --> FrameworkPkgs
    Svelte --> FrameworkPkgs
    Components --> NPM
    Components --> CDN
    
    %% Testing relationships
    Components --> Storybook
    Components --> CompStories
    
    %% Click events for component mapping
    click Core "https://github.com/Gomah/bulmil/tree/main/packages/core/"
    click Components "https://github.com/Gomah/bulmil/tree/main/packages/core/src/core/components/"
    click Elements "https://github.com/Gomah/bulmil/tree/main/packages/core/src/core/elements/"
    click FormComps "https://github.com/Gomah/bulmil/tree/main/packages/core/src/core/form/"
    click LayoutComps "https://github.com/Gomah/bulmil/tree/main/packages/core/src/core/layout/"
    click GridSystem "https://github.com/Gomah/bulmil/tree/main/packages/core/src/core/grid/"
    click React "https://github.com/Gomah/bulmil/tree/main/packages/react/"
    click Vue "https://github.com/Gomah/bulmil/tree/main/packages/vue/"
    click Angular "https://github.com/Gomah/bulmil/tree/main/packages/angular/"
    click StencilConfig "https://github.com/Gomah/bulmil/blob/main/packages/core/stencil.config.ts"
    click PackageConfig "https://github.com/Gomah/bulmil/blob/main/packages/core/package.json"
    click Storybook "https://github.com/Gomah/bulmil/tree/main/.storybook/"
    click CompStories "https://github.com/Gomah/bulmil/tree/main/packages/core/src/core/components/"
    
    %% Styling
    classDef component fill:#a8d5ff,stroke:#333
    classDef framework fill:#90EE90,stroke:#333
    classDef dist fill:#DDA0DD,stroke:#333
    classDef build fill:#FFA500,stroke:#333
    classDef runtime fill:#87CEEB,stroke:#333
    classDef config fill:#FFE4B5,stroke:#333
    classDef testing fill:#F0E68C,stroke:#333
    
    %% Legend
    subgraph Legend
        L1["Component"]:::component
        L2["Framework"]:::framework
        L3["Distribution"]:::dist
        L4["Build Tool"]:::build
        L5["Runtime"]:::runtime
        L6["Configuration"]:::config
        L7["Testing"]:::testing
    end
```
