# la-ots/pelican architecture

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

- Interactive diagram: https://gitdiagram.com/la-ots/pelican
- Repository: https://github.com/la-ots/pelican

## Overview

##### Main Components

a. Core Components:
- Design System Core (SCSS/CSS Layer)
- JavaScript Components Layer
- Documentation System
- Build System

b. External Dependencies:
- Bootstrap Base
- Font Awesome
- Public Sans Typography
- jQuery
- Popper.js

**┌─ Documentation Layer ─────────────────────┐**
- (Eleventy Static Site Generator)          │
- Component Examples                      │
- Usage Guidelines                        │
- Accessibility Documentation             │
- ┘
- ↑
**┌─ Design System Core ───────────────────────┐**
- ┌─ Presentation Layer ─┐ ┌─ JS Layer ────┐ │
- Theme Variables    │ │ - Components  │ │
- Component Styles  │ │ - Utilities   │ │
- Utilities        │ │ - Behaviors   │ │
- ┘ └──────────────┘ │
- ┘
- ↑
**┌─ External Dependencies ──────────────────┐**
- Bootstrap Base                         │
- Font Awesome                          │
- Public Sans Font                      │
- jQuery                               │
- Popper.js                            │
- ┘
- ↑
**┌─ Build System ────────────────────────────┐**
- npm Scripts                            │
- esbuild                               │
- PostCSS                               │
- Eleventy                              │
- ┘

##### Important Details to Highlight

a. Component Architecture:
- How SCSS components (_alert.scss, _buttons.scss, etc.) compile into the final CSS
- Relationship between JS components and their CSS counterparts
- Demonstrate the theming system with _default-theme-variables.scss

b. Build Process Flow:
- How npm scripts coordinate the build process
- Documentation generation process using Eleventy
- Relationship between source files and distributed assets

c. Distribution Outputs:
- Different bundle types (minified, source maps, ESM)
- How the documentation is built and deployed

##### Notes

- Keep the focus on the design system's architecture rather than individual components
- Extensibility points for agency theming
- Relationship between documentation and implementation
- Build process but keep it at a high level

Remember to maintain a balance between showing enough detail to understand the system's architecture while not overwhelming the viewer with implementation specifics.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Documentation Layer"
        Docs["Documentation Site"]:::docs
        CompDocs["Component Examples"]:::docs
        UsageDocs["Usage Guidelines"]:::docs
        AccessDocs["Accessibility Docs"]:::docs
        
        Docs --> CompDocs
        Docs --> UsageDocs
        Docs --> AccessDocs
    end

    subgraph "Design System Core"
        subgraph "Presentation Layer"
            ThemeVars["Theme Variables"]:::core
            CompStyles["Component Styles"]:::core
            Utils["Utilities"]:::core
            
            ThemeVars --> CompStyles
            ThemeVars --> Utils
        end
        
        subgraph "JavaScript Layer"
            JSComp["Components"]:::js
            JSUtils["Utilities"]:::js
            JSBehaviors["Behaviors"]:::js
            
            JSComp --> JSBehaviors
            JSUtils --> JSBehaviors
        end
    end

    subgraph "External Dependencies"
        Bootstrap["Bootstrap Base"]:::external
        FontAwesome["Font Awesome"]:::external
        PublicSans["Public Sans Font"]:::external
        jQuery["jQuery"]:::external
        Popper["Popper.js"]:::external
    end

    subgraph "Build System"
        NPM["npm Scripts"]:::build
        ESBuild["esbuild"]:::build
        PostCSS["PostCSS"]:::build
        Eleventy["Eleventy"]:::build
        
        NPM --> ESBuild
        NPM --> PostCSS
        NPM --> Eleventy
    end

    Bootstrap --> ThemeVars
    FontAwesome --> CompStyles
    PublicSans --> CompStyles
    jQuery --> JSComp
    Popper --> JSComp

    ThemeVars --> Docs
    CompStyles --> Docs
    JSComp --> Docs

    classDef core fill:#3498db,stroke:#2980b9,color:#fff
    classDef js fill:#2ecc71,stroke:#27ae60,color:#fff
    classDef docs fill:#9b59b6,stroke:#8e44ad,color:#fff
    classDef build fill:#e67e22,stroke:#d35400,color:#fff
    classDef external fill:#95a5a6,stroke:#7f8c8d,color:#fff

    click ThemeVars "https://github.com/la-ots/pelican/blob/main/scss/_default-theme-variables.scss"
    click CompStyles "https://github.com/la-ots/pelican/blob/main/scss/pelican.scss"
    click Utils "https://github.com/la-ots/pelican/blob/main/scss/_utilities.scss"
    click JSComp "https://github.com/la-ots/pelican/blob/main/js/pelican.js"
    click Docs "https://github.com/la-ots/pelican/tree/main/docs"
    click CompDocs "https://github.com/la-ots/pelican/tree/main/docs/components"
    click AccessDocs "https://github.com/la-ots/pelican/tree/main/docs/accessibility"
    click Eleventy "https://github.com/la-ots/pelican/blob/main/build/.eleventy.js"
    click ESBuild "https://github.com/la-ots/pelican/blob/main/build/esbuild.config.js"
    click PostCSS "https://github.com/la-ots/pelican/blob/main/build/postcss.config.js"
    click NPM "https://github.com/la-ots/pelican/blob/main/package.json"
```
