# startbootstrap/startbootstrap-agency architecture

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

- Interactive diagram: https://gitdiagram.com/startbootstrap/startbootstrap-agency
- Repository: https://github.com/startbootstrap/startbootstrap-agency

## Overview

##### Main System Components

A. Build System Layer
- Npm-based build pipeline
- Various build scripts (SCSS, Pug, Assets, JS)
- Demonstrate the transformation flow from source to distribution

B. Source Architecture Layer
- Template Engine (Pug)
- Styling System (SCSS)
- JavaScript Components
- Static Assets

C. Distribution Layer
- Compiled HTML
- Processed CSS
- Bundled JavaScript
- Optimized Assets

##### Component Relationships

**[Source Layer]**

- src/pug/         → Template Files
- src/scss/        → Styling Files
- src/js/          → JavaScript
- src/assets/      → Static Assets

**[Build System Layer]**

- build-pug.js     → HTML Compilation
- build-scss.js    → CSS Processing
- build-scripts.js → JS Bundling
- build-assets.js  → Asset Optimization

**[Distribution Layer]**

- dist/           → Production-Ready Files

Create these distinct sections:

**┌─ Development Environment ─┐    ┌─ Build Pipeline ─┐    ┌─ Production Output ─┐**
- Source Files           │ → │ - Build Scripts  │ → │ - Dist Directory    │
- Node Modules          │    │ - Compilation   │    │ - Static Assets    │
- Configuration Files   │    │ - Processing    │    │ - Optimized Files  │
- ┘    └───────────────┘    └──────────────────┘

##### Additional Notes

- Use clear labels for all components
- Version information for major dependencies
- Notes about the live preview functionality
- Document the contact form integration process
- Relationship with Bootstrap framework

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Development
        SRC[Source Files]
        SRC --> PTEMP["/src/pug"]
        SRC --> SCSS["/src/scss"]
        SRC --> JS["/src/js/scripts.js"]
        SRC --> ASSETS["/src/assets"]
        
        SCSS --> GLOBAL["/src/scss/_global.scss"]
        SCSS --> VARS["/src/scss/_variables.scss"]
        SCSS --> COMP["/src/scss/components"]
        SCSS --> SECT["/src/scss/sections"]
        VARS --> TYPOVARS["/src/scss/variables/_typography.scss"]
        VARS --> COLORVARS["/src/scss/variables/_colors.scss"]
        
        PTEMP --> MODALS["/src/pug/includes"]
    end

    subgraph "Build Pipeline"
        BUILD["/scripts"]
        WATCH["/scripts/sb-watch.js"]
        DEBUG["/scripts/start-debug.js"]
        START["/scripts/start.js"]
        
        BUILD --> SCSS_BUILD["/scripts/build-scss.js"]
        BUILD --> PUG_BUILD["/scripts/build-pug.js"]
        BUILD --> ASSETS_BUILD["/scripts/build-assets.js"]
        BUILD --> SCRIPTS_BUILD["/scripts/build-scripts.js"]
        
        WATCH --> BUILD
        DEBUG --> BUILD
        START --> BUILD
    end

    subgraph Distribution
        DIST[Distribution Files]
        DIST --> HTML["/dist/index.html"]
        DIST --> CSS["/dist/css/styles.css"]
        DIST --> BUNDLEJS["/dist/js/scripts.js"]
        DIST --> OPTASSETS["/dist/assets"]
    end

    SRC --> BUILD
    BUILD --> DIST

    classDef source fill:#blue
    classDef build fill:#green
    classDef dist fill:#orange
    classDef external fill:#gray

    class SRC,PTEMP,SCSS,JS,ASSETS,GLOBAL,VARS,COMP,SECT,TYPOVARS,COLORVARS,MODALS source
    class BUILD,SCSS_BUILD,PUG_BUILD,ASSETS_BUILD,SCRIPTS_BUILD,WATCH,DEBUG,START build
    class DIST,HTML,CSS,BUNDLEJS,OPTASSETS dist

    click PTEMP "https://github.com/startbootstrap/startbootstrap-agency/tree/master/src/pug"
    click SCSS "https://github.com/startbootstrap/startbootstrap-agency/tree/master/src/scss"
    click JS "https://github.com/startbootstrap/startbootstrap-agency/blob/master/src/js/scripts.js"
    click ASSETS "https://github.com/startbootstrap/startbootstrap-agency/tree/master/src/assets"
    click GLOBAL "https://github.com/startbootstrap/startbootstrap-agency/blob/master/src/scss/_global.scss"
    click VARS "https://github.com/startbootstrap/startbootstrap-agency/blob/master/src/scss/_variables.scss"
    click COMP "https://github.com/startbootstrap/startbootstrap-agency/tree/master/src/scss/components"
    click SECT "https://github.com/startbootstrap/startbootstrap-agency/tree/master/src/scss/sections"
    click TYPOVARS "https://github.com/startbootstrap/startbootstrap-agency/blob/master/src/scss/variables/_typography.scss"
    click COLORVARS "https://github.com/startbootstrap/startbootstrap-agency/blob/master/src/scss/variables/_colors.scss"
    click MODALS "https://github.com/startbootstrap/startbootstrap-agency/tree/master/src/pug/includes"
    click BUILD "https://github.com/startbootstrap/startbootstrap-agency/tree/master/scripts"
    click WATCH "https://github.com/startbootstrap/startbootstrap-agency/blob/master/scripts/sb-watch.js"
    click DEBUG "https://github.com/startbootstrap/startbootstrap-agency/blob/master/scripts/start-debug.js"
    click START "https://github.com/startbootstrap/startbootstrap-agency/blob/master/scripts/start.js"
    click SCSS_BUILD "https://github.com/startbootstrap/startbootstrap-agency/blob/master/scripts/build-scss.js"
    click PUG_BUILD "https://github.com/startbootstrap/startbootstrap-agency/blob/master/scripts/build-pug.js"
    click ASSETS_BUILD "https://github.com/startbootstrap/startbootstrap-agency/blob/master/scripts/build-assets.js"
    click SCRIPTS_BUILD "https://github.com/startbootstrap/startbootstrap-agency/blob/master/scripts/build-scripts.js"
    click HTML "https://github.com/startbootstrap/startbootstrap-agency/blob/master/dist/index.html"
    click CSS "https://github.com/startbootstrap/startbootstrap-agency/blob/master/dist/css/styles.css"
    click BUNDLEJS "https://github.com/startbootstrap/startbootstrap-agency/blob/master/dist/js/scripts.js"
    click OPTASSETS "https://github.com/startbootstrap/startbootstrap-agency/tree/master/dist/assets"
```
