# breadybred/portfolio architecture

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

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

## Overview

##### Component Breakdown

A. Client Layer:
- Main Portfolio View
- Responsive Layout Components
- Content Management Interface

B. Application Layer (Core):
- Content Management Functions (/admin/panel/functions/*)
- Functions (/functions/includes/*)
- Mail Handler (PHPMailer integration)
- Authentication System
- Routing mechanism (index.php and .htaccess)

C. Data Layer:
- JSON Storage section containing all data files:
- aboutme.json
- competences.json
- contact.json
- projects.json
- etc.
- Media Storage section:
- Images
- Documents (CVs, certificates)

##### Interaction Flows

- Client-server communication
- Data flow between components
- Authentication paths
- Content update workflows

##### Technical Details

Annotations for:
- PHP version requirements
- Server requirements
- File structure organization
- Security measures

Example Component Relationship:
**[User Browser] → [Frontend Interface] → [PHP Backend] → [JSON Storage]**
- ↑
**[Admin Browser] → [Admin Panel] -----+**

Key Aspects to Emphasize:
##### Security boundaries between public and admin areas

Remember to:
- A clear hierarchy of components
- Both static and dynamic relationships
- Security boundaries
- Document all external dependencies (PHPMailer)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef frontend fill:#a8d1ff,stroke:#000
    classDef admin fill:#ffb366,stroke:#000
    classDef backend fill:#b3ffb3,stroke:#000
    classDef data fill:#ffccff,stroke:#000
    classDef security fill:#ff9999,stroke:#000

    subgraph Client["Client Layer"]
        FE["Frontend Interface"]:::frontend
        AP["Admin Panel Interface"]:::admin
        CPS["Color Palette Switcher"]:::frontend
        RLC["Responsive Layout"]:::frontend
        CMI["Content Management Interface"]:::admin
    end

    subgraph Core["Application Layer"]
        direction TB
        PB["PHP Backend"]:::backend
        
        subgraph CMF["Content Management Functions"]
            PM["Project Management"]:::backend
            AMM["About Me Management"]:::backend
            CM["Contact Management"]:::backend
        end

        subgraph DF["Display Functions"]
            MD["Main Display"]:::backend
            AD["Admin Display"]:::backend
            PD["Project Display"]:::backend
        end

        MH["Mail Handler (PHPMailer)"]:::backend
        AS["Authentication System"]:::security
    end

    subgraph Data["Data Layer"]
        direction TB
        subgraph JSON["JSON Storage"]
            AMD["aboutme.json"]:::data
            PJD["projects.json"]:::data
            CTD["contact.json"]:::data
            CPD["competences.json"]:::data
        end

        subgraph Media["Media Storage"]
            IMG["Images"]:::data
            DOC["Documents"]:::data
        end

        subgraph Assets["Asset Processing"]
            LESS["LESS Source"]:::data
            CSS["Compiled CSS"]:::data
            JS["JavaScript Modules"]:::data
        end
    end

    %% Relationships
    FE --> PB
    AP --> PB
    CPS --> FE
    RLC --> FE
    CMI --> AP

    PB --> CMF
    PB --> DF
    PB --> MH
    PB --> AS

    CMF --> JSON
    DF --> JSON
    DF --> Media
    AS --> AP

    %% Click Events
    click AP "https://github.com/BreadyBred/portfolio/blob/master/admin/panel/index.php"
    click PM "https://github.com/BreadyBred/portfolio/blob/master/admin/panel/functions/modify_project.php"
    click AMM "https://github.com/BreadyBred/portfolio/blob/master/admin/panel/functions/modify_aboutme_section.php"
    click CM "https://github.com/BreadyBred/portfolio/blob/master/admin/panel/functions/modify_contact_section.php"
    click MD "https://github.com/BreadyBred/portfolio/blob/master/functions/includes/display_main_parts.php"
    click AD "https://github.com/BreadyBred/portfolio/blob/master/functions/includes/display_admin_parts.php"
    click PD "https://github.com/BreadyBred/portfolio/blob/master/functions/includes/project_functions.php"
    click MH "https://github.com/BreadyBred/portfolio/tree/master/functions/PHPMailer"
    click AMD "https://github.com/BreadyBred/portfolio/blob/master/data/aboutme.json"
    click PJD "https://github.com/BreadyBred/portfolio/blob/master/data/projects.json"
    click CTD "https://github.com/BreadyBred/portfolio/blob/master/data/contact.json"
    click CPD "https://github.com/BreadyBred/portfolio/blob/master/data/competences.json"
    click IMG "https://github.com/BreadyBred/portfolio/tree/master/medias/images"
    click DOC "https://github.com/BreadyBred/portfolio/tree/master/medias/files"
    click LESS "https://github.com/BreadyBred/portfolio/tree/master/style/less"
    click CSS "https://github.com/BreadyBred/portfolio/blob/master/style/style.css"
    click JS "https://github.com/BreadyBred/portfolio/tree/master/script"
    click AS "https://github.com/BreadyBred/portfolio/blob/master/functions/login.php"

    %% Legend
    subgraph Legend
        L1["Frontend Components"]:::frontend
        L2["Admin Components"]:::admin
        L3["Backend Components"]:::backend
        L4["Data Storage"]:::data
        L5["Security Components"]:::security
    end
```
