# aaditya-dubey09/3d-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/aaditya-dubey09/3d-portfolio
- Repository: https://github.com/aaditya-dubey09/3d-portfolio

## Overview

This project is a modern, interactive 3D portfolio website built with React and Vite. It uses Three.js for rendering immersive 3D graphics in the browser and leverages several web technologies (HTML5, CSS3, JavaScript) to provide a responsive and visually rich experience.

##### Main Components
- Entry Point & Core Application: The index.html file serves as the foundational HTML document that loads the React application. The main application logic is contained within src/App.jsx and src/main.jsx.
- 3D Rendering and Canvas Management: The src/components/canvas directory holds various components (Ball.jsx, Computers.jsx, Earth.jsx, Stars.jsx, and their index.js) that encapsulate the Three.js based rendering logic and the 3D scene management.
- UI Components: The src/components folder includes many individual React components (Hero.jsx, Navbar.jsx, About.jsx, Contact.jsx, Experience.jsx, Works.jsx, Loader.jsx, Feedbacks.jsx, Tech.jsx) that assemble the user interface appearing on different sections of the portfolio.
- Higher-Order Components (HOC): The src/hoc directory, especially SectionWrapper.jsx, appears to facilitate layout or state management for different sections, adding reusable behavior across components.
- Assets and Constants: The src/assets folder contains various media and static assets (such as company and tech images or references) along with src/constants which define reoccurring values.
- Public Assets: The public directory holds pre-built 3D scene files for different displays (desktop_pc and planet) along with associated textures and license files.
- Configuration Files: Files like package.json, vite.config.js, tailwind.config.js, eslint.config.js, and postcss.config.js suggest the use of specific build, style, linting, and bundling configurations.

##### Relationships and Interactions
- The browser loads index.html which in turn loads the React application (src/main.jsx and App.jsx).
- The main app orchestrates various UI components like Hero, Navbar, and others that together create the full portfolio experience.
- Dedicated canvas components under src/components/canvas are used to render 3D objects and scenes by integrating Three.js. These components communicate with each other and possibly with the overall React state (via HOC patterns).
- Asset loading is managed by both the public directory (for large 3D scenes and textures) and the src/assets folder (for smaller images or static data).
- The contact and feedback components might interact with external APIs or form submission services (although these are not explicitly detailed in the file tree, this is a common pattern).

##### Architectural Patterns and Design Principles
- Component-based Architecture: The design follows a modern React-based component approach where the UI is broken down into reusable pieces (components and HOCs).
- Separation of Concerns: There is a clear split between the rendering of 3D content (in the canvas folder), UI management (regular React components), and application-level logic (entry point and higher-level configuration).
- Configuration-Driven Build: The use of configuration files (Vite, Tailwind, ESLint, PostCSS) emphasizes a modern toolchain that simplifies development and ensures code quality.

##### Relevant Technologies, Frameworks, and Libraries
- React + Vite: For the fast development and building of this single-page application.
- Three.js: Powers the 3D rendering and interactive scene components.
- Tailwind CSS: Used for styling and ensuring a responsive design.
- Node.js/npm or yarn: Required for dependency management and running the development/build processes.
- Netlify: Indicates the deployment platform.

##### Elements
- Entry Point (index.html & main.jsx)
- Core Application (App.jsx)
- UI Components (e.g., Navbar, Hero, etc.)
- 3D Rendering Components (canvas-related components)
- Assets/Resources (public folder, src/assets)
- Configuration & Build Processes (Vite, Tailwind, ESLint, etc.)
- Data flow from user input through the UI to rendering.

- Provide secondary layers breaking down the UI into standard components and highlighting the specialized 3D canvas components.
- That every part of the file structure that impacts the application’s architecture is represented, even if briefly.

