# komali2002/portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- This is a single-page, React-based portfolio website (frontend only) created with Create React App.
- There is no backend service in the code tree—static assets (HTML, CSS, JS) are bundled and served to the browser.
- Purpose: showcase projects, skills, resume, and personal information via a modern SPA.

##### File Structure Analysis
- Top-level:
- package.json / package-lock.json (npm dependencies, build scripts)
- public/ (static index.html, manifest, robots.txt)
- src/ (all React source code)
- src/ contains:
- Assets (images, project screenshots)
- components/ (About, Home, Projects, Resume, Skills, Navbar, Footer, Particle effects, utilities)
- App.js (root React component)
- index.js (application entry point mounting <App />)
- CSS files for styling and reportWebVitals.js for performance measuring
- No backend folder (e.g. “api”, “server”)—this is purely frontend.

##### README Insights
- README is empty, so no additional architectural notes. We infer build and deploy is handled by standard CRA scripts.

a. Main Components
- Browser (Chrome, Firefox, etc.)
- CDN or Static Host (Netlify, GitHub Pages, S3 + CloudFront)
- index.html (entry HTML)
- React App (JavaScript bundle)
– App (root)
– Navbar, Footer, ScrollToTop (layout components)
– Pages: Home, About, Projects, Resume, Skills
– Particle/Pre (visual effects)
- Assets (images loaded by React components)
- Build Pipeline (npm scripts, webpack/babel via CRA)
b. Relationships and Interactions
- User → Browser: enters URL
- Browser → CDN/Static Host: requests index.html, CSS, JS bundles, images
- index.html bootstraps React in the browser
- React Router (inside App) switches between page components
- Components fetch images from Assets folder via relative imports
c. Architectural Patterns / Principles
- Single-Page Application (SPA)
- Component-based UI (React)
- Separation of concerns: layout vs. pages vs. assets
- Build step transforms JSX and ES6+ into browser-compatible JavaScript
d. Key Technologies
- React, ReactDOM
- Create React App (webpack, Babel)
- CSS Modules / global CSS
- react-particles-js or similar for Particle component
- Static hosting (GitHub Pages / Netlify)

