# eyalsberro/portfolio architecture

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

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

## Overview

##### Main Components Identification

a) Client-Side Layer
- Next.js App Router (app directory structure)
- Static Assets (public directory)
- Component Architecture

b) Page Structure
- Main sections (Photography, Web Development, About Me, Contact)
- Shared Components (Header, Footer, HeroSection)

**┌─────────────────────────────────────────┐**
- Next.js Application          │
- ┘

**┌─────────────┐ ┌─────────────┐ ┌─────────────┐**
- (page)     │ │  Components │ │   Public    │
- Route Group│ │    Layer    │ │   Assets    │
- ┘ └─────────────┘ └─────────────┘

##### Component Relationships

- Data flow between pages and components
- Asset loading paths
- Component inheritance

##### Specific Implementation Details

a) App Router Structure
- Nested routing structure under app/(page)
- Photography section's complex nested structure
- Shared layouts and components

b) Static Asset Management
- Relationship between public/pictures and their corresponding routes
- Demonstrate how images are served to different sections

c) Component Architecture
- How shared components (Header.jsx, Footer.jsx, HeroSection.jsx) are used across pages
- Relationship between components and their CSS modules

##### Additional Notes

- Clear separation between route groups and shared components
- Modular nature of the photography sections
- Demonstrate the relationship between .js files containing data (projects.js, pictureBTS.js, etc.) and their corresponding pages
- Optimization features provided by Next.js

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Next.js Application"
        AppRouter["Next.js App Router"]:::core
        click AppRouter "https://github.com/Eyalsberro/portfolio/tree/main/app"
    end

    subgraph "Main Components"
        Header["Header Component"]:::component
        Footer["Footer Component"]:::component
        Hero["Hero Section"]:::component
        click Header "https://github.com/Eyalsberro/portfolio/blob/main/app/(page)/Header.jsx"
        click Footer "https://github.com/Eyalsberro/portfolio/blob/main/app/Footer.jsx"
        click Hero "https://github.com/Eyalsberro/portfolio/blob/main/app/components/HeroSection.jsx"
    end

    subgraph "Page Routes"
        Photography["Photography Section"]:::page
        WebDev["Web Development Section"]:::page
        About["About Me Section"]:::page
        Contact["Contact Section"]:::page
        click Photography "https://github.com/Eyalsberro/portfolio/tree/main/app/(page)/photography"
        click WebDev "https://github.com/Eyalsberro/portfolio/tree/main/app/(page)/web-development"
        click About "https://github.com/Eyalsberro/portfolio/tree/main/app/(page)/about-me"
        click Contact "https://github.com/Eyalsberro/portfolio/tree/main/app/(page)/contact"
    end

    subgraph "Photography Sections"
        BTS["BTS"]:::photo
        Architecture["Architecture"]:::photo
        Lifestyle["Life-style"]:::photo
        Nature["Nature"]:::photo
        Soltero["Soltero"]:::photo
        click BTS "https://github.com/Eyalsberro/portfolio/tree/main/app/(page)/photography/BTS"
        click Architecture "https://github.com/Eyalsberro/portfolio/tree/main/app/(page)/photography/architecture"
        click Lifestyle "https://github.com/Eyalsberro/portfolio/tree/main/app/(page)/photography/life-style"
        click Nature "https://github.com/Eyalsberro/portfolio/tree/main/app/(page)/photography/nature"
        click Soltero "https://github.com/Eyalsberro/portfolio/tree/main/app/(page)/photography/soltero"
    end

    subgraph "Data Layer"
        ProjectsData["Projects Data"]:::data
        BTSData["BTS Pictures Data"]:::data
        ArchData["Architecture Pictures Data"]:::data
        LifeData["Life-style Pictures Data"]:::data
        SolteroData["Soltero Pictures Data"]:::data
        click ProjectsData "https://github.com/Eyalsberro/portfolio/blob/main/app/(page)/web-development/projects.js"
        click BTSData "https://github.com/Eyalsberro/portfolio/blob/main/app/(page)/photography/BTS/pictureBTS.js"
        click ArchData "https://github.com/Eyalsberro/portfolio/blob/main/app/(page)/photography/architecture/architecurePicture.js"
        click LifeData "https://github.com/Eyalsberro/portfolio/blob/main/app/(page)/photography/life-style/lifestylePictures.js"
        click SolteroData "https://github.com/Eyalsberro/portfolio/blob/main/app/(page)/photography/soltero/solterPictures.js"
    end

    subgraph "Static Assets"
        PublicAssets["Public Assets"]:::assets
        PhotoImages["Photography Images"]:::assets
        click PublicAssets "https://github.com/Eyalsberro/portfolio/tree/main/public"
        click PhotoImages "https://github.com/Eyalsberro/portfolio/tree/main/public/pictures"
    end

    %% Relationships
    AppRouter --> Header
    AppRouter --> Footer
    AppRouter --> Hero
    AppRouter --> Photography
    AppRouter --> WebDev
    AppRouter --> About
    AppRouter --> Contact

    Photography --> BTS
    Photography --> Architecture
    Photography --> Lifestyle
    Photography --> Nature
    Photography --> Soltero

    BTS --> BTSData
    Architecture --> ArchData
    Lifestyle --> LifeData
    Soltero --> SolteroData
    WebDev --> ProjectsData

    PhotoImages --> BTS
    PhotoImages --> Architecture
    PhotoImages --> Lifestyle
    PhotoImages --> Nature
    PhotoImages --> Soltero

    %% Styling
    classDef core fill:#2563eb,color:white
    classDef component fill:#9333ea,color:white
    classDef page fill:#16a34a,color:white
    classDef photo fill:#0d9488,color:white
    classDef data fill:#c2410c,color:white
    classDef assets fill:#b91c1c,color:white

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Shared Components"]:::component
        L3["Main Pages"]:::page
        L4["Photo Sections"]:::photo
        L5["Data Files"]:::data
        L6["Static Assets"]:::assets
    end
```
