# jamal474/portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- This is a single‐page portfolio website built with React (JSX/CSS) and Vite, deployed as a static site on Netlify.
- Its purpose is to showcase projects, experience, education, and generate SEO/schema data (see `SEO.jsx`, `WebsiteSchema.jsx`, `PersonSchema.jsx`, `SitemapRoute.jsx`).

##### File Structure Analysis
- Top level:
- `index.html`, `netlify.toml` → static host entry point and Netlify config
- `package.json`, `vite.config.js` → dependencies and build setup
- `public/` → static assets (Google verification HTML, sitemap.xml) served as‐is
- `src/` → application source
- `assets/` → images, data JSON, fonts (custom typography)
- `components/` → reusable React components (company cards, project cards, ML component, etc.)
- `pages/` → high‐level views (Header, Footer, Main sections, SEO/schema wrappers)
- `style/` → component/page‐specific CSS
- `utils.js` → shared helper functions
- `App.jsx`, `index.jsx` → SPA root and ReactDOM bootstrap

##### Key Technologies and Patterns
- React SPA using Vite for fast build/dev server
- Component‐based UI (atomic components in `components/` and `pages/`)
- Static hosting on Netlify (continuous deploy via `netlify.toml` hook)
- SEO and schema generation routes (dynamic React routes to output JSON‐LD and sitemap)

##### Main Components and Their Relationships
- Developer Workstation
– Source files (`src/`) → Vite dev server & HMR → Browser
- Build Pipeline
– Vite build → bundles JS/CSS, copies `public/` → `/dist`
- Hosting & CDN
– Netlify picks up `/dist` → serves HTML, static assets via CDN
- Client Browser
– Requests `index.html` → loads JS/CSS bundles → React router renders `pages/`
– Fetches JSON data from bundled `experienceData.json`, `projectData.json` for dynamic content

