# sarangsalame/portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a single‑page application (SPA) built with React, bootstrapped via Create React App.
- Purpose: a personal portfolio website, purely front‑end, composed of reusable UI components, served as static assets (HTML, JS, CSS, PDF resume).

##### File structure
- Top‑level:
- public/
– index.html (entry point for the SPA)
– static assets folder (favicon, logo, etc.)
- src/
– index.js (React DOM render)
– App.jsx & App.css (root component)
– assets/ (PDF resume)
– components/ (feature folders: header, nav, about, experience, service, portfolio, testimonials, contact, footer)
- No backend folder or API layer; all logic lives in React components.
- Configuration and build handled by CRA’s hidden Webpack/Babel setup; manifests in package.json scripts.

##### README
- Confirms it’s Create React App, describes dev scripts (`npm start`, `npm run build`, etc.), and notes the live demo URL.
- No mention of external services or backend dependencies.

a. Main components
- User (browser)
- Static Hosting (Netlify or similar)
- public/index.html
- Bundled JavaScript & CSS (build artifacts)
- React Runtime
- Component Hierarchy:
- App
· Header (with CTA & Socials)
· Navbar
· About
· Experience
· Services
· Portfolio
· Testimonials
· Contact
· Footer
- Static Assets (resume.pdf, images)

b. Relationships & interactions
- User → Browser → fetch( index.html )
- index.html → loads bundle.js & styles → initializes React Runtime
- React Runtime → renders <App/> → composes child components
- Components may read local assets via import
- No external API calls or backends in this project scope

c. Architectural patterns & principles
- Component‑based architecture (separation of concerns)
- Single directional data flow (parent → child via props)
- Static asset deployment (CDN/Netlify hosting)
- Webpack bundling & code minification for production

d. Key technologies
- React (functional components, JSX)
- Create React App (Webpack, Babel)
- CSS modules via plain .css files
- Netlify (or any static file host)
- PDF resume asset

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Build & Deploy"
        direction TB
        Bld["npm run build"]:::pipeline
        BuildDir["build/"]:::pipeline
        Bld --> BuildDir
        BuildDir -->|"deploy"| Host
    end

    Host["Static Host (Netlify)"]:::hosting
    Host -->|"serves index.html"| HTML["Index.html"]:::runtime
    Host -->|"serves bundle.js & styles.css"| Bundle["Bundle.js / styles.css"]:::runtime

    Browser["User Browser"]:::external
    HTML --> Browser
    Bundle --> Browser
    Browser --> ReactRT["React Runtime"]:::runtime

    ReactRT --> App["App Component"]:::runtime

    subgraph "UI Components"
        direction TB
        Header["Header"]:::ui
        Navbar["Navbar"]:::ui
        About["About"]:::ui
        Experience["Experience"]:::ui
        Services["Services"]:::ui
        Portfolio["Portfolio"]:::ui
        Testimonials["Testimonials"]:::ui
        Contact["Contact"]:::ui
        Footer["Footer"]:::ui
    end

    App --> Header
    App --> Navbar
    App --> About
    App --> Experience
    App --> Services
    App --> Portfolio
    App --> Testimonials
    App --> Contact
    App --> Footer

    Assets["Static Assets (resume.pdf, images)"]:::assets
    Header -->|"loads"| Assets
    About -->|"loads"| Assets
    Portfolio -->|"loads"| Assets
    Contact -->|"loads"| Assets

    %% Click Events
    click HTML "https://github.com/sarangsalame/portfolio/blob/main/public/index.html"
    click ReactRT "https://github.com/sarangsalame/portfolio/blob/main/src/index.js"
    click App "https://github.com/sarangsalame/portfolio/blob/main/src/App.jsx"
    click Header "https://github.com/sarangsalame/portfolio/blob/main/src/components/header/Header.jsx"
    click Navbar "https://github.com/sarangsalame/portfolio/blob/main/src/components/nav/Navbar.jsx"
    click About "https://github.com/sarangsalame/portfolio/blob/main/src/components/about/About.jsx"
    click Experience "https://github.com/sarangsalame/portfolio/blob/main/src/components/experience/Experience.jsx"
    click Services "https://github.com/sarangsalame/portfolio/blob/main/src/components/service/Service.jsx"
    click Portfolio "https://github.com/sarangsalame/portfolio/blob/main/src/components/portfolio/Protfolio.jsx"
    click Testimonials "https://github.com/sarangsalame/portfolio/blob/main/src/components/testimonials/Testimonials.jsx"
    click Contact "https://github.com/sarangsalame/portfolio/blob/main/src/components/contact/Contact.jsx"
    click Footer "https://github.com/sarangsalame/portfolio/blob/main/src/components/footer/Footer.jsx"
    click Bld "https://github.com/sarangsalame/portfolio/blob/main/package.json"
    click Assets "https://github.com/sarangsalame/portfolio/blob/main/src/assets/sarangresume.pdf"

    %% Styles
    classDef pipeline fill:#E0B3FF,stroke:#A080C0
    classDef hosting fill:#DDDDDD,stroke:#BBBBBB
    classDef runtime fill:#B3D1FF,stroke:#80AEE6
    classDef ui fill:#C3FFC3,stroke:#8EDC8E
    classDef assets fill:#FFD9B3,stroke:#E6B287
    classDef external fill:#FFFFFF,stroke:#CCCCCC,stroke-dasharray: 5 5
```
