# cybertechyrappu/my-portfolio- architecture

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

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

## Overview

##### Project type & purpose (from README + tree)
This repo is a **static, client-only portfolio website** (no backend code present) with:
- **3D/WebGL experience** via **Three.js** (render loop, scene/camera, shaders/materials likely)
- **UI/scroll/interaction animation** via **GSAP**
- **Contact form** that sends email via **EmailJS** (client-side API call to EmailJS service)
- Multiple static pages: `index.html`, `privacy.html`, `terms.html`
- Styling in `style.css`, behavior in `script.js`
- Hosted as a static deployment (README points to Vercel, but the repo itself is plain static files)

##### What the file structure implies architecturally
Top-level files map almost 1:1 to runtime components:

- `index.html`
Entry point: DOM structure, canvas container for WebGL, sections, contact form, script/style includes.

- `script.js`
“Application” logic in a single bundle: Three.js scene setup, render loop, GSAP timelines/ScrollTrigger, “hacker text” animation, cursor/liquid glow tracking, anti-inspect/anti-debug behaviors, EmailJS invocation.

- `style.css`
Visual system: glassmorphism UI, layout, responsive styling, overlay panels, canvas positioning.

- `privacy.html`, `terms.html`
Separate document routes (static pages) that share the same CSS/JS or simplified versions.

No `/src`, no package manager manifests shown, no server code, no API routes → treat as **static site** where “modules” are logical blocks inside `script.js`.

##### Main components
Think in C4-style layers (Context → Container → Component) even for a static site.

##### Context (Level 1)
**Actors & external systems**
- **Visitor (User)**
- **Portfolio Website** (this project)
- **EmailJS Service** (external)

##### Containers (Level 2)
**Runtime/deployment boundaries**
##### Client Browser
- Loads HTML/CSS/JS
- Executes Three.js/GSAP
- Sends contact requests to EmailJS

##### Static Hosting/CDN (e.g., Vercel or any static host)
- Serves `index.html`, `terms.html`, `privacy.html`, `style.css`, `script.js`
- (If relevant) TLS/HTTP caching at edge

##### EmailJS API (External SaaS)
- Receives client-side request
- Triggers email delivery

##### Components (Level 3) — inside the Browser “container”

- **UI Layer (DOM)**
- Navigation, sections, overlays, contact form elements

- **3D Engine (Three.js)**
- Scene/Camera/Renderer
- Assets/materials (if any)
- Animation/render loop

- **Animation Orchestrator (GSAP / ScrollTriggers)**
- Scroll-based transitions
- Timeline coordination between DOM + WebGL states

- **Interaction Effects**
- Cursor tracking / liquid glow background
- “Hacker text” decoding animation

- **Contact/Transmission Module (EmailJS client integration)**
- Form validation
- `emailjs.send(...)` (or equivalent)
- Success/failure UI state

- **Anti-Inspect / Anti-Debug Module**
- DevTools detection hooks
- Keybind blocking / context menu blocking (if implemented)

- **User → Browser** (interactions: scroll, mouse, touch, form submit)
- **Browser → Static Host/CDN** (HTTP GET for HTML/CSS/JS)
- **Browser → EmailJS API** (HTTPS request carrying template params)
- **EmailJS API → Email Provider → Your Inbox** (optional but clarifies “delivery”)

- “GET /index.html, /style.css, /script.js”
- “POST/SDK call to EmailJS (template params)”

##### Architectural patterns/design principles to highlight (specific to this project)
- **Client-side only**: all behavior runs in the browser; no server trust boundary.
- **Render-loop based subsystem** (Three.js): continuous animation loop + GPU rendering (WebGL).
- **Event-driven UI orchestration** (GSAP + DOM events): scroll/mouse events drive both DOM and 3D state.
- **Externalized “backend capability” via SaaS** (EmailJS): email sending outsourced to a third-party API.

##### What to label explicitly (technologies & boundaries)
- “Client Browser (HTML/CSS/JS + Three.js + GSAP)”
- “Static Hosting/CDN (Vercel/Edge CDN)”
- “EmailJS (3rd-party Email API/SaaS)”

