# zawlwintun816/portfolio-website architecture

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

- Interactive diagram: https://gitdiagram.com/zawlwintun816/portfolio-website
- Repository: https://github.com/zawlwintun816/portfolio-website

## Overview

##### Project type & purpose (what you’re diagramming)
This repo is a **static front-end portfolio website** (HTML/CSS/JS) with **client-side interactivity** and **dynamic content fetched at runtime from Cloudflare R2**. There is **no backend service in this repo**—the “dynamic” behavior comes from the browser calling an external storage endpoint (R2) to retrieve data/assets.

- Static hosting (Pages/GitHub Pages/Netlify/Vercel) serving HTML/CSS/JS
- Browser executing JS (jQuery/Bootstrap/AOS)
- Browser fetching JSON/media/data from Cloudflare R2
- Optional CDN/edge (depending on host) delivering assets faster

From the tree:

- `index.html`
- The single-page entry point and primary UI composition.
- `css/`
- `style.css` (custom styling)
- `aos.css` (AOS library styling)
- `js/`
- `script.js` (your core client logic: dynamic fetching, nav highlight, UI behaviors)
- `aos.js` (AOS animation library runtime)
- `assets/`
- Images/media used by the portfolio (local static assets)
- `webfonts/`
- Font Awesome (and related fonts) delivered as static files

- **Bootstrap 5** (either local or CDN referenced in `index.html`)
- **jQuery** (either local or CDN referenced in `index.html`)
- **Font Awesome** (partly local via `webfonts/`, possibly CSS via CDN/local)
- **Cloudflare R2** (external data hosting; likely JSON files, certificates data, project lists, etc.)

Key runtime behaviors to explicitly show:
- “Dynamic data fetching from Cloudflare R2”
- “AOS scroll animations”
- “Active navigation highlighting based on scroll position”
- “Interactive UI built with JavaScript and jQuery”
- “Deploy on any static hosting platform” (so hosting is an interchangeable component)

- **Data flow**: Browser → R2 (HTTP GET for JSON/assets) → Browser renders sections
- **Rendering flow**: HTML loads → JS executes → DOM updated (projects/skills/certifications)
- **UI behavior flow**: Scroll events → AOS triggers + nav highlighting logic

##### Browser (Client Runtime)
- Sub-labels inside:
- HTML (`index.html`)
- CSS (`css/style.css`, `css/aos.css`)
- JS (`js/script.js`, `js/aos.js`)
- Libraries: jQuery, Bootstrap 5, AOS, Font Awesome
##### Cloudflare R2 (Object Storage)
- Sub-label: “dynamic data (JSON) + possibly images/certificates)”
##### Third-party CDNs (optional but accurate if used)
- If everything is local, omit this.

