# ferrari-coder/my3dportfolio architecture

> Architecture diagram of the GitHub repository ferrari-coder/my3dportfolio, 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/ferrari-coder/my3dportfolio
- Repository: https://github.com/ferrari-coder/my3dportfolio

## Overview

##### Major Components
- Entry & Build Configuration:
- index.html serves as the HTML entry point.
- Vite configuration (vite.config.js) and other tools’ configs (postcss.config.js, tailwind.config.js, vercel.json) form the backbone of the build/deployment setup.
- Application Bootstrap:
- src/main.jsx as the application’s initialization and rendering entry point.
- src/App.jsx acts as the central React application component.
- UI Components:
- The src/components folder contains several modular UI components (Hero, Navbar, Footer, About, Contact, Experience, Works, Feedbacks, Loader) and a subfolder for canvas integrations (Ball, Computers, Earth, Stars) that likely handle 3D or graphical rendering.
- Higher Order Components (HOC) in src/hoc (like SectionWrapper.jsx) are used to wrap and enhance the UI components.
- Assets and Constants:
- Assets under src/assets (including company and tech) provide images, logos, or supporting media.
- Constants in src/constants serve as configuration or static data used across the UI.
- Utility functions provided in src/utilis (e.g., motion.js) likely handle animations or other dynamic behaviors.
- Public Assets:
- The public folder includes static assets such as different scenes (for “desktop_pc” and “planet”) with binaries, glTF files, and texture directories which might be used in the 3D/canvas components.

##### Defining Relationships and Interactions
- Data Flow:
- Component Hierarchy:
- That components like Navbar, Hero, About, etc. are direct children (or sub-components) of the App.
- Public Assets & 3D Integration:
- The “public” folder assets (scene files and textures) are utilized by canvas components (located in src/components/canvas) which in turn are part of the overall UI.
- Build & Toolchain Dependencies:
- Configuration files (ESLint, Tailwind, PostCSS, etc.) should be noted as influencing code quality and styling, indirectly affecting application components.

##### Highlighting Architectural Patterns and Principles
- Component-Based Architecture:
- Modular design of UI components which allows for reuse and independent testing.
- Separation of Concerns:
- Distinct separation between application logic (React components in src), configuration (Vite, ESLint, Tailwind, etc.), and static assets (public folder).
- Integration Patterns:
- Integration of 3D components using the “canvas” subfolder which might be leveraging libraries like Three.js (if applicable based on 3D assets).
- Use of Tooling:
- That Vite is coupled with plugins (@vitejs/plugin-react or @vitejs/plugin-react-swc) to enable fast refresh and efficient builds.

##### Conclusion

