# kalavadiyaharsh/harsh_portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/kalavadiyaharsh/harsh_portfolio
- Repository: https://github.com/kalavadiyaharsh/harsh_portfolio

## Overview

##### Project type and purpose
- This is a single‐page front-end application built with React and Vite. It has no custom backend or database; it serves static assets and JavaScript to the browser. The main purpose is to display a personal or portfolio site (based on component names like Home, Projects, Experience, Contact).

##### File structure
- Top level:
- index.html: SPA shell
- public/: static assets (images, favicons)
- src/: application source
– main.jsx: React entry point
– App.jsx: root application component
– components/: visual/page components
- config files: vite.config.js, tailwind.config.js, postcss.config.js, eslint.config.js
- package.json / package-lock.json: dependencies and scripts

##### README for additional insights
- Confirms use of Vite for bundling, Hot Module Replacement via @vitejs/plugin-react or plugin-react-swc. ESLint is configured. Tailwind CSS is integrated (via postcss.config.js).

a. Main components:
1. Developer environment
- Source code in src/, configuration files, Node.js & npm
- Build tools: Vite bundler, PostCSS, Tailwind, ESLint
2. CI/CD or build pipeline (optional)
- “npm run build” task producing production bundle
3. Static web server / CDN
- Serves index.html, CSS, JS, public assets
4. Browser runtime
- React SPA mounted within index.html
- React Router or internal navigation (if used)
5. UI components
- Navbar, Home, Skills, Experience, Projects, Contact, Eyes/NextEyes, Marquee

b. Relationships and interactions
- Developer edits src → Vite dev server watches files → rebuilds & pushes updates via HMR → browser reloads/patches components
- Build pipeline compiles code with Babel/SWC, applies Tailwind utilities via PostCSS, outputs static files
- Browser requests index.html from server → downloads CSS & JS → React hydrates App in DOM → user navigates between components

c. Architectural patterns and principles
- Component-based UI (React)
- SPA client-side routing (if implemented)
- CSS utility framework (Tailwind)
- Dev/build separation: local Vite dev vs production static hosting

d. Technologies / frameworks
- React (JSX components)
- Vite (bundler, dev server)
- Tailwind CSS + PostCSS
- ESLint (code quality)
- Node.js/npm

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Environment
    subgraph "Developer Environment" 
        direction TB
        DevTools["Node.js & npm"]:::dev
        SrcCode["Source Code (src/)"]:::dev
        ESLint["ESLint Config"]:::dev
        Vite["Vite Config"]:::dev
        PostCSS["PostCSS Config"]:::dev
        Tailwind["Tailwind Config"]:::dev
        PKG["package.json"]:::dev
        PKGLOCK["package-lock.json"]:::dev
        GitIgnore[".gitignore"]:::dev
        Readme["README.md"]:::dev
    end

    DevTools -->|installs deps| PKG
    DevTools -->|installs deps| PKGLOCK
    SrcCode --> ESLint
    SrcCode --> Vite
    SrcCode --> PostCSS
    SrcCode --> Tailwind

    %% Build & Deploy
    Build["Build Pipeline\n(npm run build)"]:::build

    %% Static Hosting
    subgraph "Static Asset Hosting / CDN"
        direction TB
        SPA["index.html"]:::host
        Public["public/"]:::host
    end

    %% Browser Runtime
    subgraph "Browser Runtime" 
        direction TB
        Browser["Web Browser"]:::browser
        subgraph "React App"
            direction TB
            Entry["main.jsx + index.css"]:::browser
            App["App.jsx"]:::browser
            subgraph "UI Components"
                direction TB
                Nav["Navbar"]:::component
                Home["Home"]:::component
                Skills["Skills"]:::component
                Exp["Experience"]:::component
                Projects["Projects"]:::component
                Contact["Contact"]:::component
                Eyes["Eyes"]:::component
                NextEyes["NextEyes"]:::component
                Marquee["Marquee"]:::component
            end
        end
    end

    %% Relationships
    SrcCode -->|HMR Watches Files| Vite
    Vite -->|Serves Dev Bundle| Browser
    Browser -->|Requests| SPA
    Browser -->|Requests| Public
    SPA --> Entry
    Entry --> App
    App --> Nav
    App --> Home
    App --> Skills
    App --> Exp
    App --> Projects
    App --> Contact
    App --> Eyes
    App --> NextEyes
    App --> Marquee

    %% Build flow
    SrcCode -->|npm run build| Build
    Build -->|outputs static files| SPA
    Build -->|outputs static files| Public

    %% Click Events
    click PKG "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/package.json"
    click PKGLOCK "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/package-lock.json"
    click GitIgnore "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/.gitignore"
    click Readme "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/README.md"
    click ESLint "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/eslint.config.js"
    click Vite "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/vite.config.js"
    click PostCSS "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/postcss.config.js"
    click Tailwind "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/tailwind.config.js"
    click SPA "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/index.html"
    click Public "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/public/food-delivery-online.avif"
    click Entry "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/main.jsx"
    click Entry "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/index.css"
    click App "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/App.jsx"
    click Nav "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/components/Navbar.jsx"
    click Home "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/components/Home.jsx"
    click Skills "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/components/Skills.jsx"
    click Exp "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/components/Experience.jsx"
    click Projects "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/components/Projects.jsx"
    click Contact "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/components/Contact.jsx"
    click Eyes "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/components/Eyes.jsx"
    click NextEyes "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/components/NextEyes.jsx"
    click Marquee "https://github.com/kalavadiyaharsh/harsh_portfolio/blob/main/src/components/Marquee.jsx"

    %% Styles
    classDef dev fill:#D6E9F8,stroke:#4A90E2,color:#0B3D91
    classDef build fill:#E8F6E8,stroke:#28A745,color:#19692C
    classDef host fill:#FCF3CF,stroke:#F1C40F,color:#7D6608
    classDef browser fill:#F5EEF8,stroke:#8E44AD,color:#4A235A
    classDef component fill:#FDEDEC,stroke:#E74C3C,color:#78281F
```
