# cobiwave/simplefolio architecture

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

- Interactive diagram: https://gitdiagram.com/cobiwave/simplefolio
- Repository: https://github.com/cobiwave/simplefolio

## Overview

##### Project type and purpose
- This is a one-page, front-end portfolio template.
- It uses HTML, Sass, Bootstrap, custom JS (ScrollReveal, Tilt.js) and is bundled/served via Parcel.
- There is no backend or database—just a build step that produces static assets, then deployment to a static host (Netlify or GitHub Pages).

##### File structure
- `src/index.html`: entry HTML.
- `src/index.js`: JavaScript entrypoint (initializes animations).
- `src/sass/...`: styling hierarchy (variables, mixins, components, layout, sections).
- `src/assets/`: static resources (resume.pdf, images).
- `src/data/scrollRevealConfig.js`: config for reveal animations.
- `src/scripts/`: custom JS modules (scrollReveal.js, tiltAnimation.js).
- `package.json` + `.github/workflows/gh-pages.yml`: build and CI/CD definitions.

##### Extract README insights
- Bundler: Parcel (dev server & production build).
- CSS: Sass + Bootstrap v4.3.
- JS libs: ScrollReveal.js, Tilt.js.
- Deployment: Netlify or GitHub Pages via GitHub Actions.

##### Main components & interactions
a. Developer workstation
- Source code in GitHub repo (`.github`, `src/`, config files).
- Local dev: `npm start` → Parcel dev server → browser.
b. Continuous Integration & Deployment
- GitHub Actions (`.github/workflows/gh-pages.yml`) triggered on push to `main`.
- Runs `npm run build` (Parcel produces `/dist`).
- Deploys `/dist` to GitHub Pages or Netlify.
c. Static Hosting
- Netlify or GH Pages serves static files (HTML, CSS, JS, assets).
d. Client (Browser)
- User’s browser requests `index.html`, downloads CSS & JS bundles, assets.
- Executes JS for reveal & tilt animations.

##### Architectural patterns & design principles
- “Separation of Concerns”: HTML (structure), Sass (styles), JS (behavior).
- Build Pipeline: Parcel transforms ES6 & Sass → single/minified bundles.
- One-page application with lazy-loaded assets for performance.

