# volatil/verdurizate architecture

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

- Interactive diagram: https://gitdiagram.com/volatil/verdurizate
- Repository: https://github.com/volatil/verdurizate

## Overview

##### Main Components
- Pug Templates: Represented by the “_pug” directory, this set of files (e.g., header.pug, footer.pug, index.pug, and various Pug components) forms the HTML structure of the site.
- Styles: The styling is handled in “_scss” using Sass (with “variables.sass” and separate styles per component) that compiles into CSS files (present in the “css” directory).
- JavaScript: The “js” folder includes client-side business logic, with files like constants.js, functions.js, and index.js.
- Assets & Images: The “images” folder (subdivided into various sizes and formats) holds media assets that are optimized (as hinted by references in the README to lazyload and WebP processing).
- Build/Configuration Tools: Files such as package.json, package-lock.json, prepros.config, and ESLint configuration files indicate that tooling (likely for compiling Sass, bundling assets, and code linting) plays a role in the development process.
- Development Environment: The presence of a .vscode directory signifies that VS Code is used for development and may include personalized settings or extensions.

##### Relationships and Data Flow
- Template Compilation Pipeline: The “_pug” templates are compiled to produce HTML files (for example, index.html) that define the structure of the website.
- JavaScript Integration: The JS files are referenced in the final HTML (most likely via script tags embedded by the appropriate Pug templates or directly in index.html) to handle dynamic behavior and interactions.
- Asset Optimization: The images folder and the inclusion of original image files in “_originales” indicate that image assets may undergo optimization steps (lazy loading, format conversion, resizing) prior to deployment.

##### Architectural Patterns and Technologies
- Separation of Concerns: There is a clear separation between the presentation layer (Pug and Sass), behavior (JavaScript), and assets (images).
- Static Site Generation: The use of templates and precompiled assets indicates that the project is designed as a static site, potentially optimized for performance.
- Asset Pipeline: Reflect the build process converting Pug to HTML and Sass to CSS; mention the role of configuration and external tools (like prepros) in that process.
- Image Optimization: Note that external libraries or processes (such as lazyload) are used to handle performance improvements for media content.

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Source Files"
        Pug["Pug Templates (_pug)"]:::component
        Sass["Sass Stylesheets (_scss)"]:::component
        JS["JavaScript Modules (js)"]:::component
        Img["Optimized Image Assets (images)"]:::asset
        Orig["Source Images (_originales)"]:::asset
    end

    subgraph "Build Process"
        HTML["Compiled HTML"]:::output
        CSS["Compiled CSS (css)"]:::output
        BuildTools["Build & Config Tools"]:::tool
    end

    subgraph "Development"
        DevEnv["Developer Environment (.vscode)"]:::dev
    end

    Browser["Browser/Client"]:::runtime

    %% Data flows and dependencies
    Pug -->|"compileToHTML"| HTML
    Sass -->|"compileToCSS"| CSS
    JS -->|"loaded"| Browser
    Orig -->|"optimized"| Img
    Img -->|"served"| Browser
    HTML -->|"renders"| Browser
    CSS -->|"applied"| Browser
    HTML -->|"includesLazyloadOptimizations"| Img

    %% Build tools configuration influence
    BuildTools -->|"configures"| Pug
    BuildTools -->|"configures"| Sass
    DevEnv -->|"supports"| BuildTools

    %% Click Events
    click Pug "https://github.com/volatil/verdurizate/tree/main/_pug/"
    click Sass "https://github.com/volatil/verdurizate/tree/main/_scss/"
    click JS "https://github.com/volatil/verdurizate/tree/main/js/"
    click Img "https://github.com/volatil/verdurizate/tree/main/images/"
    click Orig "https://github.com/volatil/verdurizate/tree/main/_originales/"
    click CSS "https://github.com/volatil/verdurizate/tree/main/css/"
    click BuildTools "https://github.com/volatil/verdurizate/blob/main/package.json"
    click DevEnv "https://github.com/volatil/verdurizate/tree/main/.vscode/"

    %% Styling classes
    classDef component fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef asset fill:#A9DFBF,stroke:#196F3D,stroke-width:2px;
    classDef output fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef tool fill:#F5B7B1,stroke:#CB4335,stroke-width:2px;
    classDef dev fill:#D2B4DE,stroke:#6C3483,stroke-width:2px;
    classDef runtime fill:#FDEBD0,stroke:#D35400,stroke-width:2px;
```
