# chadlizakaria/portfolio architecture

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

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

## Overview

##### Main Components of the System
- Frontend Application: Built with React.js, it serves as the user interface.
- Public Assets: Static files (HTML, manifest, PDF, etc.) served to the user.
- Components: Modular React components such as Navbar, Carousel, Skills, Certifications, etc.
- Pages: High-level pages like Home, AboutMe, Projects, and ContactMe.
- Context and Translations: Singletons like LanguageContext (for multi-language support) and translation files (global JSONs for English and French).

##### Understand Relationships and Interactions
- The entry point (src/index.js) loads the main App component.
- App.js then integrates multiple components and renders pages based on routing (even if routing isn’t explicit, the structure clearly separates different page views).
- The Navbar is used across pages for navigation.
- Each page (in src/pages) composes multiple components, such as the AboutMe page using the AboutMeDescription component.
- The LanguageContext manages global state impacting translations and multi-language support, influencing how components render text.
- Data and assets from directories like src/images and src/data.js are used by multiple components.

##### Architectural Patterns and Design Principles
- Component-based architecture: Each UI piece is isolated in its own folder (e.g., Certifications, Carousel).
- Separation of Concerns: Pages, components, context, and static assets are clearly separated.
- Reusability: Common elements (like animations from tsParticles and navigation) are reused across different views.
- Modular Design: Each component has its own CSS/SCSS and JS files, making it easier to maintain and update.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Application
    subgraph "Frontend Application"
        INDEX["index.js"]:::frontend
        APP["App.js"]:::frontend
        INDEX --> APP
    end

    %% Pages
    subgraph "Pages"
        HOME["Home Page"]:::page
        ABOUT["AboutMe Page"]:::page
        PROJECTS["Projects Page"]:::page
        CONTACT["ContactMe Page"]:::page
    end

    APP --> HOME
    APP --> ABOUT
    APP --> PROJECTS
    APP --> CONTACT

    %% UI Components
    subgraph "UI Components"
        NAVBAR["Navbar"]:::component
        CAROUSEL["Carousel"]:::component
        SKILLS["Skills"]:::component
        CERTIFICATIONS["Certifications"]:::component
        FORMATIONS["Formations"]:::component
        ABOUT_DESC["AboutMeDescription"]:::component
        PARTICLES["Particles"]:::component
    end

    %% Connections from Pages to UI Components
    HOME -->|"uses"| NAVBAR
    HOME -->|"uses"| CAROUSEL
    HOME -->|"uses"| SKILLS
    HOME -->|"uses"| PARTICLES

    ABOUT -->|"uses"| NAVBAR
    ABOUT -->|"uses"| ABOUT_DESC
    ABOUT -->|"uses"| PARTICLES

    PROJECTS -->|"uses"| NAVBAR
    PROJECTS -->|"uses"| CERTIFICATIONS
    PROJECTS -->|"uses"| FORMATIONS
    PROJECTS -->|"uses"| PARTICLES

    CONTACT -->|"uses"| NAVBAR
    CONTACT -->|"uses"| PARTICLES

    %% Public Assets
    PUBLIC["Public Assets"]:::assets
    APP -->|"loads"| PUBLIC

    %% Context and Translations
    CTX["LanguageContext"]:::context
    TRANS["Translation Files"]:::context
    EN["English Translation"]:::context
    FR["French Translation"]:::context

    CTX -->|"provides"| HOME
    CTX -->|"provides"| ABOUT
    CTX -->|"provides"| PROJECTS
    CTX -->|"provides"| CONTACT
    CTX -->|"manages"| TRANS
    TRANS --> EN
    TRANS --> FR

    %% Click Events
    click INDEX "https://github.com/chadlizakaria/portfolio/blob/master/src/index.js"
    click APP "https://github.com/chadlizakaria/portfolio/blob/master/src/App.js"
    click PUBLIC "https://github.com/chadlizakaria/portfolio/tree/master/public/"
    click NAVBAR "https://github.com/chadlizakaria/portfolio/blob/master/src/components/Navbar/Navbar.js"
    click CAROUSEL "https://github.com/chadlizakaria/portfolio/blob/master/src/components/Carousel/Carousel.js"
    click SKILLS "https://github.com/chadlizakaria/portfolio/blob/master/src/components/Skills/Skills.js"
    click CERTIFICATIONS "https://github.com/chadlizakaria/portfolio/blob/master/src/components/Certifications/Certifications.js"
    click FORMATIONS "https://github.com/chadlizakaria/portfolio/blob/master/src/components/Formations/Formations.js"
    click ABOUT_DESC "https://github.com/chadlizakaria/portfolio/blob/master/src/components/AboutMeDescription/AboutMeDescription.js"
    click PARTICLES "https://github.com/chadlizakaria/portfolio/blob/master/src/components/Particles/particles.js"
    click HOME "https://github.com/chadlizakaria/portfolio/blob/master/src/pages/Home/Home.js"
    click ABOUT "https://github.com/chadlizakaria/portfolio/blob/master/src/pages/AboutMe/AboutMe.js"
    click PROJECTS "https://github.com/chadlizakaria/portfolio/blob/master/src/pages/Projects/Projects.js"
    click CONTACT "https://github.com/chadlizakaria/portfolio/blob/master/src/pages/ContactMe/ContactMe.js"
    click CTX "https://github.com/chadlizakaria/portfolio/blob/master/src/contexts/LanguageContext.js"
    click EN "https://github.com/chadlizakaria/portfolio/blob/master/src/translations/en/global.json"
    click FR "https://github.com/chadlizakaria/portfolio/blob/master/src/translations/fr/global.json"

    %% Styles
    classDef frontend fill:#a8d0e6,stroke:#333,stroke-width:2px;
    classDef page fill:#f7d794,stroke:#333,stroke-width:2px;
    classDef component fill:#fad390,stroke:#333,stroke-width:2px,rx:10,ry:10;
    classDef context fill:#b8e994,stroke:#333,stroke-width:2px;
    classDef assets fill:#E3E3E3,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5;
```
