# hadil-ben-abdallah/my-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/hadil-ben-abdallah/my-portfolio
- Repository: https://github.com/hadil-ben-abdallah/my-portfolio

## Overview

##### Main Components Identification

a) Page Layer
- Entry points (/pages)
- Document and App configuration
- Main index page

b) Component Layer (Organized by feature)
- Navigation
- Hero Section
- About Section
- Skills Display
- Projects Section
- Services Section
- Contact Section
- Blog Section
- Footer

c) Supporting Layers
- Context Management
- Theme Management
- Static Assets
- Styling System

**[Browser] ←→ [Next.js Runtime]**
- ↓
- [Application Architecture]

**Pages Layer (Entry Points)**
- ↓
**Context Provider (State Management)**
- ↓
**Component Architecture**
- ↓
**Static Assets & Styling**

##### Component Relationships

Following relationships:

- ContextProvider to components that consume it
- Link ThemeToggler to the context system
- How shared components (CustomButton, MyImage, Anchor) are used across features

**Skills Feature:**
- Skills.jsx
- SkillsSphere.jsx
- SkillsCard.jsx

##### Technical Stack Indicators

Technology badges or labels:
- Next.js
- React.js
- Tailwind CSS
- CSS Modules
- PWA capabilities (due to presence of sw.js)

##### Specific Implementation Details

Architectural patterns:
- Component composition pattern (e.g., Hero section components)
- Higher-order components (e.g., MyImage with Fallback)
- Context-based state management
- CSS Modules for component-scoped styling

##### Additional Elements

Supporting elements:
- SEO configuration (robots.txt, sitemap.xml)
- Static file handling (public directory)
- Build configuration (next.config.js)
- Style system (Tailwind + CSS Modules)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Browser Layer"
        Browser["Web Browser"]
    end

    subgraph "Next.js Runtime"
        NextRuntime["Next.js Application Runtime"]
    end

    subgraph "Page Layer"
        Pages["/pages Directory"]:::directory
        Document["_document.js"]:::file
        App["_app.js"]:::file
        Index["index.js"]:::file
    end

    subgraph "State Management"
        Context["Context Provider"]:::file
        Theme["Theme Toggler"]:::file
    end

    subgraph "Main Components"
        Nav["Navigation"]:::file
        Hero["Hero Section"]:::file
        About["About Section"]:::file
        Skills["Skills Display"]:::file
        Projects["Projects Section"]:::file
        Services["Services Section"]:::file
        Contact["Contact Section"]:::file
        Blog["Blog Section"]:::file
        Footer["Footer"]:::file
    end

    subgraph "Shared Components"
        Button["Custom Button"]:::file
        Image["Image Handler"]:::file
        Link["Link Component"]:::file
        Heading["Custom Heading"]:::file
    end

    subgraph "Configuration & Assets"
        StaticAssets["Static Assets"]:::directory
        GlobalStyles["Global Styles"]:::file
        TailwindConfig["Tailwind Config"]:::file
        NextConfig["Next.js Config"]:::file
        SEO["SEO Files"]:::directory
    end

    Browser --> NextRuntime
    NextRuntime --> Pages

    Pages --> Document
    Pages --> App
    Pages --> Index

    App --> Context
    Context --> Theme

    Context --> Nav
    Context --> Hero
    Context --> About
    Context --> Skills
    Context --> Projects
    Context --> Services
    Context --> Contact
    Context --> Blog
    Context --> Footer

    Button --> Hero
    Button --> About
    Button --> Contact
    
    Image --> Hero
    Image --> Projects
    Image --> About

    Link --> Nav
    Link --> Footer
    
    Heading --> Hero
    Heading --> About
    Heading --> Projects

    %% Click events for file/directory mapping
    click Pages "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/tree/main/pages"
    click Document "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/pages/_document.js"
    click App "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/pages/_app.js"
    click Index "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/pages/index.js"
    click Context "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/context/ContextProvider.js"
    click Theme "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/theme/Themetoggler.jsx"
    click Nav "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/nav/NavBar.jsx"
    click Hero "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/Hero/HeroSection.jsx"
    click About "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/about/About.jsx"
    click Skills "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/Skills/Skills.jsx"
    click Projects "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/projects/Projects.jsx"
    click Services "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/services/Services.jsx"
    click Contact "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/contact/ContactMe.jsx"
    click Blog "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/blog/Blog.jsx"
    click Footer "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/footer/Footer.jsx"
    click Button "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/button/CustomButton.jsx"
    click Image "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/image/MyImage.jsx"
    click Link "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/link/Anchor.jsx"
    click Heading "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/components/customH1/HyperOne.jsx"
    click StaticAssets "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/tree/main/public"
    click GlobalStyles "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/styles/globals.css"
    click TailwindConfig "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/tailwind.config.js"
    click NextConfig "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/blob/main/next.config.js"
    click SEO "https://github.com/Hadil-Ben-Abdallah/My-Portfolio/tree/main/public"

    classDef file fill:#f9f,stroke:#333,stroke-width:2px
    classDef directory fill:#bbf,stroke:#333,stroke-width:2px
    
    %% Legend
    subgraph Legend
        L1["File"]:::file
        L2["Directory"]:::directory
    end
```
