# bernardinolintang/bernardinolintangwebsite architecture

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

- Interactive diagram: https://gitdiagram.com/bernardinolintang/bernardinolintangwebsite
- Repository: https://github.com/bernardinolintang/bernardinolintangwebsite

## Overview

##### Project Type & Purpose
- This is a **static single‐page application (SPA)** built with **React + TypeScript**, styled with **TailwindCSS**, bundled by **Vite**, and deployed on **Vercel**.
- Purpose: showcase portfolio content (About, Projects, Tech Stack, Contact) as a fast, responsive, client‐side web experience.

##### Key Components
a. **Development Environment**
- Local machine / Developer
- Source code repo (GitHub)
- Node.js + npm (dependencies from npm registry)
- Vite dev server (runs on localhost during development)
b. **Build & CI/CD Pipeline**
- Vite build process (bundles `src/` into static assets)
- Output: `build/` directory (HTML, CSS, JS bundles, assets)
- Vercel integration (on push to main branch → triggers build & deploy)
c. **Hosting & Delivery**
- Vercel (CI/CD + CDN + Edge network)
- Public/static hosting (serves `index.html`, JS, CSS, images, PDFs)
- CDN caches assets globally
d. **Client (Browser)**
- HTTP request to CDN → fetches `index.html`
- Loads JS bundle, CSS, assets
- React runtime renders UI, handles routing, fetches any external images (e.g., Figma fallbacks)
e. **UI Library & Internal Modules**
- `src/components/ui/*` (atomic UI components)
- `ThemeProvider`, `WireframeKit`, portfolio‐specific components
- TailwindCSS utility classes (post‐processed at build)

##### Relationships & Data Flow
- Developer → pushes code → GitHub repo
- GitHub webhook → Vercel build start
- Vercel runs `npm install` → `vite build` → outputs `build/`
- Vercel deploy → distributes to CDN
- End‐user’s browser → requests site → CDN edge → serves static files
- Browser executes JS → React renders pages, user navigates SPA
- (Optional) Browser requests external images from fallback sources (Figma URLs)

##### Architectural Patterns & Principles
- **Client‐side rendering**: All UI rendered in browser
- **Atomic design**: Reusable UI components under `src/components/ui/`
- **Single Responsibility**: Each React component (accordion, alert, button, etc.) encapsulates one piece of UI logic
- **Separation of concerns**: Styling (Tailwind) kept in CSS, layout and logic in TSX
- **CI/CD** via Vercel for zero‐config deploys of static sites

##### Essential Elements
- Nodes: Developer → GitHub → Vercel Build & Deploy → Vercel CDN → Browser
- Subcomponents: Vite Bundler, TailwindCSS Processor, React Runtime, UI Libraries
- Assets: index.html, CSS, JS bundles, PDFs, images

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Development Environment"
        Dev["Developer"]:::dev
        NodeNPM["Node.js + npm"]:::dev
        GitHub["GitHub Repo"]:::dev
        ViteDev["Vite Dev Server\n(localhost)"]:::dev
    end

    subgraph "Source Code"
        PackageConfig["package.json & package-lock.json"]:::dev
        ViteBundler["vite.config.ts"]:::dev
        TailwindProc["src/styles/globals.css"]:::dev
        IndexDev["index.html"]:::dev
        MainTSX["src/main.tsx"]:::dev
        AppTSX["src/App.tsx"]:::dev
        PortfolioTSX["src/components/Portfolio.tsx"]:::client
        ThemeProviderTSX["src/components/ThemeProvider.tsx"]:::client
        WireframeKitTSX["src/components/WireframeKit.tsx"]:::client
        UIComponents["src/components/ui/"]:::client
        ImageWithFallback["src/components/figma/ImageWithFallback.tsx"]:::client
        IndexCSS["src/index.css"]:::dev
        PublicAssets["public/"]:::dev
    end

    Dev -->|"writes code & push"| GitHub
    NodeNPM -->|"installs deps"| PackageConfig
    GitHub -->|"webhook triggers"| VercelBuild

    subgraph "CI/CD Pipeline & Build"
        VercelBuild["Vercel Build & Deploy"]:::hosting
        Build["Vite Build Process"]:::dev
        BuildOutput["build/"]:::hosting
        IndexProd["build/index.html"]:::hosting
        BuildAssets["build/assets/"]:::hosting
    end

    GitHub -->|"push to main"| VercelBuild
    VercelBuild -->|"npm install & vite build"| Build
    Build -->|"outputs"| BuildOutput
    BuildOutput --> IndexProd
    BuildOutput --> BuildAssets
    VercelBuild -->|"deploy to"| VercelCDN

    subgraph "Hosting & CDN"
        VercelCDN["Vercel CDN"]:::hosting
    end

    subgraph "Client (Browser)"
        Browser["Browser"]:::client
    end

    VercelCDN -->|"serves static files"| Browser
    Browser -->|"fetch index.html"| IndexProd
    Browser -->|"load JS/CSS"| BuildAssets
    Browser -->|"execute & React render"| AppTSX
    Browser -->|"requests external images"| ImageWithFallback

    classDef dev fill:#a3c4f3,stroke:#1f2c56,color:#000
    classDef hosting fill:#b2f7b2,stroke:#1f2c56,color:#000
    classDef client fill:#f9bc86,stroke:#1f2c56,color:#000

    class Dev,NodeNPM,GitHub,ViteDev,PackageConfig,ViteBundler,TailwindProc,IndexDev,MainTSX,Build dev
    class PortfolioTSX,ThemeProviderTSX,WireframeKitTSX,UIComponents,ImageWithFallback,Browser client
    class VercelBuild,BuildOutput,IndexProd,BuildAssets,VercelCDN hosting

    click ViteBundler "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/vite.config.ts"
    click TailwindProc "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/src/styles/globals.css"
    click BuildOutput "https://github.com/bernardinolintang/bernardinolintangwebsite/tree/main/build/"
    click IndexDev "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/index.html"
    click IndexProd "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/build/index.html"
    click MainTSX "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/src/main.tsx"
    click AppTSX "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/src/App.tsx"
    click PortfolioTSX "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/src/components/Portfolio.tsx"
    click ThemeProviderTSX "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/src/components/ThemeProvider.tsx"
    click WireframeKitTSX "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/src/components/WireframeKit.tsx"
    click UIComponents "https://github.com/bernardinolintang/bernardinolintangwebsite/tree/main/src/components/ui/"
    click ImageWithFallback "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/src/components/figma/ImageWithFallback.tsx"
    click PublicAssets "https://github.com/bernardinolintang/bernardinolintangwebsite/tree/main/public/"
    click PackageConfig "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/package.json"
    click IndexCSS "https://github.com/bernardinolintang/bernardinolintangwebsite/blob/main/src/index.css"
    click BuildAssets "https://github.com/bernardinolintang/bernardinolintangwebsite/tree/main/build/assets/"
```
