# ayazsa/my-portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a single-page portfolio website built with React and Vite.
- Purpose: showcase the author’s resume, projects, experience, education, and contact info in a smooth, responsive UI.

##### File structure
- Top-level files & config
– package.json / package-lock.json: dependencies (React, Vite, Tailwind) and scripts (dev, build, serve).
– vite.config.js, postcss.config.js, tailwind.config.js: build tooling & CSS framework setup.
– eslint.config.js: lint rules.
– index.html: root HTML template.

- public/
– Static assets (favicon, AyazResumeFr.pdf).

- src/
– main.jsx: app entry point—mounts React into index.html.
– App.jsx & App.css: top-level layout and global styles.
– routes.js: React Router configuration.
– data/projectList.js: JSON-like list of portfolio projects.
– components/: reusable UI pieces (Header, Footer, HeroSection, AboutSection, ProjectsSection, ModalProjectDetails, ContactSection, AnimatedSection).
– pages/: page-level views (Home, Projects, Experience, Education, Contact).

##### README for additional insights
- Minimal React + Vite template with HMR and ESLint.
- Recommends TypeScript for production—this is currently JavaScript.

a. Main components
1. Client Browser (user interface)
2. Static Asset Server (serves index.html, JS/CSS bundles, PDF)
3. React Application
- Router layer (routes.js)
- Page components (Home, Projects, Experience, Education, Contact)
- Shared components (Header, Footer, sections)
- Data layer (projectList.js)
4. Build Toolchain (Vite + plugins + Tailwind + PostCSS + ESLint)

b. Relationships & interactions
– Browser requests index.html → Vite dev server or static host → serves JS/CSS.
– React Application boots in browser → React Router picks page based on URL → loads corresponding page component.
– Page component pulls in sections (components/) and data (projectList.js) → renders UI.
– User actions (e.g., “View project details”) trigger component state changes or modal display.

c. Architectural patterns & design principles
– Component-based UI (React).
– Unidirectional data flow (props down, events up).
– Client-side routing (React Router).
– Separation of concerns:
- Layout vs. page vs. section components
- Static data vs. component logic
– Build-time vs. runtime separation:
- Vite handles dev+build, Tailwind processes styles at build time.

