# amoncada0216/my-portfolio architecture

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

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

## Overview

##### Project type & purpose (from README + tree)
This is a **single-page frontend web application** built with **React + Vite**. The README is the default Vite template README (no product description), but the file tree strongly suggests a **portfolio/marketing-style SPA** composed of sections like `Hero`, `About`, `Projects`, `Skills`, `FAQ`, `Contact`, plus UI widgets like `Navbar`, `Carousel`, `Particles`, `ThemeButton`, and a `WhatsappIcon`.

There is **no backend**, **no database**, and no server-side runtime in the repo. The only “runtime” is the browser; the build toolchain is Vite.

##### Architecture signals in the file structure
Key directories/files and what they imply:

- `index.html`
Vite entry HTML; mounts the React app.

- `src/main.jsx`
React bootstrap: creates the root and renders `<App />`.

- `src/App.jsx`
Top-level application composition (likely imports `layout/*` and shared components).

- `src/layout/*`
Indicates a **section-based layout architecture** (page sections / feature slices):
`Hero`, `About`, `Projects`, `Skills`, `FAQ`, `Contact`.

- `src/components/*`
Reusable UI components (presentational/interactive):
`Navbar`, `Carousel`, `Particles`, `AnimatedBorder`, `ThemeButton`, `WhatsappIcon`, etc.

- `src/index.css` + component CSS (`Carousel.css`)
Styling layer.

- `vite.config.js`
Build/dev server config (bundling, base path, plugins, assets).

- `.github/workflows/deploy.yml`
CI/CD pipeline — likely builds and deploys the static site (e.g., GitHub Pages).

- `package.json` / `package-lock.json`, `eslint.config.js`
Tooling: dependencies, scripts, linting.

So: **Component-based UI architecture** with a **layout/sections layer** and a **shared components layer**, bundled and deployed as a **static artifact**.

- **Runtime view (browser execution + user interactions)**
- **Build & deployment view (Vite build pipeline + GitHub Actions deploy)**
- **Internal module structure (App → layouts → components)**

##### Build + Deploy pipeline (how it becomes a deployed site)

This gives “system design” completeness even without backend services.

##### Runtime / delivery components
- **User (Browser)**
- **SPA assets**:
- `index.html`
- JS bundle(s)
- CSS
- `/public` static assets

- Browser → Static Host: `GET /` returns `index.html`
- Browser → Static Host: `GET /assets/...` (bundles, CSS, images)
- Browser executes React app → renders UI

##### Frontend application internals (module view)
Internal dependency graph clearly:

- `index.html`
→ loads Vite entry script
- `src/main.jsx`
→ renders `src/App.jsx`
- `src/App.jsx`
→ composes `src/layout/*` sections
- `src/layout/*`
→ use `src/components/*` (Navbar, Carousel, ThemeButton, etc.)
- Styling:
- `src/index.css` applies globally
- component-level CSS (e.g., `Carousel.css`) imported by component

**Typical section interactions to show (even if not 100% confirmed, they’re reasonable and align with names):**
- `Navbar` links/scrolls to section anchors (`Hero`, `About`, …)
- `ThemeButton` toggles theme state (could be local state, context, or CSS class on `body`)
- `Carousel` displays project cards/content (likely used in `Projects.jsx`)
- `Particles` used as background in `Hero` or global wrapper
- `WhatsappIcon` opens `wa.me` link (external navigation)

##### Tooling / build system
- **Vite dev server (local)**:
- HMR during development
- **Vite build (CI)**:
- transforms React JSX → production bundles
- outputs `/dist` (not in tree, but implied)
- **GitHub Actions workflow**:
- checkout → install → lint (maybe) → build → deploy to static host

- Developer → `npm install` / `npm run dev` → Vite dev server → Browser
- GitHub Actions → `npm ci` → `npm run build` → artifact (`dist/`) → Deploy

##### Architectural patterns / principles to highlight
- **SPA (Single Page Application)**: client-side rendering, navigation via anchors/scroll or client routing (no routing files shown; likely single page sections).
- **Component-based architecture**: reusable `components/` and page/section `layout/`.
- **Separation of concerns**:
- `layout/` = page sections (composition)
- `components/` = reusable UI building blocks
- `index.css` and component CSS = styling
- **Static site deployment**: no server state, no DB, no backend API calls evident.

