# adarshkumar76/portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- This is a single-page portfolio website built with React.
- It’s a static front-end application (no custom backend), hosted on a CDN or GitHub Pages, showcasing your skills, projects, and GitHub stats (via third-party image APIs).

##### File Structure
- Top-level files: package.json (build & dependencies), public/ (static assets: index.html, resume PDF, manifest).
- src/ contains:
- App.js + index.js (root of React app)
- Component/ (reusable UI pieces: Header, Footer, AboutMain, ContactMain, etc.)
- Screens/ (page-level components tied to routes: Home, About, Projects, Services, Contact, Login/Signup, NoPage)
- setupTests.js, reportWebVitals.js, App.test.js (test & telemetry stubs)

##### README
- Confirms it’s a personal portfolio.
- Lists tech stack (React, JavaScript, CSS, Node for build).
- References external APIs used in the README images for GitHub stats and quotes—these endpoints are called at build time for static images or on the client to load badges.

a. Main Components
- Web Browser (Client)
- React App (SPA)
· Router Layer (react-router)
· Page Components (Screens)
· Reusable UI Components (Component/)
- Static Asset Server / CDN (serves index.html, JS bundle, CSS, Resume.pdf)
- External Image APIs (GitHub Stats, Dev Quotes, GitHub Trophies services)
b. Relationships & Data Flow
- Browser requests index.html → served by CDN
- index.html loads JS bundle → initializes React App
- React Router maps URL to Screen component → Screen renders UI Components
- Certain components embed <img> tags pointing at external APIs → browser fetches those at runtime
c. Architectural Patterns
- SPA pattern with client-side routing
- Component-based design (separation of concerns)
- Static asset hosting + CDN
d. Key Technologies
- React, React Router, Node.js (build)
- CSS modules (.css per component)
- Third-party image badge APIs

## Diagram (Mermaid)

