# nulllogic/scssleon architecture

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

- Interactive diagram: https://gitdiagram.com/nulllogic/scssleon
- Repository: https://github.com/nulllogic/scssleon

## Overview

##### Project type and purpose
- This is an open-source, front-end CSS framework (a Sass/SCSS library) plus a companion static documentation site built with Hugo.
- The library (XII/Grid) provides mixins, components, utilities, themes and a responsive grid system for web projects.
- The docs are autogenerated by Hugo, styled with the compiled CSS, and published via GitHub Pages. Algolia DocSearch is used for documentation search.

##### File structure
- Top-level:
- scss/         ← source of all Sass partials (base, components, forms, mixins, themes, utilities)
- .imgs/        ← raw images for README and docs
- package.json  ← npm metadata and build/test scripts
- Dockerfile, Makefile  ← containerized build & local docs workflow
- .github/workflows/publish.yml ← CI/CD pipeline for publishing CSS package & docs
- No server-side code—pure client assets and a static site generator.
- Key patterns: component-based SCSS organization, mixins + utility classes, static site generation for documentation.

##### README for additional insights
- Confirms Sass-based framework, doc generation via Hugo, development commands: `make docs` for local preview.
- Mentions Algolia’s DocSearch and BrowserStack for cross-browser QA.
- No dynamic backend or database—everything compiles to static assets.