##### User → Browser
- “Navigates to portfolio URL”
##### Browser → Static Hosting
- “GET /index.html, /css/*, /js/*, /assets/*, /webfonts/*”
##### Browser → Cloudflare R2
- “GET dynamic content (e.g., JSON for projects/skills/certifications)”
##### (Optional) Browser → Third-party CDN
- “GET bootstrap.min.css / jquery.min.js / fontawesome css” etc.
##### Inside Browser (important for correctness even if not “network”)
- `script.js` → “Fetch data” → “DOM render/update sections”
- “Scroll events” → “AOS animate” and “Active nav highlight”

##### Architectural patterns / principles to highlight
- **Client-side rendering / enhancement**: HTML baseline + JS enhances content and interactivity.
- **Externalized content**: Data decoupled from deployment via R2 (content updates without redeploy if R2 changes).
- **Static hosting**: immutable build artifact (no server-side compute).
- **Progressive separation**:
- Presentation: CSS
- Behavior: JS
- Content: R2 data

##### Relevant technologies to label (don’t bury them)
- Bootstrap 5 (layout/components)
- jQuery (DOM/events)
- AOS (scroll animation)
- “Cloudflare R2 (Object Storage)”
- “CORS-enabled public reads” (if applicable; dynamic fetch requires it)

##### Labels
- **Protocol**: HTTPS
- **Resource types**: HTML/CSS/JS, JSON, images
- **Trigger**: “Initial load” vs “On scroll” vs “On page ready”

- Make it obvious that:
- Static host serves the app shell
- The app shell (JS) fetches dynamic data from R2

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% =========================
    %% Global / External Entities
    %% =========================
    U["User"]:::external

    SH["StaticHost/CDN(CloudflarePages·GitHubPages·Netlify·Vercel)"]:::host

    CDN["Third-partyCDNs(optional)"]:::cloud

    R2[("CloudflareR2(ObjectStorage)\nDynamicdata(JSON)+media\nCORS-enabledpublicreads")]:::datastore

    %% =========================
    %% Client Runtime (Browser)
    %% =========================
    subgraph "ClientRuntime(Browser)"
        B["Browser"]:::client

        subgraph "AppShell(StaticFront-end)"
            HTML["index.html\nSingle-pageUIcomposition"]:::artifact
            CSS1["css/style.css\nCustomstyling"]:::artifact
            CSS2["css/aos.css\nAOSstyling"]:::artifact

            JS1["js/script.js\nCoreclientlogic\nFetch+render+scrollnavhighlight"]:::logic
            JS2["js/aos.js\nAOSruntime(scrollanimations)"]:::lib

            ASSETS["assets/*\nLocalimages/media"]:::artifact
            FONTS["webfonts/*\nFontAwesomewebfonts"]:::artifact
        end

        subgraph "Libraries(loadedinbrowser)"
            JQ["jQuery(DOM+events)"]:::lib
            BS["Bootstrap5(layout+components)"]:::lib
            FA["FontAwesome(icons)"]:::lib
            AOSLIB["AOS(animateonscroll)"]:::lib
        end

        subgraph "RuntimeBehaviors"
            INIT["Onpageload\nParseHTML+loadCSS/JS"]:::behavior
            FETCH["Onready\nFetchdynamiccontent(JSON)"]:::behavior
            RENDER["DOMupdate\nRenderprojects/skills/certifications"]:::behavior
            SCROLL["Onscroll\nActivenavhighlight+AOStriggers"]:::behavior
        end
    end

    DOC["README\nRuntimebehaviornotes"]:::doc

    %% =========================
    %% Flows (Vertical emphasis)
    %% =========================
    U -->|"NavigatestoportfolioURL(HTTPS)"| B

    B -->|"InitialloadGET(HTTPS)\n/index.html\n/css/*/js/*\n/assets/*/webfonts/*"| SH
    SH -->|"Serveappshell(HTML/CSS/JS+staticassets)"| B

    %% Optional third-party CDN loads (dashed)
    B -.->|"OptionalGET(HTTPS)\nbootstrap/jQuery/AOS/FontAwesome"| CDN
    CDN -.->|"Returnlibraryassets"| B

    %% In-browser orchestration
    HTML -->|"BootstrapsUI"| INIT
    CSS1 -->|"Presentation"| INIT
    CSS2 -->|"Animationstyles"| INIT
    JS1 -->|"Controllerlogic"| FETCH
    JS2 -->|"Animationruntime"| SCROLL

    INIT -->|"DOMContentready"| FETCH
    FETCH -->|"UpdateUIstate"| RENDER
    RENDER -->|"Attachscrollhandlers"| SCROLL

    %% Externalized content
    JS1 -->|"HTTPGET(HTTPS)\nDynamiccontent(JSON)+media"| R2
    R2 -->|"ReturnJSON/assets"| JS1
    JS1 -->|"Renderfetchedcontent"| RENDER

    %% Libraries relationships (in-browser)
    JS1 -->|"Uses"| JQ
    JS1 -->|"Usescomponents/layout"| BS
    JS1 -->|"Usesicons"| FA
    JS2 -->|"Implements"| AOSLIB
    SCROLL -->|"Triggeranimations"| AOSLIB
    SCROLL -->|"Computeactivesection\nHighlightnav"| JS1

    %% Documentation influence (non-runtime)
    DOC -.->|"Describesruntimebehavior\n(architectureintent)"| B

    %% =========================
    %% Click Events (from mapping)
    %% =========================
    click HTML "https://github.com/zawlwintun816/portfolio-website/blob/main/index.html"
    click CSS1 "https://github.com/zawlwintun816/portfolio-website/blob/main/css/style.css"
    click CSS2 "https://github.com/zawlwintun816/portfolio-website/blob/main/css/aos.css"
    click JS1 "https://github.com/zawlwintun816/portfolio-website/blob/main/js/script.js"
    click JS2 "https://github.com/zawlwintun816/portfolio-website/blob/main/js/aos.js"
    click ASSETS "https://github.com/zawlwintun816/portfolio-website/tree/main/assets/"
    click FONTS "https://github.com/zawlwintun816/portfolio-website/tree/main/webfonts/"
    click DOC "https://github.com/zawlwintun816/portfolio-website/blob/main/readme.md"

    %% =========================
    %% Styles
    %% =========================
    classDef external fill:#e5e7eb,stroke:#6b7280,color:#111827,stroke-width:1px
    classDef host fill:#bfdbfe,stroke:#1d4ed8,color:#0b1b3a,stroke-width:1px
    classDef client fill:#93c5fd,stroke:#1e40af,color:#0b1b3a,stroke-width:1px
    classDef datastore fill:#bbf7d0,stroke:#15803d,color:#052e16,stroke-width:1px
    classDef cloud fill:#d1d5db,stroke:#4b5563,color:#111827,stroke-width:1px
    classDef artifact fill:#dbeafe,stroke:#2563eb,color:#0b1b3a,stroke-width:1px
    classDef logic fill:#60a5fa,stroke:#1d4ed8,color:#071a33,stroke-width:1px
    classDef lib fill:#c7d2fe,stroke:#4338ca,color:#111827,stroke-width:1px
    classDef behavior fill:#fde68a,stroke:#b45309,color:#111827,stroke-width:1px
    classDef doc fill:#f3f4f6,stroke:#6b7280,color:#111827,stroke-width:1px
```