d. Key technologies
– React (UI library)
– Vite (bundler / dev server with HMR)
– React Router (routing)
– Tailwind CSS & PostCSS (styling)
– ESLint (linting)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global entities
    Browser["Client Browser"]:::runtime

    %% Static Host
    subgraph "Static Asset Server"
        direction TB
        PublicDir["public/ (assets, favicon, PDF)"]:::assets
        IndexHTML["index.html"]:::assets
    end

    Browser -->|GET index.html, JS, CSS| PublicDir
    PublicDir -->|serves index.html| Browser
    PublicDir -->|serves bundles & assets| Browser

    %% Build Toolchain
    subgraph "Build Toolchain" 
        direction TB
        Vite["Vite Config"]:::build
        PostCSS["PostCSS Config"]:::build
        Tailwind["Tailwind Config"]:::build
        ESLint["ESLint Config"]:::build
    end

    Vite -->|bundles JS/CSS| PublicDir
    Tailwind -->|processes CSS| PublicDir
    PostCSS -->|processes CSS| PublicDir
    ESLint -->|validates code| srcDir

    %% React Application
    subgraph "React Application" 
        direction TB
        Entry["main.jsx"]:::runtime
        AppLayout["App.jsx & App.css"]:::runtime
        Router["routes.js"]:::runtime
        subgraph "Pages"
            direction TB
            HomePage["Home.jsx"]:::runtime
            ProjectsPage["Projects.jsx"]:::runtime
            ExperiencePage["Experience.jsx"]:::runtime
            EducationPage["Education.jsx"]:::runtime
            ContactPage["Contact.jsx"]:::runtime
        end
        subgraph "Shared Components"
            direction TB
            Header["Header.jsx"]:::runtime
            Footer["Footer.jsx"]:::runtime
            Hero["HeroSection.jsx"]:::runtime
            About["AboutSection.jsx"]:::runtime
            ProjectsSection["ProjectsSection.jsx"]:::runtime
            ModalDetails["ModalProjectDetails.jsx"]:::runtime
            ContactSection["ContactSection.jsx"]:::runtime
            Animated["AnimatedSection.jsx"]:::runtime
        end
        Data["projectList.js"]:::assets
        AssetsDir["src/assets/"]:::assets
    end

    Browser -->|loads React App| Entry
    Entry -->|renders layout| AppLayout
    AppLayout -->|uses router| Router
    Router -->|routes to| HomePage
    Router -->|routes to| ProjectsPage
    Router -->|routes to| ExperiencePage
    Router -->|routes to| EducationPage
    Router -->|routes to| ContactPage

    HomePage --> Header
    HomePage --> Hero
    HomePage --> About
    HomePage --> ProjectsSection
    HomePage --> ContactSection
    HomePage --> Footer

    ProjectsPage --> Header
    ProjectsPage --> ProjectsSection
    ProjectsPage --> ModalDetails
    ProjectsPage --> Footer

    ExperiencePage --> Header
    ExperiencePage --> Footer

    EducationPage --> Header
    EducationPage --> Footer

    ContactPage --> Header
    ContactPage --> ContactSection
    ContactPage --> Footer

    ProjectsSection --> Data
    ModalDetails --> Data

    AppLayout --> AssetsDir

    %% Click Events
    click PublicDir "https://github.com/ayazsa/my-portfolio/tree/main/public/"
    click IndexHTML "https://github.com/ayazsa/my-portfolio/blob/main/index.html"
    click Vite "https://github.com/ayazsa/my-portfolio/blob/main/vite.config.js"
    click PostCSS "https://github.com/ayazsa/my-portfolio/blob/main/postcss.config.js"
    click Tailwind "https://github.com/ayazsa/my-portfolio/blob/main/tailwind.config.js"
    click ESLint "https://github.com/ayazsa/my-portfolio/blob/main/eslint.config.js"
    click Entry "https://github.com/ayazsa/my-portfolio/blob/main/src/main.jsx"
    click AppLayout "https://github.com/ayazsa/my-portfolio/blob/main/src/App.jsx"
    click Router "https://github.com/ayazsa/my-portfolio/blob/main/src/routes.js"
    click HomePage "https://github.com/ayazsa/my-portfolio/blob/main/src/pages/Home.jsx"
    click ProjectsPage "https://github.com/ayazsa/my-portfolio/blob/main/src/pages/Projects.jsx"
    click ExperiencePage "https://github.com/ayazsa/my-portfolio/blob/main/src/pages/Experience.jsx"
    click EducationPage "https://github.com/ayazsa/my-portfolio/blob/main/src/pages/Education.jsx"
    click ContactPage "https://github.com/ayazsa/my-portfolio/blob/main/src/pages/Contact.jsx"
    click Header "https://github.com/ayazsa/my-portfolio/blob/main/src/components/Header.jsx"
    click Footer "https://github.com/ayazsa/my-portfolio/blob/main/src/components/Footer.jsx"
    click Hero "https://github.com/ayazsa/my-portfolio/blob/main/src/components/HeroSection.jsx"
    click About "https://github.com/ayazsa/my-portfolio/blob/main/src/components/AboutSection.jsx"
    click ProjectsSection "https://github.com/ayazsa/my-portfolio/blob/main/src/components/ProjectsSection.jsx"
    click ModalDetails "https://github.com/ayazsa/my-portfolio/blob/main/src/components/ModalProjectDetails.jsx"
    click ContactSection "https://github.com/ayazsa/my-portfolio/blob/main/src/components/ContactSection.jsx"
    click Animated "https://github.com/ayazsa/my-portfolio/blob/main/src/components/AnimatedSection.jsx"
    click Data "https://github.com/ayazsa/my-portfolio/blob/main/src/data/projectList.js"
    click AssetsDir "https://github.com/ayazsa/my-portfolio/tree/main/src/assets/"

    %% Styles
    classDef build fill:#f9f,stroke:#333,stroke-width:1px
    classDef runtime fill:#bbf,stroke:#333,stroke-width:1px
    classDef assets fill:#bfb,stroke:#333,stroke-width:1px
```
