# adrianhajdin/3d-portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a single‑page, front‑end–only application: an interactive 3D portfolio website built with React and Three.js.
- Its goal is to render animated 3D scenes, handle scroll‑based interactions, showcase models and logos, and provide a contact form via EmailJS.

##### File structure
- Top‑level files: index.html, vite.config.js, package.json – indicate a Vite‑powered React build.
- public/: static assets (images, textures, GLB models).
- src/: application source code
- main.jsx, App.jsx – entry point and root component
- components/ – reusable UI bits (buttons, cards, counters, NavBar, TitleHeader) and 3D model wrapper components under models/
- sections/ – page sections (Hero, Experience, Contact, etc.)
- constants/ – shared configuration values
- No backend folder – confirms this is purely a front‑end SPA, with an external EmailJS service for form submission.

##### Key insights from README
- Tech stack: React 19, Vite, Tailwind CSS, GSAP for animations, React‑Three‑Fiber + Drei for 3D.
- Features: scroll‑triggered animations, realistic lighting/shadows, responsive design, mobile‑optimized 3D.
- Integration: EmailJS for contact form, assets delivered via public/ directory or video kits.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Services and Hosting
    StaticHosting["Static Hosting / CDN"]:::external
    EmailJS["EmailJS REST API"]:::external

    %% Build & Deployment Pipeline
    subgraph "Build & Deployment Pipeline"
        direction TB
        ViteDev["Vite Dev Server"]:::pipeline
        ProdBuild["Production Build"]:::pipeline
        Deploy["Deploy to Hosting"]:::pipeline
    end

    %% Client Browser Environment
    subgraph "Client Browser"
        direction TB

        %% Entry and Root
        main["src/main.jsx"]:::frontend
        app["src/App.jsx"]:::frontend

        %% Constants
        constants["src/constants/index.js"]:::frontend

        %% UI Component Layer
        subgraph "UI Component Layer"
            direction TB
            btn["Button"]:::frontend
            nav["NavBar"]:::frontend
            title["TitleHeader"]:::frontend
            counter["AnimatedCounter"]:::frontend
            glow["GlowCard"]:::frontend
            expContent["ExpContent"]:::frontend
        end

        %% Page Sections
        subgraph "Page Sections"
            direction TB
            heroSec["Hero Section"]:::frontend
            expSec["Experience Section"]:::frontend
            techSec["TechStack Section"]:::frontend
            logoSec["LogoShowcase Section"]:::frontend
            featureSec["FeatureCards Section"]:::frontend
            testSec["Testimonials Section"]:::frontend
            showSec["ShowcaseSection"]:::frontend
            contactSec["Contact Section"]:::frontend
            footerSec["Footer Section"]:::frontend
        end

        %% 3D Rendering Engine
        subgraph "3D Engine (Three.js via R3F + Drei)"
            direction TB
            room["Room"]:::render
            particles["Particles"]:::render
            lights["HeroLights"]:::render
            heroExp["HeroExperience"]:::render
            computer["Computer"]:::render
            contactExp["ContactExperience"]:::render
            techIcon["TechIconCardExperience"]:::render
        end

        %% Animation Controller
        gsap["GSAP Animation Controller"]:::render
    end

    %% Relationships
    StaticHosting -->|"Serves HTML/JS/CSS"| main
    StaticHosting -->|"Serves Models/Textures"| room
    StaticHosting -->|"Serves Models/Textures"| particles
    StaticHosting -->|"Serves Models/Textures"| computer
    StaticHosting -->|"Serves Models/Textures"| techIcon

    main -->|"imports"| app
    app -->|"uses constants"| constants
    app -->|"renders UI layer"| btn
    app -->|"renders UI layer"| nav
    app -->|"renders UI layer"| title
    app -->|"renders UI layer"| counter
    app -->|"renders UI layer"| glow
    app -->|"renders UI layer"| expContent

    app -->|"renders sections"| heroSec
    app --> expSec
    app --> techSec
    app --> logoSec
    app --> featureSec
    app --> testSec
    app --> showSec
    app --> contactSec
    app --> footerSec

    app -->|"mounts 3D scene"| room
    app --> particles
    app --> lights
    app --> heroExp
    app --> computer
    app --> contactExp
    app --> techIcon

    gsap -->|"animates UI"| btn
    gsap --> nav
    gsap --> title
    gsap --> counter
    gsap --> glow
    gsap --> expContent
    gsap -->|"animates 3D"| room
    gsap --> particles
    gsap --> lights
    gsap --> heroExp
    gsap --> computer
    gsap --> contactExp
    gsap --> techIcon

    contactSec -->|"submit form"| EmailJS

    ViteDev --> ProdBuild --> Deploy --> StaticHosting

    %% Click Events
    click main "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/main.jsx"
    click app "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/App.jsx"
    click btn "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/Button.jsx"
    click nav "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/NavBar.jsx"
    click title "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/TitleHeader.jsx"
    click counter "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/AnimatedCounter.jsx"
    click glow "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/GlowCard.jsx"
    click expContent "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/ExpContent.jsx"
    click heroSec "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/sections/Hero.jsx"
    click expSec "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/sections/Experience.jsx"
    click techSec "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/sections/TechStack.jsx"
    click logoSec "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/sections/LogoShowcase.jsx"
    click featureSec "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/sections/FeatureCards.jsx"
    click testSec "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/sections/Testimonials.jsx"
    click showSec "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/sections/ShowcaseSection.jsx"
    click contactSec "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/sections/Contact.jsx"
    click footerSec "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/sections/Footer.jsx"
    click room "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/models/hero_models/Room.jsx"
    click particles "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/models/hero_models/Particles.jsx"
    click lights "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/models/hero_models/HeroLights.jsx"
    click heroExp "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/models/hero_models/HeroExperience.jsx"
    click computer "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/models/contact/Computer.jsx"
    click contactExp "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/models/contact/ContactExperience.jsx"
    click techIcon "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/components/models/tech_logos/TechIconCardExperience.jsx"
    click constants "https://github.com/adrianhajdin/3d-portfolio/blob/main/src/constants/index.js"

    %% Styles
    classDef frontend fill:#D0E8FF,stroke:#1E90FF,stroke-width:1px
    classDef render fill:#E0FFD8,stroke:#28A745,stroke-width:1px
    classDef external fill:#F0F0F0,stroke:#666,stroke-width:1px
    classDef pipeline fill:#FFE8B0,stroke:#FF8C00,stroke-width:1px
```