Also label boundaries:
- “User device boundary”
- “Public Internet”
- “3rd-party SaaS boundary”

- **Rectangles** for containers (Browser, CDN, EmailJS)
- **Nested rectangles** for components inside Browser (Three.js engine, GSAP orchestrator, etc.)

- Protocol (HTTP GET, HTTPS POST)
- Payload type (static assets, template params)
- Trigger (user submit, scroll, mousemove)

- User
- Browser
- UI/DOM
- Three.js WebGL Renderer
- GSAP Animation Controller
- Interaction Effects (cursor/hacker text)
- Contact Module (EmailJS client)
- Anti-Inspect Module
- Static Host/CDN
- EmailJS API
- Email Destination (Inbox) (optional)

- User → Browser: “scroll/mouse/touch/form submit”
- Browser → Static Host/CDN: “GET HTML/CSS/JS”
- Contact Module → EmailJS API: “send email (template params)”
- EmailJS API → Inbox: “email delivery”

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% =========================
    %% Context + Container View
    %% =========================
    subgraph "System Context (Static Portfolio Website)"
        U["Visitor (User)"]:::actor

        subgraph "User Device Boundary"
            B["Client Browser<br/>(HTML/CSS/JS runtime)"]:::browser

            subgraph "In-Browser Components (logical modules inside script.js)"
                DOM["UI Layer (DOM)<br/>nav/sections/overlays/contact form"]:::component
                THREE["3D Engine (Three.js)<br/>scene/camera/renderer/render loop"]:::component
                GSAP["Animation Orchestrator (GSAP + ScrollTrigger)<br/>timelines/scroll coordination"]:::component
                FX["Interaction Effects<br/>cursor tracking/liquid glow/hacker text"]:::component
                CONTACT["Contact/Transmission Module (EmailJS client)<br/>validate + send + UI state"]:::component
                ANTI["Anti-Inspect / Anti-Debug (deterrence)<br/>devtools hooks/keybind/context-menu blocks"]:::component_dashed
            end
        end

        subgraph "Public Internet"
            CDN["Static Hosting / CDN<br/>(e.g., Vercel static deploy)"]:::cdn
        end

        subgraph "3rd-Party SaaS Boundary"
            EJS["EmailJS API (SaaS)<br/>email template service"]:::saas
            MAIL["Email Destination (Inbox)<br/>(via Email Provider)"]:::external
        end
    end

    %% =========================
    %% Static dependencies / data flows
    %% =========================
    U -->|"scroll/mouse/touch/form_submit"| B

    B -->|"HTTP_GET static_assets<br/>/index.html,/style.css,/script.js<br/>/privacy.html,/terms.html"| CDN
    CDN -->|"serves static files"| B

    B -->|"loads/executes"| DOM
    B -->|"loads/executes"| THREE
    B -->|"loads/executes"| GSAP
    B -->|"loads/executes"| FX
    B -->|"loads/executes"| CONTACT
    B -->|"loads/executes"| ANTI

    %% Internal orchestration (event-driven)
    DOM -.->|"scroll_events"| GSAP
    DOM -.->|"click/hover/input_events"| FX
    GSAP -.->|"drives DOM transitions"| DOM
    GSAP -.->|"syncs animation states"| THREE
    FX -.->|"updates visuals (cursor/glow/text)"| DOM
    FX -.->|"optionally affects 3D params"| THREE
    THREE -->|"requestAnimationFrame render_loop"| THREE

    %% External capability via SaaS
    CONTACT -->|"HTTPS_POST/SDK call<br/>EmailJS template_params"| EJS
    EJS -->|"email delivery"| MAIL
    EJS -->|"success/failure response"| CONTACT
    CONTACT -.->|"updates success/error UI"| DOM

    %% =========================
    %% Runtime View: Page Load & Init (sequence-like)
    %% =========================
    subgraph "Runtime Flow A: Page Load & Initialization"
        direction TB
        A1["1) Browser requests HTML/CSS/JS"]:::step
        A2["2) index.html links style.css + script.js"]:::step
        A3["3) script.js initializes Three.js (canvas/renderer/scene/camera)"]:::step
        A4["4) Start render loop (requestAnimationFrame)"]:::step
        A5["5) Initialize GSAP timelines + ScrollTrigger"]:::step
        A6["6) Bind input listeners (scroll/mouse/touch/form)"]:::step
    end
    A1 --> A2 --> A3 --> A4 --> A5 --> A6

    A1 -.->|"maps_to"| CDN
    A2 -.->|"loads"| DOM
    A3 -.->|"init"| THREE
    A4 -.->|"loop"| THREE
    A5 -.->|"init"| GSAP
    A6 -.->|"binds_events"| DOM

    %% =========================
    %% Runtime View: Contact Submission (sequence-like)
    %% =========================
    subgraph "Runtime Flow B: Contact Form Submission"
        direction TB
        C1["1) User fills contact form"]:::step
        C2["2) Validate + build payload"]:::step
        C3["3) Send via EmailJS SDK/API"]:::step
        C4["4) EmailJS triggers delivery to inbox"]:::step
        C5["5) UI shows success/failure"]:::step
    end
    C1 --> C2 --> C3 --> C4 --> C5

    C1 -.->|"input_events"| DOM
    C2 -.->|"handled_by"| CONTACT
    C3 -.->|"HTTPS_POST/SDK call"| EJS
    C4 -.->|"delivers_to"| MAIL
    C5 -.->|"updates"| DOM

    %% =========================
    %% Click Events (from component_mapping)
    %% =========================
    click DOM "https://github.com/cybertechyrappu/my-portfolio-/blob/main/index.html"
    click CONTACT "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click THREE "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click GSAP "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click FX "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click ANTI "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click CDN "https://github.com/cybertechyrappu/my-portfolio-/blob/main/README.md"
    click B "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click U "https://github.com/cybertechyrappu/my-portfolio-/blob/main/index.html"
    click EJS "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click MAIL "https://github.com/cybertechyrappu/my-portfolio-/blob/main/README.md"

    click A2 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/index.html"
    click A3 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click A5 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click C3 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click C5 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"

    %% Direct file nodes for static routes/assets (clickable)
    subgraph "Static Files (served by CDN)"
        direction TB
        F1["index.html (Main page)"]:::file
        F2["privacy.html (Privacy policy)"]:::file
        F3["terms.html (Terms of service)"]:::file
        F4["style.css (Styles)"]:::file
        F5["script.js (App logic)"]:::file
        F6["README.md (Overview/Deploy notes)"]:::file
    end

    CDN -->|"serves"| F1
    CDN -->|"serves"| F2
    CDN -->|"serves"| F3
    CDN -->|"serves"| F4
    CDN -->|"serves"| F5
    CDN -->|"serves"| F6

    F1 -->|"loads"| F4
    F1 -->|"loads"| F5

    click F1 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/index.html"
    click F2 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/privacy.html"
    click F3 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/terms.html"
    click F4 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/style.css"
    click F5 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/script.js"
    click F6 "https://github.com/cybertechyrappu/my-portfolio-/blob/main/README.md"

    %% =========================
    %% Styles
    %% =========================
    classDef actor fill:#0f172a,stroke:#38bdf8,color:#e2e8f0,stroke-width:2px
    classDef browser fill:#111827,stroke:#a78bfa,color:#e5e7eb,stroke-width:2px
    classDef component fill:#1f2937,stroke:#22c55e,color:#e5e7eb,stroke-width:1.5px
    classDef component_dashed fill:#1f2937,stroke:#f59e0b,color:#fff7ed,stroke-width:1.5px,stroke-dasharray:6 4
    classDef cdn fill:#0b1220,stroke:#60a5fa,color:#dbeafe,stroke-width:2px
    classDef saas fill:#190f1f,stroke:#fb7185,color:#ffe4e6,stroke-width:2px
    classDef external fill:#23140b,stroke:#f97316,color:#ffedd5,stroke-width:2px
    classDef step fill:#052e2b,stroke:#2dd4bf,color:#ccfbf1,stroke-width:1.5px
    classDef file fill:#0a1a2b,stroke:#93c5fd,color:#e0f2fe,stroke-width:1.5px
```