##### Details
- Source folder breakdown:
- How Sass abstracts variables → mixins → components → sections → final CSS
- JS modules loading sequence (scrollRevealConfig → init of ScrollReveal & Tilt)
- Build output: single CSS & JS bundles under `/dist`
- CI workflow name and trigger (`gh-pages.yml`)
- Deployment target (URL of Netlify or GitHub Pages)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Workstation & Repository
    subgraph "Developer Workstation & Repository"
        direction TB
        Dev["Developer"]:::runtime
        Repo["GitHub Repo"]:::config
        Dev -->|clones/pushes| Repo

        subgraph "Source Code (src/)" 
            direction TB
            HTML["src/index.html"]:::source
            JS["src/index.js"]:::source
            subgraph "JS Modules" 
                direction TB
                ConfigJS["src/data/scrollRevealConfig.js"]:::source
                ScrollJS["src/scripts/scrollReveal.js"]:::source
                TiltJS["src/scripts/tiltAnimation.js"]:::source
            end
            subgraph "Styles (Sass Architecture)"
                direction TB
                StylesEntry["src/styles.scss"]:::source
                subgraph "Abstracts"
                    direction TB
                    Vars["_variables.scss"]:::source
                    Mixins["_mixins.scss"]:::source
                    Helpers["_helpers.scss"]:::source
                end
                subgraph "Base"
                    direction TB
                    Base["_base.scss"]:::source
                    Typography["_typography.scss"]:::source
                end
                subgraph "Components"
                    direction TB
                    Buttons["_buttons.scss"]:::source
                end
                subgraph "Layout"
                    direction TB
                    Footer["_footer.scss"]:::source
                    SectionsLayout["_sections.scss"]:::source
                end
                subgraph "Sections"
                    direction TB
                    Hero["_hero.scss"]:::source
                    About["_about.scss"]:::source
                    Projects["_projects.scss"]:::source
                    Contact["_contact.scss"]:::source
                end
                subgraph "Vendors"
                    direction TB
                    Bootstrap["_bootstrap.scss"]:::source
                end
            end
            subgraph "Assets"
                direction TB
                Resume["resume.pdf"]:::source
                AssetsOthers["images/icons"]:::source
            end
        end

        subgraph "Config Files"
            direction TB
            Gitignore[".gitignore"]:::config
            PackageJSON["package.json"]:::config
            Readme["README.md"]:::config
            Nvmrc[".nvmrc"]:::config
            Prettier[".prettierrc"]:::config
            License["LICENSE.md"]:::config
            Lockfile["package-lock.json"]:::config
        end
    end

    %% CI/CD Pipeline
    subgraph "CI/CD (GitHub Actions)" 
        direction TB
        GHActions[".github/workflows/gh-pages.yml"]:::tooling
    end

    %% Build & Bundling
    subgraph "Build & Bundling (Parcel)"
        direction TB
        DevServer["npm start (Parcel Dev Server)"]:::tooling
        BuildCmd["npm run build (Parcel Build)"]:::tooling
        Dist["/dist (Static Output)"]:::tooling
    end

    %% Static Hosting
    subgraph "Static Hosting" 
        direction TB
        Netlify["Netlify"]:::hosting
        GHPages["GitHub Pages"]:::hosting
    end

    %% Client Browser
    subgraph "Client (Browser)"
        direction TB
        Browser["User Browser"]:::runtime
    end

    %% Flows
    Repo -->|push to main| GHActions
    GHActions -->|runs build| BuildCmd
    BuildCmd -->|outputs| Dist
    Dist -->|deploy| Netlify
    Dist -->|deploy| GHPages
    Dev -->|npm start| DevServer
    DevServer --> Browser
    Browser -->|HTTP GET index.html| Netlify
    Browser -->|HTTP GET bundles/assets| Netlify
    Browser -->|executes ScrollReveal & Tilt| JS

    %% Click Events
    click HTML "https://github.com/cobiwave/simplefolio/blob/master/src/index.html"
    click JS "https://github.com/cobiwave/simplefolio/blob/master/src/index.js"
    click ConfigJS "https://github.com/cobiwave/simplefolio/blob/master/src/data/scrollRevealConfig.js"
    click ScrollJS "https://github.com/cobiwave/simplefolio/blob/master/src/scripts/scrollReveal.js"
    click TiltJS "https://github.com/cobiwave/simplefolio/blob/master/src/scripts/tiltAnimation.js"
    click StylesEntry "https://github.com/cobiwave/simplefolio/blob/master/src/styles.scss"
    click Vars "https://github.com/cobiwave/simplefolio/blob/master/src/sass/abstracts/_variables.scss"
    click Mixins "https://github.com/cobiwave/simplefolio/blob/master/src/sass/abstracts/_mixins.scss"
    click Helpers "https://github.com/cobiwave/simplefolio/blob/master/src/sass/abstracts/_helpers.scss"
    click Base "https://github.com/cobiwave/simplefolio/blob/master/src/sass/base/_base.scss"
    click Typography "https://github.com/cobiwave/simplefolio/blob/master/src/sass/base/_typography.scss"
    click Buttons "https://github.com/cobiwave/simplefolio/blob/master/src/sass/components/_buttons.scss"
    click Footer "https://github.com/cobiwave/simplefolio/blob/master/src/sass/layout/_footer.scss"
    click SectionsLayout "https://github.com/cobiwave/simplefolio/blob/master/src/sass/layout/_sections.scss"
    click Hero "https://github.com/cobiwave/simplefolio/blob/master/src/sass/sections/_hero.scss"
    click About "https://github.com/cobiwave/simplefolio/blob/master/src/sass/sections/_about.scss"
    click Projects "https://github.com/cobiwave/simplefolio/blob/master/src/sass/sections/_projects.scss"
    click Contact "https://github.com/cobiwave/simplefolio/blob/master/src/sass/sections/_contact.scss"
    click Bootstrap "https://github.com/cobiwave/simplefolio/blob/master/src/sass/vendors/_bootstrap.scss"
    click Resume "https://github.com/cobiwave/simplefolio/blob/master/src/assets/resume.pdf"
    click GHActions "https://github.com/cobiwave/simplefolio/blob/master/.github/workflows/gh-pages.yml"
    click PackageJSON "https://github.com/cobiwave/simplefolio/blob/master/package.json"
    click Gitignore "https://github.com/cobiwave/simplefolio/blob/master/.gitignore"
    click Readme "https://github.com/cobiwave/simplefolio/blob/master/README.md"
    click Nvmrc "https://github.com/cobiwave/simplefolio/blob/master/.nvmrc"
    click Prettier "https://github.com/cobiwave/simplefolio/blob/master/.prettierrc"
    click License "https://github.com/cobiwave/simplefolio/blob/master/LICENSE.md"
    click Lockfile "https://github.com/cobiwave/simplefolio/blob/master/package-lock.json"

    %% Styles
    classDef tooling fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef source fill:#aaffaa,stroke:#333,stroke-width:1px
    classDef runtime fill:#ffcc99,stroke:#333,stroke-width:1px
    classDef hosting fill:#d9b3ff,stroke:#333,stroke-width:1px
    classDef config fill:#eeeeee,stroke:#333,stroke-width:1px
```