Happy diagramming!

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entry & Build Configuration
    subgraph "Entry & Build Configuration"
        E1["index.html"]
        E2["vite.config.js"]
        E3[".eslintrc.cjs"]
        E4["tailwind.config.js"]
        E5["postcss.config.js"]
        E6["vercel.json"]
    end

    %% Application Bootstrap
    subgraph "Application Bootstrap"
        AB1["main.jsx"]
        AB2["App.jsx"]
    end

    %% UI Components
    subgraph "UI Components"
        UI1["Navbar"]
        UI2["Hero"]
        UI3["About"]
        UI4["Works"]
        UI5["Experience"]
        UI6["Feedbacks"]
        UI7["Contact"]
        UI8["Loader"]
        UI9["Footer"]
        UI10["Tech"]
    end

    %% Canvas/3D Components
    subgraph "Canvas/3D Components"
        C1["Ball"]
        C2["Computers"]
        C3["Earth"]
        C4["Stars"]
        C5["Canvas Index"]
    end

    %% Higher Order Components (HOC)
    subgraph "Higher Order Components (HOC)"
        H1["SectionWrapper"]
        H2["HOC Index"]
    end

    %% Assets & Constants
    subgraph "Assets & Constants"
        AC1["Assets Index"]
        AC2["Constants Data"]
        AC3["Company Assets"]
        AC4["Tech Assets"]
    end

    %% Utility Functions
    subgraph "Utility Functions"
        U1["Motion Utilities"]
    end

    %% Public Static Assets
    subgraph "Public Static Assets"
        P1["Desktop Assets"]
        P2["Planet Assets"]
    end

    %% Connections
    E2 --> AB1
    E1 --> AB1

    AB1 --> AB2

    %% UI Components flow (vertical order)
    AB2 --> UI1
    UI1 --> UI2
    UI2 --> UI3
    UI3 --> UI4
    UI4 --> UI5
    UI5 --> UI6
    UI6 --> UI7
    UI7 --> UI8
    UI8 --> UI9
    UI9 --> UI10

    %% Higher Order Components integration
    AB2 --> H1
    H2 --> H1
    H1 -.->|"wraps"| UI3

    %% Canvas/3D Components flow
    AB2 --> C1
    C1 --> C2
    C2 --> C3
    C3 --> C4
    C4 --> C5

    %% Canvas components using Public Static Assets
    C5 -->|"loads"| P1
    C5 -->|"loads"| P2

    %% Assets & Constants integration
    AB2 --> AC1
    AC1 --> AC3
    AC1 --> AC4
    AB2 --> AC2

    %% Utility Functions connection
    AB2 --> U1

    %% Class Definitions for Colors
    classDef config fill:#FFCC00,stroke:#333,stroke-width:2px;
    classDef bootstrap fill:#99CCFF,stroke:#333,stroke-width:2px;
    classDef ui fill:#FF9999,stroke:#333,stroke-width:2px;
    classDef canvas fill:#FF66CC,stroke:#333,stroke-width:2px;
    classDef hoc fill:#CC99FF,stroke:#333,stroke-width:2px;
    classDef assets fill:#B0E57C,stroke:#333,stroke-width:2px;
    classDef utility fill:#66CC99,stroke:#333,stroke-width:2px;
    classDef public fill:#CCCCCC,stroke:#333,stroke-width:2px;

    %% Assign Classes
    class E1,E2,E3,E4,E5,E6 config;
    class AB1,AB2 bootstrap;
    class UI1,UI2,UI3,UI4,UI5,UI6,UI7,UI8,UI9,UI10 ui;
    class C1,C2,C3,C4,C5 canvas;
    class H1,H2 hoc;
    class AC1,AC2,AC3,AC4 assets;
    class U1 utility;
    class P1,P2 public;

    %% Click Events for Entry & Build Configuration
    click E1 "https://github.com/ferrari-coder/my3dportfolio/blob/main//index.html"
    click E2 "https://github.com/ferrari-coder/my3dportfolio/blob/main//vite.config.js"
    click E3 "https://github.com/ferrari-coder/my3dportfolio/blob/main//.eslintrc.cjs"
    click E4 "https://github.com/ferrari-coder/my3dportfolio/blob/main//tailwind.config.js"
    click E5 "https://github.com/ferrari-coder/my3dportfolio/blob/main//postcss.config.js"
    click E6 "https://github.com/ferrari-coder/my3dportfolio/blob/main//vercel.json"

    %% Click Events for Application Bootstrap
    click AB1 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/main.jsx"
    click AB2 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/App.jsx"

    %% Click Events for UI Components
    click UI1 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/Navbar.jsx"
    click UI2 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/Hero.jsx"
    click UI3 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/About.jsx"
    click UI4 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/Works.jsx"
    click UI5 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/Experience.jsx"
    click UI6 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/Feedbacks.jsx"
    click UI7 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/Contact.jsx"
    click UI8 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/Loader.jsx"
    click UI9 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/Footer.jsx"
    click UI10 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/Tech.jsx"

    %% Click Events for Canvas/3D Components
    click C1 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/canvas/Ball.jsx"
    click C2 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/canvas/Computers.jsx"
    click C3 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/canvas/Earth.jsx"
    click C4 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/canvas/Stars.jsx"
    click C5 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/components/canvas/index.js"

    %% Click Events for Higher Order Components (HOC)
    click H1 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/hoc/SectionWrapper.jsx"
    click H2 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/hoc/index.js"

    %% Click Events for Assets & Constants
    click AC1 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/assets/index.js"
    click AC2 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/constants/index.js"
    click AC3 "https://github.com/ferrari-coder/my3dportfolio/tree/main//src/assets/company"
    click AC4 "https://github.com/ferrari-coder/my3dportfolio/tree/main//src/assets/tech"

    %% Click Event for Utility Functions
    click U1 "https://github.com/ferrari-coder/my3dportfolio/blob/main//src/utilis/motion.js"

    %% Click Events for Public Static Assets
    click P1 "https://github.com/ferrari-coder/my3dportfolio/tree/main//public/desktop_pc"
    click P2 "https://github.com/ferrari-coder/my3dportfolio/tree/main//public/planet"
```
