# lamzaaa/portfolio architecture

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

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

## Overview

##### Main Components
- Frontend Framework: The application is built with React. The entry point is defined in src/main.tsx where the rendering process is bootstrapped.
- Application Core: The App component (src/App.tsx) acts as the root container that organizes and renders the various UI components.
- UI Components: Under the src/components directory you have several subdirectories like “about”, “experience”, “project”, “skills”, “Contact”, and “global”. Each of these is a logical grouping corresponding to specific parts of the UI.
- Hooks: Custom hooks (src/hooks such as useParallax and useViewWith) provide reusable logic for certain view or animation behaviors.
- Build & Configuration Tools: The project uses Vite (vite.config.ts) for bundling and fast module reloading, ESLint (eslint.config.js) for static code analysis, and Tailwind CSS for styling (tailwind.config.js).

##### Relationships and Interactions
- Custom Hooks: Link custom hooks (e.g., useParallax, useViewWith) to the components that depend on them. This indicates that certain reusable behaviors are abstracted away.
- Linting & Type Checking: Although not part of runtime execution, showcase ESLint configuration as an auxiliary tool that enforces code standards via the ESLint config and TypeScript configurations (tsconfig files).

##### Architectural Patterns and Design Principles
- Component-Based Architecture: Emphasize that the UI is built on a hierarchy of React components, each responsible for a specific feature or section.
- Separation of Concerns: The division between assets/data (static resources), business logic (React components and hooks), and presentation (CSS via Tailwind and App.css) should be clearly delineated.
- Build and Development Separation: The configuration for development (Vite, ESLint settings, hot module replacement) is kept separate from production assets (located in the dist folder).

##### Relevant Technologies and Tools
- Vite is used as the build tool (with a note on the available plugins for React and fast refresh).
- ESLint and Tailwind CSS are used for code quality and styling respectively.
- Additional libraries and custom hooks, which enable specific UI behaviors and data-handling from JSON assets.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Application Layer
    subgraph "Frontend Application"
        A1["index.html"]:::frontend
        A2["Entry Point (src/main.tsx)"]:::frontend
        A3["App Component (src/App.tsx)"]:::frontend
        A1 --> A2
        A2 --> A3

        subgraph "UI Modules"
            B1["About Module"]:::frontend
            B2["Experiences Module"]:::frontend
            B3["Project Module"]:::frontend
            B4["Skills Module"]:::frontend
            B5["Contact Module"]:::frontend
            B6["Global Component"]:::frontend
            B7["Shared UI Components"]:::frontend
        end

        A3 --> B1
        A3 --> B2
        A3 --> B3
        A3 --> B4
        A3 --> B5
        A3 --> B6
        A3 --> B7
    end

    %% Assets & Data Layer
    subgraph "Assets & Data"
        C1["Static Assets & Icons"]:::assets
        C2["JSON Data"]:::assets
    end

    %% Custom Hooks Layer
    subgraph "Custom Hooks"
        D1["Custom Hooks"]:::hooks
    end

    %% Build & Configuration Tools Layer
    subgraph "Build & Configuration Tools"
        E1["Vite (vite.config.ts)"]:::config
        E2["ESLint (eslint.config.js)"]:::config
        E3["Tailwind Config (tailwind.config.js)"]:::config
        E4["TypeScript Configurations"]:::config
    end

    %% Build Process Pipeline
    subgraph "Build Process"
        F1["Source Code (src)"]:::build
        F2["Vite Bundler"]:::build
        F3["Production Build (dist)"]:::build
    end

    %% Build pipeline arrows
    F1 --> F2
    F2 --> F3

    %% Data and functionality flow
    C1 -->|"providesAssets"| B3
    C2 -->|"providesData"| B4
    D1 -->|"enhancesLogic"| B2

    %% Integration of configuration tools with application
    E1 -->|"builds"| A2
    E2 -->|"enforces"| A3
    E3 -->|"styles"| A3
    E4 -->|"typeChecks"| A3

    %% Linking build process with Vite configuration
    E1 -->|"configuresBuild"| F2

    %% Color Definitions
    classDef frontend fill:#cce5ff,stroke:#0056b3,stroke-width:2px;
    classDef assets fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef hooks fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef config fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef build fill:#e2e3e5,stroke:#6c757d,stroke-width:2px;

    %% Click Events Mapping
    click A2 "https://github.com/lamzaaa/portfolio/blob/main/src/main.tsx"
    click A3 "https://github.com/lamzaaa/portfolio/blob/main/src/App.tsx"
    click B1 "https://github.com/lamzaaa/portfolio/tree/main/src/components/about"
    click B2 "https://github.com/lamzaaa/portfolio/blob/main/src/components/experiences/Experience.tsx"
    click B3 "https://github.com/lamzaaa/portfolio/blob/main/src/components/project/Project.tsx"
    click B4 "https://github.com/lamzaaa/portfolio/tree/main/src/components/skills"
    click B5 "https://github.com/lamzaaa/portfolio/blob/main/src/components/Contact.tsx"
    click B6 "https://github.com/lamzaaa/portfolio/blob/main/src/components/global/header.tsx"
    click B7 "https://github.com/lamzaaa/portfolio/tree/main/src/components/UI"
    click C1 "https://github.com/lamzaaa/portfolio/tree/main/src/assets/icons"
    click C2 "https://github.com/lamzaaa/portfolio/tree/main/src/assets/data"
    click D1 "https://github.com/lamzaaa/portfolio/tree/main/src/hooks"
    click E1 "https://github.com/lamzaaa/portfolio/blob/main/vite.config.ts"
    click E2 "https://github.com/lamzaaa/portfolio/blob/main/eslint.config.js"
    click E3 "https://github.com/lamzaaa/portfolio/blob/main/tailwind.config.js"
    click E4 "https://github.com/lamzaaa/portfolio/blob/main/tsconfig.app.json"
    click F1 "https://github.com/lamzaaa/portfolio/tree/main/src"
```