##### Detail Without Overthinking
- Every top-level React component category.
- Asset types (CSS, images, JS).
- Caching/hosting layer even if it’s just GitHub Pages.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Infrastructure
    Pipeline["Build Pipeline\n(package.json)"]:::infra
    Lockfile["package-lock.json"]:::infra
    Pipeline -->|builds static files| Artifacts["Static Artifacts"]:::infra
    Artifacts --> StaticHost["Static Host/CDN"]:::infra

    %% User and Browser
    User["User"]:::runtime
    Browser["Browser"]:::runtime

    User -->|"enters URL"| Browser
    Browser -->|"GET /index.html"| StaticHost
    StaticHost -->|"serves index.html, bundle.js, CSS, images"| Browser

    %% Entry and App Bundle
    indexHTML["index.html"]:::runtime
    Browser -->|"loads"| indexHTML
    indexJS["index.js"]:::runtime
    AppJS["App.js"]:::runtime
    indexHTML -->|"bootstraps React"| indexJS
    indexJS --> AppBundle["App Bundle"]:::runtime
    AppJS --> AppBundle

    %% React App Structure
    AppBundle --> App["App (root component)"]:::runtime

    subgraph "Layout Components"
        Navbar["Navbar"]:::runtime
        Footer["Footer"]:::runtime
        ScrollTop["ScrollToTop"]:::runtime
        ParticleBG["Particle"]:::runtime
        Preloader["Pre"]:::runtime
    end

    App --> Navbar
    App --> Footer
    App --> ScrollTop
    App --> ParticleBG
    App --> Preloader

    subgraph "Page Components"
        Home["Home"]:::runtime
        Home2["Home2"]:::runtime
        TypeComp["Type"]:::runtime
        About["About"]:::runtime
        AboutCard["AboutCard"]:::runtime
        Techstack["Techstack"]:::runtime
        Toolstack["Toolstack"]:::runtime
        Projects["Projects"]:::runtime
        ProjectCards["ProjectCards"]:::runtime
        ResumeComp["ResumeNew"]:::runtime
        SkillsComp["Skills"]:::runtime
    end

    App -->|"React Router"| Home
    Home --> Home2
    Home --> TypeComp
    App --> About
    About --> AboutCard
    About --> Techstack
    About --> Toolstack
    App --> Projects
    Projects --> ProjectCards
    App --> ResumeComp
    App --> SkillsComp

    %% Assets and Styles
    subgraph "Assets & Styles"
        AssetsDir["Assets Folder"]:::asset
        ImagesDir["Images Folder"]:::asset
        AppCSS["App.css"]:::asset
        IndexCSS["index.css"]:::asset
        StyleCSS["style.css"]:::asset
    end

    AppBundle --> AppCSS
    AppBundle --> IndexCSS
    AppBundle --> StyleCSS
    Home --> AssetsDir
    About --> AssetsDir
    Projects --> AssetsDir
    SkillsComp --> AssetsDir

    %% Dependencies
    AppBundle --> reportWebVitals["reportWebVitals.js"]:::asset
    AppBundle --> setupTests["setupTests.js"]:::asset
    AppBundle --> AppTest["App.test.js"]:::asset

    %% Click Events
    click indexHTML "https://github.com/komali2002/portfolio/blob/main/public/index.html"
    click manifest "https://github.com/komali2002/portfolio/blob/main/public/manifest.json"
    click robots "https://github.com/komali2002/portfolio/blob/main/public/robots.txt"
    click Pipeline "https://github.com/komali2002/portfolio/blob/main/package.json"
    click Lockfile "https://github.com/komali2002/portfolio/blob/main/package-lock.json"
    click indexJS "https://github.com/komali2002/portfolio/blob/main/src/index.js"
    click AppJS "https://github.com/komali2002/portfolio/blob/main/src/App.js"
    click AppCSS "https://github.com/komali2002/portfolio/blob/main/src/App.css"
    click IndexCSS "https://github.com/komali2002/portfolio/blob/main/src/index.css"
    click StyleCSS "https://github.com/komali2002/portfolio/blob/main/src/style.css"
    click reportWebVitals "https://github.com/komali2002/portfolio/blob/main/src/reportWebVitals.js"
    click setupTests "https://github.com/komali2002/portfolio/blob/main/src/setupTests.js"
    click AppTest "https://github.com/komali2002/portfolio/blob/main/src/App.test.js"
    click AssetsDir "https://github.com/komali2002/portfolio/tree/main/src/Assets"
    click ImagesDir "https://github.com/komali2002/portfolio/tree/main/Images"
    click Navbar "https://github.com/komali2002/portfolio/blob/main/src/components/Navbar.js"
    click Footer "https://github.com/komali2002/portfolio/blob/main/src/components/Footer.js"
    click ScrollTop "https://github.com/komali2002/portfolio/blob/main/src/components/ScrollToTop.js"
    click ParticleBG "https://github.com/komali2002/portfolio/blob/main/src/components/Particle.js"
    click Preloader "https://github.com/komali2002/portfolio/blob/main/src/components/Pre.js"
    click Home "https://github.com/komali2002/portfolio/blob/main/src/components/Home/Home.js"
    click Home2 "https://github.com/komali2002/portfolio/blob/main/src/components/Home/Home2.js"
    click TypeComp "https://github.com/komali2002/portfolio/blob/main/src/components/Home/Type.js"
    click About "https://github.com/komali2002/portfolio/blob/main/src/components/About/About.js"
    click AboutCard "https://github.com/komali2002/portfolio/blob/main/src/components/About/AboutCard.js"
    click Techstack "https://github.com/komali2002/portfolio/blob/main/src/components/About/Techstack.js"
    click Toolstack "https://github.com/komali2002/portfolio/blob/main/src/components/About/Toolstack.js"
    click Projects "https://github.com/komali2002/portfolio/blob/main/src/components/Projects/Projects.js"
    click ProjectCards "https://github.com/komali2002/portfolio/blob/main/src/components/Projects/ProjectCards.js"
    click ResumeComp "https://github.com/komali2002/portfolio/blob/main/src/components/Resume/ResumeNew.js"
    click SkillsComp "https://github.com/komali2002/portfolio/blob/main/src/components/Skills/Skills.js"

    %% Styles
    classDef infra fill:#90EE90,stroke:#333,stroke-width:1px
    classDef runtime fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef asset fill:#D3D3D3,stroke:#333,stroke-width:1px
```
