# geoblink/design-system architecture

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

- Interactive diagram: https://gitdiagram.com/geoblink/design-system
- Repository: https://github.com/geoblink/design-system

## Overview

##### Project type and purpose
- This is an open-source Vue.js Design System library. It provides:
- UI components (buttons, alerts, charts, tokens, layouts, etc.)
- Vue directives, mixins and utilities
- A documentation site built with VuePress
- Build scripts, templates and CI configuration for publishing

##### File structure
- Top-level artifacts
- package.json, LICENSE, README.md, CHANGELOG.md
- Build and config folders: build/, config/, .travis.yml, .npmignore, .babelrc, webpack.*.conf.js
- Templates and scaffolding: _templates/, .hygen.js
- Source code: src/ (elements/, directives/, mixins/, utils/, styles/, tokens/, templates/)
- Documentation site: .vuepress/ + docs/
- Testing: test/unit/ (Jest + Vue Test Utils)
- Patterns
- Modular component crates under src/elements
- Centralized tokens under src/tokens feeding SCSS variables
- Build pipeline: Webpack + Babel → dist/ system.css, .scss, JS modules
- Documentation auto-generated from component examples using VuePress

##### README
- Confirms library is installed via NPM/Yarn, then registered with Vue.use
- Shows how to import CSS/SCSS and use components in a Vue app
- Points to live docs on design-system.geoblink.com

##### Main components and their interactions
- Source components
- Tokens (YAML → SCSS variables, maps)
- Styles (SCSS modules per element, utilities)
- Vue components (src/elements/Geo*)
- Directives, mixins, utilities (src/directives, src/mixins, src/utils)
- Templates (for scaffolding new components)
- Build system
- Webpack configurations (build/webpack.*.conf.js) compile JS/SCSS → dist/
- Babel and PostCSS transform code for distribution
- Hygen templates generate new component boilerplate
- Documentation site
- VuePress (.vuepress/) reads .md examples under src/elements/***.examples.md
- Generates interactive style guide and API docs
- Testing
- Jest runner + Vue Test Utils under test/unit/
- Lints and validates each component and utility
- CI/CD
- Travis CI (.travis.yml) triggers builds, tests, coverage (Codecov)
- On release, publishes to NPM

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Source Modules
    subgraph "Source Modules"
        direction TB
        DT["Design Tokens"]:::source
        ST["Styles (SCSS)"]:::source
        CP["Vue UI Components"]:::source
        DR["Vue Directives"]:::source
        MX["Vue Mixins"]:::source
        UT["Utilities"]:::source
        TM["Templates"]:::source
        SE["System Entry Point\n(src/system.js)"]:::source
    end

    %% Build System
    subgraph "Build System"
        direction TB
        WP["Webpack Configs"]:::build
        BB["Babel & PostCSS"]:::build
        HG["Hygen Template Generator"]:::build
    end

    %% Distribution
    subgraph "Distribution"
        direction TB
        DA["Dist Artifacts\n(JS, CSS, SCSS)"]:::distro
        NR[(NPM Registry)]:::distro
    end

    %% Consumer Application
    CA["Consumer App\n(Vue.use)"]:::consumer

    %% Documentation Pipeline
    subgraph "Documentation Pipeline"
        direction TB
        EX["Component Examples (.md)"]:::docs
        VP["VuePress Site Generator"]:::docs
        DS["Docs Website"]:::docs
    end

    %% CI/CD Pipeline
    subgraph "CI/CD Pipeline"
        direction TB
        GH["GitHub Push"]:::ci
        TR["Travis CI"]:::ci
        TS["Jest Test Suite"]:::ci
        CV["Codecov"]:::ci
    end

    %% Relationships
    DT --> WP
    ST --> WP
    CP --> WP
    DR --> WP
    MX --> WP
    UT --> WP
    TM --> HG
    SE --> WP
    WP --> BB
    BB --> DA
    DA --> NR
    NR --> CA
    EX --> VP
    VP --> DS
    GH --> TR
    TR --> TS
    TS --> CV
    TR --> NR

    %% Click Events
    click DT "https://github.com/geoblink/design-system/tree/master/src/tokens/"
    click ST "https://github.com/geoblink/design-system/tree/master/src/styles/"
    click CP "https://github.com/geoblink/design-system/tree/master/src/elements/"
    click DR "https://github.com/geoblink/design-system/tree/master/src/directives/"
    click MX "https://github.com/geoblink/design-system/tree/master/src/mixins/"
    click UT "https://github.com/geoblink/design-system/tree/master/src/utils/"
    click TM "https://github.com/geoblink/design-system/tree/master/_templates/"
    click HG "https://github.com/geoblink/design-system/tree/master/_templates/"
    click WP "https://github.com/geoblink/design-system/tree/master/build/"
    click VP "https://github.com/geoblink/design-system/tree/master/.vuepress/"
    click TS "https://github.com/geoblink/design-system/tree/master/test/unit/"
    click GH "https://github.com/geoblink/design-system/blob/master/.travis.yml"
    click SE "https://github.com/geoblink/design-system/blob/master/src/system.js"
    click NR "https://github.com/geoblink/design-system/blob/master/package.json"

    %% Styles
    classDef source fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef build fill:#90EE90,stroke:#333,stroke-width:1px
    classDef distro fill:#FFD580,stroke:#333,stroke-width:1px
    classDef docs fill:#DDA0DD,stroke:#333,stroke-width:1px
    classDef ci fill:#98FB98,stroke:#333,stroke-width:1px
    classDef consumer fill:#FFA500,stroke:#333,stroke-width:1px
```
