# king-smasher26/portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- This is a single-page portfolio web application built using React (via create-react-app).
- It’s intended to showcase a web developer portfolio and is structured as a set of clearly defined UI sections (Navbar, Intro, Skills, Projects, and Footer).

##### File Structure
- The top-level directories and files include configuration files (package.json, .gitignore), public assets (public folder) including the index.html and other public files (manifest, resume, etc.), and the "src" folder which holds the JavaScript/React code.
- Inside "src", the main entry file is index.js which bootstraps the React app.
- "App.js" in the src folder serves as the central component that composes the page layout by importing and rendering several components like Navbar, Intro, Skills, Projects, and Footer.
- Additionally, there is a separate "CustomHooks" directory containing hooks (e.g., useInView.js) likely used for triggering animations or other dynamic behaviours as elements enter the viewport.
- The "Components" directory holds individual component files that structure the portfolio page.

##### Detailed Elements
▸ App Component (central node).
▸ Child Components: Navbar, Intro, Skills, Projects, Footer.
▸ Custom Hooks: e.g., useInView (linked to the components it influences).
▸ Public Assets: index.html as the start point where the App gets mounted.
▸ The data flow from App to child components.
▸ How custom hooks are used within specific components (if applicable).
▸ The dependencies on external libraries (illustrate their role by connecting them to the UI components that utilize them).
▸ Ensure all nodes are clearly labeled with their names and roles.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Public Assets Subgraph
    subgraph "Public Assets"
        PUBLIC1["index.html (Mounting Point)"]:::public
        PUBLIC2["resume.pdf"]:::public
    end

    %% React Components Subgraph
    subgraph "React Components"
        APP["App Component"]:::component
        NAV["Navbar Component"]:::component
        INT["Intro Component"]:::component
        SKI["Skills Component"]:::component
        PROJ["Projects Component"]:::component
        FOOT["Footer Component"]:::component
    end

    %% External Libraries Subgraph
    subgraph "External Libraries"
        FM["Framer-motion"]:::library
        SC["styled-components"]:::library
        RI["react-icons"]:::library
    end

    %% Custom Hook Node
    HOOK["Custom Hook: useInView"]:::hook

    %% Connections
    PUBLIC1 -->|"mounts"| APP

    APP -->|"renders"| NAV
    APP -->|"renders"| INT
    APP -->|"renders"| SKI
    APP -->|"renders"| PROJ
    APP -->|"renders"| FOOT

    HOOK -->|"used in"| INT
    HOOK -->|"used in"| SKI
    HOOK -->|"used in"| PROJ

    FM -.->|"animates"| INT
    FM -.->|"animates"| SKI
    FM -.->|"animates"| PROJ

    SC -.->|"styles"| NAV
    SC -.->|"styles"| INT
    SC -.->|"styles"| SKI
    SC -.->|"styles"| PROJ
    SC -.->|"styles"| FOOT

    RI -.->|"icons used by"| NAV
    RI -.->|"icons used by"| INT
    RI -.->|"icons used by"| PROJ
    RI -.->|"icons used by"| FOOT

    %% Click Events
    click APP "https://github.com/king-smasher26/portfolio/blob/main/src/App.js"
    click NAV "https://github.com/king-smasher26/portfolio/blob/main/src/Components/Navbar.jsx"
    click INT "https://github.com/king-smasher26/portfolio/blob/main/src/Components/Intro.jsx"
    click SKI "https://github.com/king-smasher26/portfolio/blob/main/src/Components/Skills.jsx"
    click PROJ "https://github.com/king-smasher26/portfolio/blob/main/src/Components/Projects.jsx"
    click FOOT "https://github.com/king-smasher26/portfolio/blob/main/src/Components/Footer.jsx"
    click HOOK "https://github.com/king-smasher26/portfolio/blob/main/src/CustomHooks/useInView.js"
    click PUBLIC1 "https://github.com/king-smasher26/portfolio/blob/main/public/index.html"
    click PUBLIC2 "https://github.com/king-smasher26/portfolio/blob/main/public/resume.pdf"

    %% Styles
    classDef public fill:#E0BBE4,stroke:#5D3A9B,stroke-width:2px;
    classDef component fill:#AEDFF7,stroke:#1D66A3,stroke-width:2px;
    classDef hook fill:#C1F7C5,stroke:#2E8B57,stroke-width:2px;
    classDef library fill:#FFF4B2,stroke:#B8860B,stroke-width:2px;
```