##### Detail
- Every architectural element: source directories, tools, pipelines, hosting layers, third-party services.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Machine Lane
    subgraph "Developer Machine"
        direction TB
        Clone["Clone Repository"]:::source
        subgraph "Source Files"
            direction TB
            SCSS["SCSS Source Directory"]:::source
            click SCSS "https://github.com/nulllogic/scssleon/tree/master/scss/"
            subgraph "Base Styles" 
                direction TB
                BaseRoot["_root.scss"]:::source
                click BaseRoot "https://github.com/nulllogic/scssleon/blob/master/scss/_root.scss"
                BaseReset["_reset.scss"]:::source
                click BaseReset "https://github.com/nulllogic/scssleon/blob/master/scss/_reset.scss"
                BaseConfig["_config.scss"]:::source
                click BaseConfig "https://github.com/nulllogic/scssleon/blob/master/scss/_config.scss"
                Base["_base.scss"]:::source
                click Base "https://github.com/nulllogic/scssleon/blob/master/scss/_base.scss"
            end
            subgraph "Component Styles"
                direction TB
                ComponentsDir["components/"]:::source
                click ComponentsDir "https://github.com/nulllogic/scssleon/tree/master/scss/components/"
                Button["_button.scss"]:::source
                click Button "https://github.com/nulllogic/scssleon/blob/master/scss/components/_button.scss"
                Card["_card.scss"]:::source
                click Card "https://github.com/nulllogic/scssleon/blob/master/scss/components/_card.scss"
                Modal["_modal.scss"]:::source
                click Modal "https://github.com/nulllogic/scssleon/blob/master/scss/components/_modal.scss"
            end
            subgraph "Utility Classes"
                direction TB
                UtilsAll["_utilities.scss"]:::source
                click UtilsAll "https://github.com/nulllogic/scssleon/blob/master/scss/_utilities.scss"
                APIUtil["_api.scss"]:::source
                click APIUtil "https://github.com/nulllogic/scssleon/blob/master/scss/utilities/_api.scss"
            end
            subgraph "Mixins Library"
                direction TB
                MixinsDir["mixins/"]:::source
                click MixinsDir "https://github.com/nulllogic/scssleon/tree/master/scss/mixins/"
                GridMix["_grid.scss"]:::source
                click GridMix "https://github.com/nulllogic/scssleon/blob/master/scss/mixins/_grid.scss"
                BreakpointsMix["_breakpoints.scss"]:::source
                click BreakpointsMix "https://github.com/nulllogic/scssleon/blob/master/scss/mixins/_breakpoints.scss"
            end
            subgraph "Theme Definitions"
                direction TB
                DefaultTheme["_default.scss"]:::source
                click DefaultTheme "https://github.com/nulllogic/scssleon/blob/master/scss/themes/_default.scss"
            end
            subgraph "Form Components"
                direction TB
                Input["_input.scss"]:::source
                click Input "https://github.com/nulllogic/scssleon/blob/master/scss/forms/_input.scss"
            end
            subgraph "Helper Utilities"
                direction TB
                Clearfix["_clearfix.scss"]:::source
                click Clearfix "https://github.com/nulllogic/scssleon/blob/master/scss/helpers/_clearfix.scss"
            end
            subgraph "Animations"
                direction TB
                Placeholder["_placeholder.scss"]:::source
                click Placeholder "https://github.com/nulllogic/scssleon/blob/master/scss/animations/_placeholder.scss"
            end
            ImgAssets[".imgs/"]:::source
            click ImgAssets "https://github.com/nulllogic/scssleon/tree/master/.imgs/"
            PackageJSON["package.json"]:::source
            click PackageJSON "https://github.com/nulllogic/scssleon/blob/master/package.json"
            NPMIgnore[".npmignore"]:::source
            click NPMIgnore "https://github.com/nulllogic/scssleon/blob/master/.npmignore"
            README["README.md"]:::source
            click README "https://github.com/nulllogic/scssleon/blob/master/README.md"
            Changelog["CHANGELOG.md"]:::source
            click Changelog "https://github.com/nulllogic/scssleon/blob/master/CHANGELOG.md"
            License["LICENSE"]:::source
            CONTRIBUTING[".github/CONTRIBUTING.md"]:::source
            click CONTRIBUTING "https://github.com/nulllogic/scssleon/blob/master/.github/CONTRIBUTING.md"
            CodeOfConduct[".github/CODE_OF_CONDUCT.md"]:::source
            click CodeOfConduct "https://github.com/nulllogic/scssleon/blob/master/.github/CODE_OF_CONDUCT.md"
        end
        subgraph "Build Tools & Workflow"
            direction TB
            npm["Node.js & npm"]:::build
            Sass["Sass Compiler"]:::build
            Hugo["Hugo Static Site Generator"]:::build
            MakefileNode["Makefile"]:::build
            click MakefileNode "https://github.com/nulllogic/scssleon/tree/master/Makefile"
            DockerfileNode["Dockerfile"]:::build
            click DockerfileNode "https://github.com/nulllogic/scssleon/tree/master/Dockerfile"
        end
        Clone --> SCSS
        SCSS --> npm
        npm --> Sass
        Sass --> CSSBundle["CSS Bundle (dist)"]:::build
        npm --> Hugo
        Hugo --> DocsSite["Static Documentation Site"]:::build
    end

    %% CI/CD Lane
    subgraph "CI/CD Pipeline"
        direction TB
        GHActions["GitHub Actions"]:::cicd
        publishYml["publish.yml"]:::cicd
        click publishYml "https://github.com/nulllogic/scssleon/blob/master/.github/workflows/publish.yml"
        Clone --> GHActions
        GHActions -->|"build & test"| CSSBundle
        GHActions -->|"deploy docs"| DocsSite
        GHActions -->|"publish package"| NPMRegistry
    end

    %% Hosting & External Services
    subgraph "Production Hosting"
        direction TB
        NPMRegistry["npm Registry"]:::hosting
        GitHubPages["GitHub Pages"]:::hosting
        CSSBundle --> NPMRegistry
        DocsSite --> GitHubPages
    end

    subgraph "External Integrations"
        direction TB
        Algolia["Algolia DocSearch API"]:::external
        BrowserStack["BrowserStack"]:::external
        DocsSite -->|"search queries"| Algolia
        GHActions -->|"cross-browser QA"| BrowserStack
    end

    %% Consumers
    subgraph "Consumers"
        direction TB
        DevUser["Developers / Contributors"]:::external
        EndUser["End-Users"]:::external
        DevUser --> Clone
        EndUser --> NPMRegistry
        EndUser --> GitHubPages
    end

    %% Styles
    classDef source fill:#cce5ff,stroke:#66b0ff,color:#003366;
    classDef build fill:#d4edda,stroke:#81c784,color:#1b5e20;
    classDef cicd fill:#fff3cd,stroke:#ffecb5,color:#665c00;
    classDef hosting fill:#e1bee7,stroke:#ce93d8,color:#4a148c;
    classDef external fill:#f8d7da,stroke:#f5c6cb,color:#721c24;
```