##### “Don’t overthink it”: maximize component separation for this repo
To be “very detailed” for this codebase, err on the side of:
- Explicitly showing:
- entrypoints (`index.html`, `main.jsx`)
- styling (`index.css`, component CSS)
- pipeline (`deploy.yml`, Vite build)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% =========================
    %% Diagram 1: Runtime / Delivery
    %% =========================
    subgraph "Runtime / Delivery (Client-side SPA)"
        U["User"]:::external
        B["Browser (React SPA runtime)"]:::runtime
        SH["Static Host (e.g., GitHub Pages)"]:::runtime
        WA["WhatsApp (wa.me)"]:::external

        U -->|"clicks_scrolls_toggles_theme"| B
        B -->|"HTTP_GET_/_index.html"| SH
        B -->|"HTTP_GET_/assets_js_css_images"| SH
        B -->|"open_external_link"| WA

        note_rt["Notes:\n- SPA rendered in-browser\n- Assets from Vite build output + /public"]:::note
        SH -->|"serves_static_assets"| note_rt
    end

    %% =========================
    %% Diagram 2: Frontend Module / Component Composition
    %% =========================
    subgraph "Frontend Codebase (React + Vite)"
        direction TB

        subgraph "Entry & Bootstrap"
            direction TB
            H["index.html"]:::asset
            M["src/main.jsx"]:::module
            A["src/App.jsx"]:::module
            CSSG["src/index.css (global styles)"]:::asset

            H -->|"loads_entry_script"| M
            M -->|"renders"| A
            M -.->|"imports"| CSSG
        end

        subgraph "Layout Sections (src/layout)"
            direction TB
            LDIR["src/layout/ (sections)"]:::dir
            Hero["Hero.jsx"]:::section
            About["About.jsx"]:::section
            Projects["Projects.jsx"]:::section
            Skills["Skills.jsx"]:::section
            FAQ["FAQ.jsx"]:::section
            Contact["Contact.jsx"]:::section

            LDIR --> Hero
            LDIR --> About
            LDIR --> Projects
            LDIR --> Skills
            LDIR --> FAQ
            LDIR --> Contact
        end

        subgraph "Shared Components (src/components)"
            direction TB
            CDIR["src/components/ (shared UI)"]:::dir

            Nav["Navbar.jsx"]:::component
            Car["Carousel.jsx"]:::component
            CarCSS["Carousel.css"]:::asset
            Part["Particles.jsx"]:::component
            Theme["ThemeButton.jsx"]:::component
            AB["AnimatedBorder.jsx"]:::component
            WAI["WhatsappIcon.jsx"]:::component

            CDIR --> Nav
            CDIR --> Car
            CDIR --> Part
            CDIR --> Theme
            CDIR --> AB
            CDIR --> WAI

            Car -.->|"imports_styles"| CarCSS
        end

        subgraph "Cross-cutting UI State"
            direction TB
            TState["Theme state (local/context/CSS class on document)"]:::state
        end

        subgraph "Static Assets"
            direction TB
            PUB["public/ (static assets)"]:::dir
        end

        %% Composition relationships
        A -->|"composes"| Hero
        A -->|"composes"| About
        A -->|"composes"| Projects
        A -->|"composes"| Skills
        A -->|"composes"| FAQ
        A -->|"composes"| Contact

        %% Likely shared usage (per repo intent)
        A -->|"uses"| Nav
        Hero -->|"uses"| Part
        Hero -->|"uses"| AB
        Projects -->|"uses"| Car
        A -->|"uses"| Theme
        Contact -->|"uses"| WAI

        Theme -->|"toggles"| TState
        A -.->|"reads_applies"| TState

        %% Asset usage
        A -.->|"references_assets"| PUB
    end

    %% Connect runtime to code artifacts (delivery mapping)
    SH -->|"serves"| H
    SH -->|"serves"| PUB
    SH -->|"serves_bundled"| B

    %% =========================
    %% Diagram 3: Build + CI/CD Pipeline
    %% =========================
    subgraph "Build & CI/CD (Static Site)"
        direction TB

        Dev["Developer Machine"]:::external
        Repo["GitHub Repository"]:::runtime
        GA["GitHub Actions Workflow"]:::tool
        WF[".github/workflows/deploy.yml"]:::tool
        NPM["Node/NPM (npm_ci_run_scripts)"]:::tool
        ESL["ESLint (lint step)"]:::tool
        ESLConf["eslint.config.js"]:::tool
        Vite["Vite Build (vite build)"]:::tool
        ViteConf["vite.config.js"]:::tool
        PKG["package.json"]:::tool
        LOCK["package-lock.json"]:::tool
        Dist["dist/ (build output)"]:::artifact
        Deploy["Deploy to Static Host"]:::tool

        Dev -->|"git_push"| Repo
        Repo -->|"triggers_on_push"| GA
        GA -->|"runs"| WF
        WF -->|"checkout_install"| NPM
        NPM -.->|"reads"| PKG
        NPM -.->|"uses"| LOCK

        NPM -->|"npm_run_lint"| ESL
        ESL -.->|"config"| ESLConf

        NPM -->|"npm_run_build"| Vite
        Vite -.->|"config"| ViteConf
        Vite -->|"outputs"| Dist
        Dist -->|"published_to"| Deploy
        Deploy -->|"updates"| SH
    end

    %% =========================
    %% Click Events (from component_mapping)
    %% =========================
    click H "https://github.com/amoncada0216/my-portfolio/blob/main/index.html"
    click M "https://github.com/amoncada0216/my-portfolio/blob/main/src/main.jsx"
    click A "https://github.com/amoncada0216/my-portfolio/blob/main/src/App.jsx"
    click CSSG "https://github.com/amoncada0216/my-portfolio/blob/main/src/index.css"
    click PUB "https://github.com/amoncada0216/my-portfolio/tree/main/public/"

    click LDIR "https://github.com/amoncada0216/my-portfolio/tree/main/src/layout/"
    click Hero "https://github.com/amoncada0216/my-portfolio/blob/main/src/layout/Hero.jsx"
    click About "https://github.com/amoncada0216/my-portfolio/blob/main/src/layout/About.jsx"
    click Projects "https://github.com/amoncada0216/my-portfolio/blob/main/src/layout/Projects.jsx"
    click Skills "https://github.com/amoncada0216/my-portfolio/blob/main/src/layout/Skills.jsx"
    click FAQ "https://github.com/amoncada0216/my-portfolio/blob/main/src/layout/FAQ.jsx"
    click Contact "https://github.com/amoncada0216/my-portfolio/blob/main/src/layout/Contact.jsx"

    click CDIR "https://github.com/amoncada0216/my-portfolio/tree/main/src/components/"
    click Nav "https://github.com/amoncada0216/my-portfolio/blob/main/src/components/Navbar.jsx"
    click Car "https://github.com/amoncada0216/my-portfolio/blob/main/src/components/Carousel.jsx"
    click CarCSS "https://github.com/amoncada0216/my-portfolio/blob/main/src/components/Carousel.css"
    click Part "https://github.com/amoncada0216/my-portfolio/blob/main/src/components/Particles.jsx"
    click Theme "https://github.com/amoncada0216/my-portfolio/blob/main/src/components/ThemeButton.jsx"
    click AB "https://github.com/amoncada0216/my-portfolio/blob/main/src/components/AnimatedBorder.jsx"
    click WAI "https://github.com/amoncada0216/my-portfolio/blob/main/src/components/WhatsappIcon.jsx"

    click ViteConf "https://github.com/amoncada0216/my-portfolio/blob/main/vite.config.js"
    click WF "https://github.com/amoncada0216/my-portfolio/blob/main/.github/workflows/deploy.yml"
    click PKG "https://github.com/amoncada0216/my-portfolio/blob/main/package.json"
    click LOCK "https://github.com/amoncada0216/my-portfolio/blob/main/package-lock.json"
    click ESLConf "https://github.com/amoncada0216/my-portfolio/blob/main/eslint.config.js"

    %% =========================
    %% Styles
    %% =========================
    classDef runtime fill:#1f6feb,stroke:#0b2f6b,color:#ffffff,stroke-width:1px
    classDef module fill:#2ea043,stroke:#14532d,color:#ffffff,stroke-width:1px
    classDef section fill:#238636,stroke:#14532d,color:#ffffff,stroke-width:1px
    classDef component fill:#3fb950,stroke:#14532d,color:#0b1f12,stroke-width:1px
    classDef asset fill:#9ca3af,stroke:#374151,color:#111827,stroke-width:1px
    classDef dir fill:#6b7280,stroke:#374151,color:#ffffff,stroke-width:1px
    classDef tool fill:#f59e0b,stroke:#92400e,color:#111827,stroke-width:1px
    classDef artifact fill:#fbbf24,stroke:#92400e,color:#111827,stroke-width:1px
    classDef external fill:#a855f7,stroke:#581c87,color:#ffffff,stroke-width:1px
    classDef state fill:#06b6d4,stroke:#155e75,color:#062b33,stroke-width:1px
    classDef note fill:#111827,stroke:#6b7280,color:#ffffff,stroke-dasharray: 4 3,stroke-width:1px
```
