# truong310100/portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a single-page React application (SPA) serving as a personal portfolio/resume site.
- Key indicators: React entry point (`src/index.js`), a suite of presentational components under `src/components`, Tailwind CSS config, static `public` folder, i18n for English/Vietnamese, and build/deploy commands in the README.

##### File structure
- Top-level files: `package.json` (dependencies & scripts), `tailwind.config.js` (CSS framework config), `.gitignore`.
- `public/`: static HTML shell (`index.html`), assets used at runtime (`404.html`, `manifest.json`, etc.).
- `src/`:
- `index.js` boots the React app into the DOM.
- `App.js` defines the SPA’s router or main layout.
- `components/`: modular UI pieces—Header, Footer, Summary, Education, Skills, Workings, Contact, Additional.
- `i18n/`: localization setup and JSON dictionaries (`en.json`, `vi.json`).
- `assets/`: static CV documents (DOCX, PDF).
- test and utility files (`App.test.js`, `reportWebVitals.js`, `setupTests.js`).

##### README for additional insights
- Minimal instructions: commit code, run `npm run build`, then `npm run deploy`. Likely using a deploy script (e.g., GitHub Pages or Netlify CLI).
- No backend or API calls—fully static SPA.

##### Elements
- Clear labels: e.g., “Developer”, “GitHub Repo”, “CI/CD”, “Hosting/CDN”, “Browser/React SPA”.
- Rectangles for infrastructure (Repo, CI/CD, Hosting)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Infrastructure Layer
    Developer(("Developer")):::infra
    Repo["GitHub Repository"]:::infra
    CICD["CI/CD Pipeline<br/>npm run build & deploy"]:::infra
    Hosting["Hosting & CDN"]:::infra
    UserBrowser(("End-User Browser")):::infra

    Developer -->|push code| Repo
    Repo -->|trigger build| CICD
    CICD -->|deploy static assets| Hosting
    Hosting -->|HTTP GET assets| UserBrowser

    %% Build Artifacts
    subgraph "Build Artifacts" 
        HTML["index.html"]:::asset
        JS["bundle.js"]:::asset
        CSS["CSS Bundle"]:::asset
    end
    CICD -->|outputs| HTML
    CICD -->|outputs| JS
    CICD -->|outputs| CSS
    HTML --> Hosting
    JS --> Hosting
    CSS --> Hosting

    %% Browser Runtime
    subgraph "Browser Runtime"
        Shell["Shell HTML<br/>public/index.html"]:::runtime
        React["React Runtime<br/>src/index.js & src/App.js"]:::runtime
        CSSbundle["CSS Bundle<br/>tailwind.config.js, src/index.css, src/App.css"]:::runtime
        i18n["i18n Module<br/>src/i18n/i18n.js"]:::runtime
        Components["UI Components"]:::component
        AssetFetcher["Asset Fetcher"]:::runtime
        JSONStore["i18n JSON<br/>src/i18n/en.json, src/i18n/vi.json"]:::asset
        CVassets["CV Documents<br/>.docx & .pdf"]:::asset
    end

    Hosting -->|serves| Shell
    Hosting -->|serves| JS
    Hosting -->|serves| CSS

    Shell -->|bootstrap| React
    React -->|loads| Components
    React -->|applies| CSSbundle
    React -->|initializes| i18n
    i18n -->|fetch dictionaries| JSONStore
    Components -->|request download| AssetFetcher
    AssetFetcher -->|fetches| CVassets

    %% Click Events
    click src/index.js "https://github.com/truong310100/portfolio/blob/main/src/index.js"
    click src/App.js "https://github.com/truong310100/portfolio/blob/main/src/App.js"
    click tailwind.config.js "https://github.com/truong310100/portfolio/blob/main/tailwind.config.js"
    click src/index.css "https://github.com/truong310100/portfolio/blob/main/src/index.css"
    click src/App.css "https://github.com/truong310100/portfolio/blob/main/src/App.css"
    click Header "https://github.com/truong310100/portfolio/blob/main/src/components/Header.js"
    click Footer "https://github.com/truong310100/portfolio/blob/main/src/components/Footer.js"
    click Summary "https://github.com/truong310100/portfolio/blob/main/src/components/Summary.js"
    click Education "https://github.com/truong310100/portfolio/blob/main/src/components/Education.js"
    click Skills "https://github.com/truong310100/portfolio/blob/main/src/components/Skills.js"
    click Workings "https://github.com/truong310100/portfolio/blob/main/src/components/Workings.js"
    click Contact "https://github.com/truong310100/portfolio/blob/main/src/components/Contact.js"
    click Additional "https://github.com/truong310100/portfolio/blob/main/src/components/Additional.js"
    click i18n "https://github.com/truong310100/portfolio/blob/main/src/i18n/i18n.js"
    click en.json "https://github.com/truong310100/portfolio/blob/main/src/i18n/en.json"
    click vi.json "https://github.com/truong310100/portfolio/blob/main/src/i18n/vi.json"
    click docx "https://github.com/truong310100/portfolio/blob/main/src/assets/NguyenLamTruong-CV.docx"
    click pdf "https://github.com/truong310100/portfolio/blob/main/src/assets/NguyenLamTruong-CV.pdf"
    click public_index "https://github.com/truong310100/portfolio/blob/main/public/index.html"
    click public_404 "https://github.com/truong310100/portfolio/blob/main/public/404.html"
    click manifest "https://github.com/truong310100/portfolio/blob/main/public/manifest.json"
    click SEO "https://github.com/truong310100/portfolio/blob/main/src/SEO.js"
    click reportWebVitals "https://github.com/truong310100/portfolio/blob/main/src/reportWebVitals.js"
    click setupTests "https://github.com/truong310100/portfolio/blob/main/src/setupTests.js"
    click App_test "https://github.com/truong310100/portfolio/blob/main/src/App.test.js"
    click package "https://github.com/truong310100/portfolio/blob/main/package.json"
    click gitignore "https://github.com/truong310100/portfolio/blob/main/.gitignore"
    click readme "https://github.com/truong310100/portfolio/blob/main/README.md"

    %% Styles
    classDef infra fill:#f0f8ff,stroke:#4682b4,stroke-width:2px
    classDef asset fill:#fffacd,stroke:#daa520,stroke-width:2px
    classDef runtime fill:#e6e6fa,stroke:#9370db,stroke-width:2px
    classDef component fill:#f5f5f5,stroke:#708090,stroke-width:2px
```
