# shinchancode/3d-react-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/shinchancode/3d-react-portfolio
- Repository: https://github.com/shinchancode/3d-react-portfolio

## Overview

##### Main Components Structure

a) Frontend Layer (React Application)
- Client-Side Components
- 3D Rendering Engine
- State Management
- Routing

b) External Services Layer
- Email Service (EmailJS)
- Asset Delivery
- Hosting (GitHub Pages)

##### Detailed Component Breakdown

**Frontend Layer:**
**┌─────────────────────────────────────────────┐**
- React Application                           │
- ┬───┤
- Core Components                         │ 3D │
- Navbar                               │ R  │
- Hero                                 │ e  │
- Experience                           │ n  │
- Education                            │ d  │
- Projects                             │ e  │
- Contact                              │ r  │

- ┤    │
- Canvas Components                      │    │
- Ball                                │    │
- Computers                           │    │
- Earth                               │    │
- Stars                               │    │
- ┴────┘

##### Technology Stack Representation

- ThreeJS
- React Three Fiber
- TailwindCSS
- Framer Motion
- SASS
- Vite

##### Data Flow Indicators

- User interactions → Components
- Component → 3D Renderer
- Contact Form → EmailJS
- Asset Loading → ThreeJS

##### Key Design Elements

a) Component Architecture:
- HOC (Higher Order Components) wrapper
- Reusable components
- Canvas elements

b) Styling System:
- TailwindCSS configuration
- SCSS modules
- Global styles

c) Asset Management:
- 3D models
- Textures
- Static assets

##### Specific Implementation Details

Relationship between:
- SectionWrapper HOC and individual components
- Canvas components and Three.js integration
- Motion components and Framer Motion
- Contact form and EmailJS integration

##### The build and deployment workflow

Remember to:
- Use consistent styling and notation
- Notes for key architectural decisions
- Performance optimization points

This system design should reflect the modern, interactive nature of the portfolio while clearly showing how the various technologies integrate to create the final user experience.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Frontend Layer"
        App["App Component"]
        Main["Main Entry Point"]
        
        subgraph "Core Components"
            direction TB
            Navbar["Navbar"]:::component
            Hero["Hero"]:::component
            Experience["Experience"]:::component
            Education["Education"]:::component
            Projects["Projects"]:::component
            Contact["Contact"]:::component
        end

        subgraph "Canvas Components"
            direction TB
            Ball["Ball"]:::threejs
            Computers["Computers"]:::threejs
            Earth["Earth"]:::threejs
            Stars["Stars"]:::threejs
        end

        subgraph "Higher Order Components"
            SectionWrapper["Section Wrapper"]:::hoc
        end

        subgraph "Styling System"
            TailwindConfig["Tailwind Config"]:::config
            GlobalStyles["Global Styles"]:::styles
            ComponentStyles["Component Styles"]:::styles
        end

        subgraph "Asset Management"
            Models["3D Models"]:::assets
            TechAssets["Tech Assets"]:::assets
            ProjectAssets["Project Assets"]:::assets
        end

        subgraph "Animation & Utils"
            MotionUtils["Motion Utilities"]:::utils
        end

        subgraph "Configuration"
            ViteConfig["Vite Config"]:::config
            DeployConfig["Deploy Config"]:::config
        end

        Constants["Application Constants"]:::data
    end

    subgraph "External Services"
        EmailJS["EmailJS Service"]:::external
        GHPages["GitHub Pages"]:::external
    end

    %% Relationships
    App --> Main
    Main --> CoreComponents
    CoreComponents --> |Uses| SectionWrapper
    CoreComponents --> |Styled by| ComponentStyles
    Canvas --> |Renders| Models
    Contact --> EmailJS
    App --> GHPages
    CoreComponents --> |Uses| MotionUtils
    Canvas --> |Uses| Three["ThreeJS/R3F"]:::tech

    %% Click Events
    click Navbar "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/components/Navbar.jsx"
    click Hero "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/components/Hero.jsx"
    click Experience "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/components/Experience.jsx"
    click Education "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/components/Education.jsx"
    click Projects "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/components/Project.jsx"
    click Contact "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/components/Contact.jsx"
    click Ball "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/components/canvas/Ball.jsx"
    click Computers "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/components/canvas/Computers.jsx"
    click Earth "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/components/canvas/Earth.jsx"
    click Stars "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/components/canvas/Stars.jsx"
    click SectionWrapper "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/hoc/SectionWrapper.jsx"
    click Models "https://github.com/shinchancode/3d-react-portfolio/blob/main/public/desktop_pc/scene.gltf"
    click TechAssets "https://github.com/shinchancode/3d-react-portfolio/tree/main/src/assets/tech"
    click ProjectAssets "https://github.com/shinchancode/3d-react-portfolio/tree/main/src/assets/project"
    click TailwindConfig "https://github.com/shinchancode/3d-react-portfolio/blob/main/tailwind.config.js"
    click GlobalStyles "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/global.scss"
    click MotionUtils "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/utils/motion.js"
    click App "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/App.jsx"
    click Main "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/main.jsx"
    click ViteConfig "https://github.com/shinchancode/3d-react-portfolio/blob/main/vite.config.js"
    click DeployConfig "https://github.com/shinchancode/3d-react-portfolio/blob/main/.github/workflows/deploy.yml"
    click Constants "https://github.com/shinchancode/3d-react-portfolio/blob/main/src/constants/index.js"

    %% Styling
    classDef component fill:#3498db,stroke:#2980b9,color:white
    classDef threejs fill:#2ecc71,stroke:#27ae60,color:white
    classDef hoc fill:#9b59b6,stroke:#8e44ad,color:white
    classDef config fill:#e67e22,stroke:#d35400,color:white
    classDef styles fill:#1abc9c,stroke:#16a085,color:white
    classDef assets fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef utils fill:#f1c40f,stroke:#f39c12,color:white
    classDef external fill:#e74c3c,stroke:#c0392b,color:white
    classDef tech fill:#34495e,stroke:#2c3e50,color:white
    classDef data fill:#1abc9c,stroke:#16a085,color:white
```