```mermaid
graph TB
    %% Client Browser
    Browser["Web Browser"]:::client

    %% CDN / Static Asset Server
    CDN["CDN / Static Asset Server"]:::cdn

    %% React Application
    subgraph "React App (SPA)"
        ReactAppCore["Entry Point\n(src/index.js)"]:::client
        Router["Router Layer\n(src/App.js)"]:::client
    end

    %% Pages / Screens
    subgraph "Pages (src/Screens)" 
        Home["Home\n(src/Screens/Home.jsx)"]:::client
        About["About\n(src/Screens/About.jsx)"]:::client
        Projects["Projects\n(src/Screens/Projects.jsx)"]:::client
        Services["Services\n(src/Screens/Service.jsx)"]:::client
        Contact["Contact\n(src/Screens/ContactMe.jsx)"]:::client
        Login["Login\n(src/Screens/Login.jsx)"]:::client
        Signup["SignUp\n(src/Screens/SignUp.jsx)"]:::client
        NoPage["404 NoPage\n(src/Screens/NoPage.jsx)"]:::client
    end

    %% UI Components
    subgraph "UI Components (src/Component)"
        Header["Header\n(src/Component/Header/Header.jsx)"]:::client
        Footer["Footer\n(src/Component/Footer/Footer.jsx)"]:::client
        MainLayout["Main Layout\n(src/Component/Main/Main.jsx)"]:::client
        AboutMain["About Section\n(src/Component/AboutMain/AboutMain.jsx)"]:::client
        ProjectsMain["Projects Section\n(src/Component/ProjectSections/ProjectsMain.jsx)"]:::client
        ServiceMain["Services Section\n(src/Component/ServiceMain/ServiceMain.jsx)"]:::client
        ContactMain["Contact Section\n(src/Component/ContactMain/ContactMain.jsx)"]:::client
        Work["Work Showcase\n(src/Component/Work/Work.jsx)"]:::client
        Lang["Language Selector\n(src/Component/lang/lang.jsx)"]:::client
        LoginBtn["Login Button\n(src/Component/Login.jsx)"]:::client
        LogoutBtn["Logout Button\n(src/Component/Logout.jsx)"]:::client
    end

    %% Static Assets
    subgraph "Static Assets (public/)" 
        HTML["HTML Shell\n(public/index.html)"]:::cdn
        Resume["Resume PDF\n(public/Resume.pdf)"]:::cdn
        Manifest["Web Manifest\n(public/manifest.json)"]:::cdn
        Robots["Robots Rules\n(public/robots.txt)"]:::cdn
    end

    %% External APIs
    subgraph "External Image APIs" 
        GitHubStats["GitHub Stats API"]:::external
        DevQuotes["Dev Quotes API"]:::external
        GitHubTrophies["GitHub Trophies API"]:::external
    end

    %% Build & Telemetry
    subgraph "Build & Telemetry (src/)"
        SetupTests["Test Setup\n(src/setupTests.js)"]:::client
        WebVitals["Web Vitals\n(src/reportWebVitals.js)"]:::client
        AppTest["App Tests\n(src/App.test.js)"]:::client
    end

    %% Relationships
    Browser -->|request index.html| CDN
    CDN -->|serves HTML/CSS/JS| Browser
    Browser -->|loads bundle| ReactAppCore
    ReactAppCore --> Router
    Router --> Home
    Router --> About
    Router --> Projects
    Router --> Services
    Router --> Contact
    Router --> Login
    Router --> Signup
    Router --> NoPage

    Home --> MainLayout
    About --> AboutMain
    About --> Header
    About --> Footer
    Projects --> ProjectsMain
    Projects --> Work
    Services --> ServiceMain
    Contact --> ContactMain
    AllComponents --> Lang
    AllComponents --> LoginBtn
    AllComponents --> LogoutBtn

    Browser -->|fetch badge images| GitHubStats
    Browser -->|fetch badge images| DevQuotes
    Browser -->|fetch badge images| GitHubTrophies

    %% Click Events
    click ReactAppCore "https://github.com/adarshkumar76/portfolio/blob/main/src/index.js"
    click Router "https://github.com/adarshkumar76/portfolio/blob/main/src/App.js"
    click Home "https://github.com/adarshkumar76/portfolio/blob/main/src/Screens/Home.jsx"
    click About "https://github.com/adarshkumar76/portfolio/blob/main/src/Screens/About.jsx"
    click Projects "https://github.com/adarshkumar76/portfolio/blob/main/src/Screens/Projects.jsx"
    click Services "https://github.com/adarshkumar76/portfolio/blob/main/src/Screens/Service.jsx"
    click Contact "https://github.com/adarshkumar76/portfolio/blob/main/src/Screens/ContactMe.jsx"
    click Login "https://github.com/adarshkumar76/portfolio/blob/main/src/Screens/Login.jsx"
    click Signup "https://github.com/adarshkumar76/portfolio/blob/main/src/Screens/SignUp.jsx"
    click NoPage "https://github.com/adarshkumar76/portfolio/blob/main/src/Screens/NoPage.jsx"
    click Header "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/Header/Header.jsx"
    click Footer "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/Footer/Footer.jsx"
    click MainLayout "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/Main/Main.jsx"
    click AboutMain "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/AboutMain/AboutMain.jsx"
    click ProjectsMain "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/ProjectSections/ProjectsMain.jsx"
    click ServiceMain "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/ServiceMain/ServiceMain.jsx"
    click ContactMain "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/ContactMain/ContactMain.jsx"
    click Work "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/Work/Work.jsx"
    click Lang "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/lang/lang.jsx"
    click LoginBtn "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/Login.jsx"
    click LogoutBtn "https://github.com/adarshkumar76/portfolio/blob/main/src/Component/Logout.jsx"
    click HTML "https://github.com/adarshkumar76/portfolio/blob/main/public/index.html"
    click Resume "https://github.com/adarshkumar76/portfolio/blob/main/public/Resume.pdf"
    click Manifest "https://github.com/adarshkumar76/portfolio/blob/main/public/manifest.json"
    click Robots "https://github.com/adarshkumar76/portfolio/blob/main/public/robots.txt"
    click SetupTests "https://github.com/adarshkumar76/portfolio/blob/main/src/setupTests.js"
    click WebVitals "https://github.com/adarshkumar76/portfolio/blob/main/src/reportWebVitals.js"
    click AppTest "https://github.com/adarshkumar76/portfolio/blob/main/src/App.test.js"

    %% Styles
    classDef client fill:#D0E8FF,stroke:#0366D6,color:#0366D6
    classDef cdn fill:#E0FFD8,stroke:#228B22,color:#228B22
    classDef external fill:#FFE5B4,stroke:#FF8C00,color:#FF8C00
```