##### Architectural Patterns and Design Principles
- SPA with client‐side routing (React Router implied by `SitemapRoute.jsx`)
- Separation of concerns:
– Presentation (JSX in `components/`),
– Styling (`style/`),
– Data (`assets/data/`),
– Configuration (`vite.config.js`, `netlify.toml`)
- Static hosting model: build–>deploy–>serve

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Setup (Blue)
    subgraph "Developer Workstation" 
        direction TB
        IDE["IDE & Git"]:::dev
        ViteDev["Vite Dev Server (HMR)"]:::dev
    end

    IDE -->|"runs dev"| ViteDev
    ViteDev -->|"serves SPA"| Browser

    %% Build & Deploy (Blue & Green)
    subgraph "Build & Deploy Pipeline"
        direction TB
        ViteBuild["Vite Build Step"]:::dev
        StaticHostEntry["index.html"]:::dev
        ViteConfig["vite.config.js"]:::dev
        PublicAssets["public/"]:::dev
        SitemapFile["public/sitemap.xml"]:::dev
        Bundle["dist (JS/CSS Bundles)"]:::dev
        NetlifyCI["Netlify CI/CD"]:::hosting
        CDN["Netlify CDN"]:::hosting
    end

    ViteDev -->|"build"| ViteBuild
    ViteBuild --> StaticHostEntry
    ViteBuild --> ViteConfig
    ViteBuild --> PublicAssets
    ViteBuild --> SitemapFile
    ViteBuild --> Bundle
    Bundle --> NetlifyCI
    NetlifyCI --> CDN

    %% Client Browser (Orange)
    subgraph "Client Browser" 
        direction TB
        Browser["Web Browser"]:::client
        ReactApp["SPA Root"]:::client
        Router["Client‐side Router"]:::client
        subgraph "App Shell"
            direction TB
            AppShell["App.jsx"]:::client
            Header["Header.jsx"]:::client
            Footer["Footer.jsx"]:::client
        end
        subgraph "Pages"
            direction TB
            MainPage["Main.jsx"]:::client
            ExperiencePage["Experience.jsx"]:::client
            EducationPage["Education.jsx"]:::client
            SkillsPage["Skills.jsx"]:::client
            ProjectPage["Project.jsx"]:::client
            TestPage["Test.jsx"]:::client
        end
        subgraph "SEO & Schema"
            direction TB
            SEOWrapper["SEO.jsx"]:::client
            WebsiteSchema["WebsiteSchema.jsx"]:::client
            PersonSchema["PersonSchema.jsx"]:::client
            SitemapRoute["SitemapRoute.jsx"]:::client
        end
        subgraph "Components"
            direction TB
            CompanyCard["Company.jsx"]:::client
            ProjectCard["ProjectCard.jsx"]:::client
            MLComp["ML.jsx"]:::client
            WebDComp["WebD.jsx"]:::client
        end
        subgraph "Data & Assets"
            direction TB
            ExperienceData["experienceData.json"]:::data
            ProjectData["projectData.json"]:::data
            Fonts["fonts/"]:::data
            Images["images/"]:::data
            Utils["utils.js"]:::dev
            StylesGlobal["index.css<br>App.css"]:::client
            StylesModule["src/style/"]:::client
        end
    end

    CDN -->|"serves HTML/JS/CSS"| Browser
    Browser --> ReactApp
    ReactApp --> Router
    Router --> AppShell
    AppShell --> Header
    AppShell --> Footer
    AppShell --> Pages
    Pages --> MainPage
    Pages --> ExperiencePage
    Pages --> EducationPage
    Pages --> SkillsPage
    Pages --> ProjectPage
    Pages --> TestPage
    AppShell --> SEOWrapper
    SEOWrapper --> WebsiteSchema
    SEOWrapper --> PersonSchema
    SEOWrapper --> SitemapRoute
    Pages --> Components
    ExperiencePage --> ExperienceData
    ProjectPage --> ProjectData
    ReactApp --> Utils
    ReactApp --> StylesGlobal
    ReactApp --> StylesModule
    ReactApp --> Fonts
    ReactApp --> Images

    %% Click Events
    click IDE "https://github.com/jamal474/portfolio/blob/master/README.md"
    click ViteDev "https://github.com/jamal474/portfolio/blob/master/src/index.jsx"
    click ViteBuild "https://github.com/jamal474/portfolio/blob/master/vite.config.js"
    click StaticHostEntry "https://github.com/jamal474/portfolio/blob/master/index.html"
    click PublicAssets "https://github.com/jamal474/portfolio/tree/master/public/"
    click SitemapFile "https://github.com/jamal474/portfolio/blob/master/public/sitemap.xml"
    click NetlifyCI "https://github.com/jamal474/portfolio/blob/master/netlify.toml"
    click ReactApp "https://github.com/jamal474/portfolio/blob/master/src/index.jsx"
    click AppShell "https://github.com/jamal474/portfolio/blob/master/src/App.jsx"
    click Header "https://github.com/jamal474/portfolio/blob/master/src/pages/Header.jsx"
    click Footer "https://github.com/jamal474/portfolio/blob/master/src/pages/Footer.jsx"
    click MainPage "https://github.com/jamal474/portfolio/blob/master/src/pages/Main.jsx"
    click ExperiencePage "https://github.com/jamal474/portfolio/blob/master/src/pages/Experience.jsx"
    click EducationPage "https://github.com/jamal474/portfolio/blob/master/src/pages/Education.jsx"
    click SkillsPage "https://github.com/jamal474/portfolio/blob/master/src/pages/Skills.jsx"
    click ProjectPage "https://github.com/jamal474/portfolio/blob/master/src/pages/Project.jsx"
    click TestPage "https://github.com/jamal474/portfolio/blob/master/src/pages/Test.jsx"
    click SEOWrapper "https://github.com/jamal474/portfolio/blob/master/src/pages/SEO.jsx"
    click WebsiteSchema "https://github.com/jamal474/portfolio/blob/master/src/pages/WebsiteSchema.jsx"
    click PersonSchema "https://github.com/jamal474/portfolio/blob/master/src/pages/PersonSchema.jsx"
    click SitemapRoute "https://github.com/jamal474/portfolio/blob/master/src/pages/SitemapRoute.jsx"
    click CompanyCard "https://github.com/jamal474/portfolio/blob/master/src/components/Company.jsx"
    click ProjectCard "https://github.com/jamal474/portfolio/blob/master/src/components/ProjectCard.jsx"
    click MLComp "https://github.com/jamal474/portfolio/blob/master/src/components/ML.jsx"
    click WebDComp "https://github.com/jamal474/portfolio/blob/master/src/components/WebD.jsx"
    click ExperienceData "https://github.com/jamal474/portfolio/blob/master/src/assets/data/experienceData.json"
    click ProjectData "https://github.com/jamal474/portfolio/blob/master/src/assets/data/projectData.json"
    click Utils "https://github.com/jamal474/portfolio/blob/master/src/utils.js"
    click StylesGlobal "https://github.com/jamal474/portfolio/blob/master/src/index.css"
    click StylesModule "https://github.com/jamal474/portfolio/tree/master/src/style/"

    %% Styles
    classDef dev fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef hosting fill:#90EE90,stroke:#000,stroke-width:1px
    classDef client fill:#FFA500,stroke:#000,stroke-width:1px
    classDef data fill:#FFD700,stroke:#000,stroke-width:1px
```
