# pranshuverma601/my-protfolio architecture

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

- Interactive diagram: https://gitdiagram.com/pranshuverma601/my-protfolio
- Repository: https://github.com/pranshuverma601/my-protfolio

## Overview

##### Project type and purpose
- This is a front-end single-page application (SPA) built with React and Vite.
- It’s a minimal template/portfolio-style site: static HTML/CSS/JS delivered to the browser, no backend or API layer.

##### File structure
- Top level:
- package.json, vite.config.js — npm scripts & Vite build/dev config
- index.html, public/ — static entry point & public assets
- src/ — application source
- src:
- main.jsx + index.css — React entrypoint + global styles
- App.jsx + App.css — root component
- Components/ — feature components (Navbar, Hero, About, Services, MyWork, Contact, Footer), each with its own .jsx + .css
- assets/ — local data modules (mywork_data.js, services_data.js)
- No server or database directories ⇒ purely client-side.

##### Insights from the README
- Uses Vite for dev server and bundling.
- Supports Fast Refresh via @vitejs/plugin-react (Babel) or plugin-react-swc.
- ESLint rules in eslint.config.js.

a. Main components:
- Developer Workstation
- Source Code (src/, public/, config files)
- Vite Dev Server (with HMR plugin)
- Build Process (Vite bundler → dist/)
- Static Hosting / CDN
- Browser Client
b. Relationships & interactions:
- Developer edits source → Vite Dev Server picks up changes → HMR pushes updates to Browser
- On production build: Vite bundles & outputs to dist/ → static assets are deployed to Hosting/CDN → Browser fetches HTML/CSS/JS
- Components inside React interact locally (Navbar dispatches events, Hero loads asset data, etc.), but these are internal to the Browser runtime.
c. Architectural patterns & design principles:
- Component-based UI (React)
- Modular CSS per component
- Single entry point (index.html → main.jsx)
- Development vs. production workflows separated by Vite
d. Technologies & frameworks:
- React (UI library)
- Vite (dev server + bundler)
- @vitejs/plugin-react or plugin-react-swc (Fast Refresh)
- ESLint for linting
- npm/Yarn for dependency management

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Top-level entities
    DW["Developer Workstation"]:::dev
    SC["Source Code"]:::code
    VDS["Vite Dev Server"]:::dev
    BP["Build Process"]:::build
    SH["Static Hosting/CDN"]:::build
    BC["Browser Client"]:::runtime

    %% Flows
    DW -->|"edit code"| SC
    SC -->|"run dev"| VDS
    VDS -->|"HMR update"| BC
    SC -->|"run build"| BP
    BP -->|"deploy dist/ to CDN"| SH
    SH -->|"HTTP GET index.html"| BC

    %% Source Code structure
    subgraph "Source Code"
        pkg["package.json"]:::code
        vitecfg["vite.config.js"]:::code
        eslintcfg["eslint.config.js"]:::code
        indexhtml["index.html"]:::code
        publicDir["public/"]:::code
        srcroot["src/"]:::code
    end

    pkg --> vitecfg
    vitecfg --> eslintcfg
    indexhtml --> publicDir
    publicDir --> srcroot

    subgraph "src/"
        mainjs["main.jsx"]:::code
        indexcss["index.css"]:::code
        appjsx["App.jsx"]:::code
        appcss["App.css"]:::code

        subgraph "Components/"
            subgraph "Navbar"
                navjsx["Navbar.jsx"]:::code
                navcss["Navbar.css"]:::code
            end
            subgraph "Hero"
                herojx["Hero.jsx"]:::code
                herocss["Hero.css"]:::code
            end
            subgraph "About"
                aboutjsx["About.jsx"]:::code
                aboutcss["About.css"]:::code
            end
            subgraph "Services"
                servicesjsx["Services.jsx"]:::code
                servicescss["Services.css"]:::code
            end
            subgraph "MyWork"
                myworkjsx["MyWork.jsx"]:::code
                myworkcss["MyWork.css"]:::code
            end
            subgraph "Contact"
                contactjsx["Contact.jsx"]:::code
                contactcss["Contact.css"]:::code
            end
            subgraph "Footer"
                footerjsx["Footer.jsx"]:::code
                footercss["Footer.css"]:::code
            end
        end

        subgraph "assets/"
            myworkdata["mywork_data.js"]:::code
            servicesdata["services_data.js"]:::code
        end
    end

    srcroot --> mainjs
    srcroot --> indexcss
    mainjs --> appjsx
    appjsx --> appcss
    appjsx --> navjsx
    navjsx --> navcss
    appjsx --> herojx
    herojx --> herocss
    appjsx --> aboutjsx
    aboutjsx --> aboutcss
    appjsx --> servicesjsx
    servicesjsx --> servicescss
    appjsx --> myworkjsx
    myworkjsx --> myworkcss
    appjsx --> contactjsx
    contactjsx --> contactcss
    appjsx --> footerjsx
    footerjsx --> footercss
    appjsx --> myworkdata
    appjsx --> servicesdata

    %% Browser Client runtime
    subgraph "Browser Client"
        subgraph "React Application Runtime"
            RApp["React App"]:::runtime
            RApp -->|"renders"| Navbar["Navbar"]:::runtime
            RApp -->|"renders"| Hero["Hero"]:::runtime
            RApp -->|"renders"| About["About"]:::runtime
            RApp -->|"renders"| Services["Services"]:::runtime
            RApp -->|"renders"| MyWork["MyWork"]:::runtime
            RApp -->|"renders"| Contact["Contact"]:::runtime
            RApp -->|"renders"| Footer["Footer"]:::runtime
        end
    end

    %% Click Events
    click vitecfg "https://github.com/pranshuverma601/my-protfolio/blob/main/vite.config.js"
    click eslintcfg "https://github.com/pranshuverma601/my-protfolio/blob/main/eslint.config.js"
    click pkg "https://github.com/pranshuverma601/my-protfolio/blob/main/package.json"
    click indexhtml "https://github.com/pranshuverma601/my-protfolio/blob/main/index.html"
    click publicDir "https://github.com/pranshuverma601/my-protfolio/tree/main/public/"
    click srcroot "https://github.com/pranshuverma601/my-protfolio/tree/main/src/"
    click mainjs "https://github.com/pranshuverma601/my-protfolio/blob/main/src/main.jsx"
    click indexcss "https://github.com/pranshuverma601/my-protfolio/blob/main/src/index.css"
    click appjsx "https://github.com/pranshuverma601/my-protfolio/blob/main/src/App.jsx"
    click appcss "https://github.com/pranshuverma601/my-protfolio/blob/main/src/App.css"
    click navjsx "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/Navbar/Navbar.jsx"
    click navcss "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/Navbar/Navbar.css"
    click herojx "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/Hero/Hero.jsx"
    click herocss "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/Hero/Hero.css"
    click aboutjsx "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/About/About.jsx"
    click aboutcss "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/About/About.css"
    click servicesjsx "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/Services/Services.jsx"
    click servicescss "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/Services/Services.css"
    click myworkjsx "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/MyWork/MyWork.jsx"
    click myworkcss "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/MyWork/MyWork.css"
    click contactjsx "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/Contact/Contact.jsx"
    click contactcss "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/Contact/Contact.css"
    click footerjsx "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/Footer/Footer.jsx"
    click footercss "https://github.com/pranshuverma601/my-protfolio/blob/main/src/Components/Footer/Footer.css"
    click myworkdata "https://github.com/pranshuverma601/my-protfolio/blob/main/src/assets/mywork_data.js"
    click servicesdata "https://github.com/pranshuverma601/my-protfolio/blob/main/src/assets/services_data.js"

    %% Styles
    classDef dev fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef code fill:#90EE90,stroke:#333,stroke-width:1px
    classDef build fill:#FFA500,stroke:#333,stroke-width:1px
    classDef runtime fill:#FFFFE0,stroke:#333,stroke-width:1px
```
