# enric1994/resume architecture

> Architecture diagram of the GitHub repository enric1994/resume, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/enric1994/resume
- Repository: https://github.com/enric1994/resume

## Overview

##### Project type and purpose
- This is a static, front-end-only “3D resume” website built with HTML/CSS/JavaScript and WebGL (via glTF models).
- Users browse to index.html (locally via python3 –m http.server or published on GitHub Pages) to view a sequence of interactive 3D scenes (your resume), each backed by a `.glb` model.
- Blender is used offline to author `.blend` source files, exported to glTF (`.glb`), optionally compressed with the Draco encoder.

##### File-structure analysis
- Top-level files:
- `index.html` – the single-page web app shell
- `compress_models.sh` – helper script to run the Cesium glTF-pipeline/Draco encoder
- `models/` – compiled `.glb` assets + Draco decoder (`draco_decoder.wasm`/`draco_wasm_wrapper.js`)
- `scenes/` – original Blender `.blend` files (source)
- No backend code, no database—purely static assets + client-side rendering.

##### Key README insights
- Flow: author in Blender → export GLTF → (optional) compress via `compress_models.sh` → host on GitHub Pages or local simple HTTP server → browser fetches `index.html` + assets → renders WebGL scenes.
- Dependencies: standard HTML/CSS/JS, Blender for modeling, glTF-pipeline (Draco).

##### Components
a. Offline/authoring stage
- Blender (produce `.blend`)
- glTF Export module → raw `.glb` files
- `compress_models.sh` + glTF-pipeline/Draco → optimized `.glb` + `draco_decoder.wasm` + `draco_wasm_wrapper.js`
b. Deployment/hosting stage
- GitHub Pages or any static HTTP server (e.g. python3 –m http.server)
- Repository holding `index.html`, `models/`, static assets
c. Client/runtime stage
- User’s Browser (WebGL context)
- index.html + JS code (initializes Three.js or native glTF loader)
- WebAssembly module (`draco_decoder.wasm`) + JS wrapper
- Fetches `.glb` assets from `models/`
- Renders sequential 3D scenes (resume sections)

##### Relationships and interactions
- Authoring pipeline: Blender → glTF export → compress_models.sh → commit to Git repo → deploy to GitHub Pages
- At runtime: Browser → HTTP GET `index.html` → parse and load JS modules → fetch & decode `.glb` via Draco → WebGL render → user interaction

##### Architectural patterns and design principles
- Pure static-site architecture: no runtime server logic.
- Separation of concerns: offline model creation vs. client runtime display.
- Progressive enhancement: uncompressed .glb fallback if Draco loader unavailable.
- Modular assets: each resume section is a separate `.glb`.

##### Technologies and frameworks
- Blender (model authoring)
- glTF 2.0 (.glb)
- glTF-pipeline (Draco) for compression
- WebAssembly (`draco_decoder.wasm`) + JS wrapper
- Three.js or native WebGL glTF loader (implicit in index.html)
- Git/GitHub Pages for hosting
- Python HTTP server (for local dev)

##### Elements
- Labels on each component (e.g., “compress_models.sh + glTF-pipeline”)

##### Final advice
- Both offline/authoring and online/runtime aspects.
- Don’t over‐engineer—split the workflow into as many discrete, meaningful steps as needed for clarity.
- User’s journey (from opening index.html to viewing each 3D scene) is obvious.
- Static nature of hosting and WebAssembly asset decoding.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Authoring Pipeline (Blue)
    subgraph "Authoring Pipeline"
        direction TB
        Scenes["scenes/ (Blender source)"]:::author
        Blender["Blender"]:::author
        Exporter["glTF Exporter (.blend → .glb)"]:::author
        Compressor["compress_models.sh + glTF-pipeline (Draco)"]:::author
        Scenes -->|"open .blend"| Blender
        Blender -->|"export .blend → .glb"| Exporter
        Exporter -->|"raw .glb files"| Compressor
        Compressor -->|"optimized .glb + decoder"| Models
    end

    %% Asset Store
    Models["models/ (compressed .glb files)"]:::asset

    %% Deployment/Hosting (Green)
    subgraph "Deployment & Hosting"
        direction TB
        Repo["Git Repository (index.html, models/, scenes/)"]:::deploy
        Docs["README.md & .gitignore"]:::deploy
        Hosting["Static HTTP Server / GitHub Pages"]:::deploy
        Models -->|"git push"| Repo
        Scenes -->|"git push"| Repo
        Docs -->|"git push"| Repo
        Repo -->|"host static site"| Hosting
    end

    %% Client/Runtime (Orange)
    subgraph "Client/Runtime"
        direction TB
        Browser["Browser (WebGL)"]:::client
        Index["index.html + JS (Three.js/glTF loader)"]:::client
        WASM["draco_decoder.wasm"]:::client
        Wrapper["draco_wasm_wrapper.js"]:::client
        Renderer["WebGL Renderer"]:::client

        Hosting -->|"HTTP GET index.html"| Browser
        Browser -->|"load HTML & JS"| Index
        Index -->|"HTTP GET models/*.glb"| Models
        Index -->|"load wasm module"| WASM
        Index -->|"load JS wrapper"| Wrapper
        Wrapper -->|"decode .glb via wasm"| Renderer
        Renderer -->|"render scenes"| Browser
    end

    %% Legend
    subgraph "Legend"
        direction TB
        A[Blue: Authoring Pipeline]:::author
        B[Green: Deployment & Hosting]:::deploy
        C[Orange: Client/Runtime]:::client
        D[Cylinder: Asset Stores]:::asset
    end

    %% Click Events
    click Scenes "https://github.com/enric1994/resume/tree/master/scenes/"
    click Compressor "https://github.com/enric1994/resume/blob/master/compress_models.sh"
    click Models "https://github.com/enric1994/resume/blob/master/models/*.glb"
    click WASM "https://github.com/enric1994/resume/blob/master/models/draco_decoder.wasm"
    click Wrapper "https://github.com/enric1994/resume/blob/master/models/draco_wasm_wrapper.js"
    click Index "https://github.com/enric1994/resume/blob/master/index.html"
    click Hosting "https://github.com/enric1994/resume/blob/master/."
    click Docs "https://github.com/enric1994/resume/blob/master/README.md"

    %% Styles
    classDef author fill:#ADD8E6,stroke:#333
    classDef deploy fill:#90EE90,stroke:#333
    classDef client fill:#FFA500,stroke:#333
    classDef asset fill:#D3D3D3,stroke:#333,shape:cylinder
```
