# kyle-schwartz-yang/uacenter architecture

> Architecture diagram of the GitHub repository kyle-schwartz-yang/uacenter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kyle-schwartz-yang/uacenter
- Repository: https://github.com/kyle-schwartz-yang/uacenter

## Overview

##### Project type and purpose
- This is a front‑end, multi‑page static website (“UACENTER”) built with Pug templates, SCSS, and vanilla JavaScript.
- It follows Feature‑Sliced Design (FSD) to organize UI components and logic into layers (pages, features, entities, shared, widgets).
- The build tool is Prepros (prepros.config), which compiles Pug→HTML, SCSS→CSS, bundles and minifies JS, and runs a live‑reload server.

##### File structure
- Top‑level “_source” directory contains all source code, subdivided by FSD layers:
- components/pages – page‑specific templates & styles
- components/features – reusable feature blocks (e.g., TabbedSystem)
- components/entities – domain components (e.g., CardProduct)
- components/shared – global UI kit & utilities (common and project‑specific)
- components/widgets – higher‑order widgets (Header, Footer, Modals, GoogleMaps, Sidebar, Store‑category)
- scripts/ and _source/scripts contain JS modules (initAnimation, initModals, initSearchLive, initValidateForm) and library wrappers (_Swiper).
- prepros.config and package.json describe the build configuration and dependencies.
- Builds output static HTML/CSS/JS to the project root (index.html, about.html, css/main.css, script/app.js).

##### README for additional insights
- Confirms FSD architecture, vanilla JS, responsive design, dark theme toggle.
- Emphasizes Prepros features (compilation, minification, image optimization, live reload).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build-Time Pipeline
    subgraph "Build-Time Pipeline"
        direction TB
        Developer["Developer Workstation"]:::build
        Package["package.json"]:::build
        Prepros["Prepros Build System"]:::build
        subgraph "Source Artifacts"
            direction TB
            Pages["_source/components/pages"]:::build
            Features["_source/components/features"]:::build
            Entities["_source/components/entities"]:::build
            Shared["_source/components/shared"]:::build
            Widgets["_source/components/widgets"]:::build
            AppPug["_source/components/app/pug"]:::build
            AppStyles["_source/components/app/styles"]:::build
            Modules["_source/scripts/modules"]:::build
            Library["_source/scripts/library"]:::build
        end
        Developer -->|edits| Pages
        Developer -->|edits| Features
        Developer -->|edits| Entities
        Developer -->|edits| Shared
        Developer -->|edits| Widgets
        Developer -->|edits| AppPug
        Developer -->|edits| AppStyles
        Developer -->|edits| Modules
        Developer -->|edits| Library
        Developer -->|configures| Package
        Developer -->|runs| Prepros
        Prepros -->|watches & compiles| Pages
        Prepros -->|watches & compiles| Features
        Prepros -->|watches & compiles| Entities
        Prepros -->|watches & compiles| Shared
        Prepros -->|watches & compiles| Widgets
        Prepros -->|compiles Pug→HTML| Pages
        Prepros -->|compiles SCSS→CSS| AppStyles
        Prepros -->|bundles & minifies JS| Modules
        Prepros -->|bundles & minifies JS| Library
        Prepros -->|outputs| HTMLs
        Prepros -->|outputs| CSSout
        Prepros -->|outputs| JSout
        HTMLs["index.html, about.html, contacts.html, financing.html, grelations.html, safety.html, tax.html, international.html"]:::build
        CSSout["css/main.css"]:::build
        JSout["script/app.js"]:::build
    end

    %% Runtime Environment
    subgraph "Browser Runtime" 
        direction TB
        Browser["Browser (End-User)"]:::runtime
        InitModules["Initialize JS Modules (animations, modals, search, form validation, theme toggle)"]:::runtime
        ThemeToggle["Theme Toggle Module"]:::runtime
        GoogleMapsMod["Google Maps Widget Module"]:::runtime
    end

    %% External Services
    MapsAPI["Google Maps API"]:::external

    %% Data Flows
    JSout -->|loads| Browser
    Browser -->|executes| InitModules
    InitModules -->|loads| ThemeToggle
    InitModules -->|loads| GoogleMapsMod
    GoogleMapsMod -->|calls| MapsAPI

    %% FSD Layer Dependencies
    Pages -->|"imports"| Features
    Features -->|"imports"| Entities
    Entities -->|"imports"| Shared
    Shared -->|"imports"| Widgets

    %% Click Events
    click Prepros "https://github.com/kyle-schwartz-yang/uacenter/blob/main/prepros.config"
    click Package "https://github.com/kyle-schwartz-yang/uacenter/blob/main/package.json"
    click Pages "https://github.com/kyle-schwartz-yang/uacenter/tree/main/_source/components/pages"
    click Features "https://github.com/kyle-schwartz-yang/uacenter/tree/main/_source/components/features"
    click Entities "https://github.com/kyle-schwartz-yang/uacenter/tree/main/_source/components/entities"
    click Shared "https://github.com/kyle-schwartz-yang/uacenter/tree/main/_source/components/shared"
    click Widgets "https://github.com/kyle-schwartz-yang/uacenter/tree/main/_source/components/widgets"
    click AppPug "https://github.com/kyle-schwartz-yang/uacenter/tree/main/_source/components/app/pug"
    click AppStyles "https://github.com/kyle-schwartz-yang/uacenter/tree/main/_source/components/app/styles"
    click Modules "https://github.com/kyle-schwartz-yang/uacenter/tree/main/_source/scripts/modules"
    click Library "https://github.com/kyle-schwartz-yang/uacenter/tree/main/_source/scripts/library"
    click JSout "https://github.com/kyle-schwartz-yang/uacenter/blob/main/script/app.js"
    click CSSout "https://github.com/kyle-schwartz-yang/uacenter/blob/main/css/main.css"
    click HTMLs "https://github.com/kyle-schwartz-yang/uacenter/blob/main/index.html"

    %% Styles
    classDef build fill:#cce5ff,stroke:#3399ff,stroke-width:1px;
    classDef runtime fill:#d4edda,stroke:#2e8b57,stroke-width:1px;
    classDef external fill:#ffe5b4,stroke:#ff8c00,stroke-width:1px;
```