All text in this explanation is in black.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Browser"
        index_html["index.html"]:::entry
    end

    subgraph "React Application"
        main_jsx["src/main.jsx"]:::entry
        app_jsx["src/App.jsx"]:::entry
        index_html --> main_jsx
        main_jsx --> app_jsx
    end

    subgraph "UI Components"
        hero["Hero.jsx"]:::ui
        navbar["Navbar.jsx"]:::ui
        about["About.jsx"]:::ui
        contact["Contact.jsx"]:::ui
        experience["Experience.jsx"]:::ui
        works["Works.jsx"]:::ui
        loader["Loader.jsx"]:::ui
        feedbacks["Feedbacks.jsx"]:::ui
        tech["Tech.jsx"]:::ui
        app_jsx --> hero
        app_jsx --> navbar
        app_jsx --> about
        app_jsx --> contact
        app_jsx --> experience
        app_jsx --> works
        app_jsx --> loader
        app_jsx --> feedbacks
        app_jsx --> tech
    end

    subgraph "3D Rendering (Canvas Components)"
        ball["Ball.jsx"]:::canvas
        computers["Computers.jsx"]:::canvas
        earth["Earth.jsx"]:::canvas
        stars["Stars.jsx"]:::canvas
        canvas_index["index.js"]:::canvas
        app_jsx --> ball
        app_jsx --> computers
        app_jsx --> earth
        app_jsx --> stars
        app_jsx --> canvas_index
    end

    subgraph "Higher-Order Components (HOC)"
        section_wrapper["SectionWrapper.jsx"]:::hoc
        hoc_index["index.js"]:::hoc
        app_jsx --> section_wrapper
        app_jsx --> hoc_index
    end

    subgraph "Assets & Constants"
        assets["src/assets"]:::assets
        constants["src/constants/index.js"]:::assets
        app_jsx --> assets
        app_jsx --> constants
    end

    subgraph "Public Assets"
        public_folder["public"]:::public
        app_jsx --> public_folder
    end

    subgraph "Configuration & Build"
        package["package.json"]:::config
        vite["vite.config.js"]:::config
        tailwind["tailwind.config.js"]:::config
        eslint["eslint.config.js"]:::config
        postcss["postcss.config.js"]:::config
        app_jsx --> package
        app_jsx --> vite
        app_jsx --> tailwind
        app_jsx --> eslint
        app_jsx --> postcss
    end

    subgraph "External Services"
        threejs["Three.js"]:::external
        react["React & Vite"]:::external
        netlify["Netlify"]:::external
        app_jsx --> threejs
        app_jsx --> react
        app_jsx --> netlify
    end

    classDef entry fill:#f9f,stroke:#333,stroke-width:2px;
    classDef ui fill:#ccf,stroke:#333,stroke-width:2px;
    classDef canvas fill:#cfc,stroke:#333,stroke-width:2px;
    classDef hoc fill:#fcf,stroke:#333,stroke-width:2px;
    classDef assets fill:#cff,stroke:#333,stroke-width:2px;
    classDef public fill:#ffc,stroke:#333,stroke-width:2px;
    classDef config fill:#fcc,stroke:#333,stroke-width:2px;
    classDef external fill:#ddd,stroke:#333,stroke-width:2px;

    click index_html "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/index.html"
    click main_jsx "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/main.jsx"
    click app_jsx "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/App.jsx"

    click hero "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/Hero.jsx"
    click navbar "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/Navbar.jsx"
    click about "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/About.jsx"
    click contact "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/Contact.jsx"
    click experience "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/Experience.jsx"
    click works "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/Works.jsx"
    click loader "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/Loader.jsx"
    click feedbacks "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/Feedbacks.jsx"
    click tech "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/Tech.jsx"

    click ball "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/canvas/Ball.jsx"
    click computers "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/canvas/Computers.jsx"
    click earth "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/canvas/Earth.jsx"
    click stars "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/canvas/Stars.jsx"
    click canvas_index "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/components/canvas/index.js"

    click section_wrapper "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/hoc/SectionWrapper.jsx"
    click hoc_index "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/hoc/index.js"

    click assets "https://github.com/aaditya-dubey09/3d-portfolio/tree/main/src/assets"
    click constants "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/src/constants/index.js"

    click public_folder "https://github.com/aaditya-dubey09/3d-portfolio/tree/main/public"

    click package "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/package.json"
    click vite "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/vite.config.js"
    click tailwind "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/tailwind.config.js"
    click eslint "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/eslint.config.js"
    click postcss "https://github.com/aaditya-dubey09/3d-portfolio/blob/main/postcss.config.js"
```
