# harwinder33singh/my-portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a single-page React portfolio application built with Vite. Its goal is to present a developer’s personal projects, timeline, and contact info via a modern component-based UI.

##### File structure
- Top-level:
- README.md – project title (“my-portfolio”)
- index.html – SPA entry point
- package.json / package-lock.json – dependencies (React, Vite, etc.)
- vite.config.js / eslint.config.js – build and lint config
- public/ – static assets served as-is (favicon, robots.txt, etc.)
- src/ – application source
- main.jsx – Vite’s client entrypoint that bootstraps React into index.html
- App.jsx + App.css – root component and global styles
- assets/ – images, fonts and other imported media
- components/ – reusable UI pieces (e.g. HomeTimeline)
- pages/ – route-level React components (Home, Contact, Projects), with subfolders per project (MarsField, SeeMe)
- index.css & per-page CSS – styling layers

##### README

a. Main components
- Developer machine / IDE
- Build system: Vite (dev server + production bundler)
- Source code modules (src/main.jsx → App → pages & components & assets)
- Static file host (Netlify, Vercel, GitHub Pages, or any static-site CDN)
- Client (web browser with React Router handling in-app navigation)
b. Relationships and interactions
1. Developer writes code in src/**/*
2. Vite dev server serves index.html + HMR JS bundles → Browser
3. For production, Vite bundles JS/CSS assets → “dist/”
4. Static host serves index.html + bundled assets
5. Client requests index.html, loads main.js, mounts React App
6. React Router within App.jsx intercepts URL changes → renders pages/components
c. Architectural patterns & principles
- Component-based UI (React)
- Single-page application with client-side routing
- Separation of concerns: pages vs. small reusable components vs. global assets
- Dev/Prod pipeline: Vite for fast dev feedback loops + production bundling
d. Key technologies & libraries
- Vite (dev server + Rollup-based bundler)
- React (JSX, component model)
- CSS modules or scoped CSS files per component/page
- (Implicit) React Router or similar for client routing

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build/Dev Layer
    Developer["Developer / IDE"]:::dev
    packageConfig["package.json & package-lock.json"]:::dev
    lintConfig["eslint.config.js"]:::dev
    viteConfig["Vite Build System"]:::dev
    indexHTML["index.html"]:::dev
    readme["README.md"]:::dev

    %% Hosting/Infra Layer
    publicAssets["public/"]:::infra
    staticHost["Static Host (Netlify/Vercel/CDN)"]:::infra

    %% Client/RUNTIME Layer
    Browser["Browser"]:::runtime

    subgraph "React App"
        Router["Router (React Router)"]:::runtime
        subgraph "Pages"
            Home["Home.jsx<br>Home.css"]:::runtime
            ProjectsPage["Projects.jsx<br>Projects.css"]:::runtime
            Contact["Contact.jsx<br>Contact.css"]:::runtime
            subgraph "Projects Sub-Pages"
                MarsField["MarsField.jsx<br>MarsField.css"]:::runtime
                SeeMe["SeeMe.jsx<br>SeeMe.css"]:::runtime
            end
        end
        subgraph "Components"
            HomeTimeline["HomeTimeline.jsx<br>HomeTimeline.css"]:::runtime
        end
        Assets["src/assets/"]:::runtime
    end

    %% Connections
    Developer -->|edits code| packageConfig
    Developer -->|edits code| lintConfig
    Developer -->|edits code| viteConfig
    Developer -->|edits code| indexHTML
    Developer -->|edits code| readme
    Developer -->|edits code| publicAssets

    Developer -->|npm run dev| viteConfig
    viteConfig -->|serves index.html + HMR bundles| Browser
    staticHost -->|serves production bundles| Browser

    Browser -->|URL change| Router
    Router -->|renders| Home
    Router -->|renders| ProjectsPage
    Router -->|renders| Contact
    ProjectsPage -->|loads| MarsField
    ProjectsPage -->|loads| SeeMe
    Router -->|uses| HomeTimeline
    Router -->|loads| Assets

    %% Click Events
    click viteConfig "https://github.com/harwinder33singh/my-portfolio/blob/main/vite.config.js"
    click indexHTML "https://github.com/harwinder33singh/my-portfolio/blob/main/index.html"
    click packageConfig "https://github.com/harwinder33singh/my-portfolio/blob/main/package.json"
    click packageConfig "https://github.com/harwinder33singh/my-portfolio/blob/main/package-lock.json"
    click lintConfig "https://github.com/harwinder33singh/my-portfolio/blob/main/eslint.config.js"
    click publicAssets "https://github.com/harwinder33singh/my-portfolio/tree/main/public/"
    click HomeTimeline "https://github.com/harwinder33singh/my-portfolio/blob/main/src/components/HomeTimeline/HomeTimeline.jsx"
    click HomeTimeline "https://github.com/harwinder33singh/my-portfolio/blob/main/src/components/HomeTimeline/HomeTimeline.css"
    click Home "https://github.com/harwinder33singh/my-portfolio/blob/main/src/pages/Home.jsx"
    click Home "https://github.com/harwinder33singh/my-portfolio/blob/main/src/pages/Home.css"
    click ProjectsPage "https://github.com/harwinder33singh/my-portfolio/blob/main/src/pages/Projects.jsx"
    click ProjectsPage "https://github.com/harwinder33singh/my-portfolio/blob/main/src/pages/Projects.css"
    click Contact "https://github.com/harwinder33singh/my-portfolio/blob/main/src/pages/Contact.jsx"
    click Contact "https://github.com/harwinder33singh/my-portfolio/blob/main/src/pages/Contact.css"
    click MarsField "https://github.com/harwinder33singh/my-portfolio/blob/main/src/pages/Projects/MarsField.jsx"
    click MarsField "https://github.com/harwinder33singh/my-portfolio/blob/main/src/pages/Projects/MarsField.css"
    click SeeMe "https://github.com/harwinder33singh/my-portfolio/blob/main/src/pages/Projects/Seeme.jsx"
    click SeeMe "https://github.com/harwinder33singh/my-portfolio/blob/main/src/pages/Projects/SeeMe.css"
    click Assets "https://github.com/harwinder33singh/my-portfolio/tree/main/src/assets/"

    %% Styles
    classDef dev fill:#ADD8E6,stroke:#000,color:#000
    classDef infra fill:#90EE90,stroke:#000,color:#000
    classDef runtime fill:#FFFFE0,stroke:#000,color:#000
```
