# turnerlopezjuanpablo/myportfolio-turnerlopez architecture

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

- Interactive diagram: https://gitdiagram.com/turnerlopezjuanpablo/myportfolio-turnerlopez
- Repository: https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez

## Overview

##### Project Type and Purpose
- This is a static, client-side Single Page Application (SPA) built with React (using Vite as the bundler) serving as a personal portfolio website.
- No custom backend or API—content is either baked into the build (CV PDF, images) or loaded via React Context/hooks.

##### File Structure Analysis
Top-level (inside MyPortfolio/):
- index.html – the SPA entry point
- package.json & package-lock.json – npm dependencies and scripts
- vite.config.js – build configuration
- public/ – static assets copied straight to the build output
- src/ – all source code
- main.jsx & App.jsx – app bootstrap and root component
- Components/ – feature modules (AboutMe, Projects, Contact, etc.)
- Components/Context/LanguageContext.jsx – React Context for i18n
- customHooks/useLanguageHook.jsx – custom hook wrapping the Context
- styles/ – CSS/SCSS files scoped per component

##### Extracting Insights from README
- A React-JS portfolio deployed via Netlify (badge shows CI/CD)
- No mention of external APIs, so all data is either local or fetched via static JSON if added later.

a. Main Components to represent:
1) Developer Environment
– Local codebase (src/, public/)
– Vite Dev Server (hot-reload)
2) Build & CI/CD
– Vite build process (transpile JSX, bundle assets, minify)
– Netlify continuous deployment (Git ↔ Netlify integration)
3) Hosting & Delivery
– Netlify CDN (static hosting of HTML/CSS/JS)
4) Runtime in the Browser
– index.html loads bundle.js & styles
– React root (main.jsx → App.jsx)
– Component tree (TopNav, Presentation, AboutMe, Projects, Contact, etc.)
– LanguageContext providing i18n state via useLanguageHook
– Assets (images, PDF CV) served as static files

– Developer → Git repository → Netlify
– Netlify build triggers Vite → output to CDN
– End user browser → CDN → index.html + bundles
– index.html → React runtime → component hierarchy
– Components consume Context → render localized text
– Components import CSS/SCSS → style DOM

c. Architectural Patterns & Design Principles
– SPA architecture with clear separation between build pipeline, hosting, and runtime
– Component-based UI (React) implementing separation of concerns
– Context API for cross-cutting concerns (language state)
– Custom hooks for encapsulating reusable logic

d. Key Technologies & Frameworks
– React.js (v18+)
– Vite (for fast dev server & bundling)
– Netlify (CI/CD & CDN hosting)
– ECMAScript Modules, JSX
– CSS / SCSS modules & global styles
– Context API & custom React hooks

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Development Layer
    subgraph "Development"
        direction TB
        Code["Local Codebase (src/)"]:::code
        Assets["Static Assets (public/)"]:::code
        StylesDev["Styles (src/styles/)"]:::code
        ViteConfig["vite.config.js"]:::code
        Package["package.json"]:::code
        index["index.html"]:::code
    end

    %% Build & CI/CD Layer
    subgraph "Build & CI/CD"
        direction TB
        Git["Git Repository"]:::infra
        CI["Netlify CI/CD"]:::infra
        ViteDev["Vite Dev Server / Build"]:::code
    end

    %% Hosting & Delivery Layer
    subgraph "Hosting & Delivery"
        direction TB
        CDN["Netlify CDN (Static Hosting)"]:::infra
    end

    %% Runtime Layer
    subgraph "Runtime"
        direction TB
        Browser["User Browser"]:::runtime
        HTML["index.html"]:::runtime
        ReactRoot["React Runtime"]:::runtime

        subgraph "Component Tree"
            direction TB
            Main["main.jsx"]:::code
            App["App.jsx"]:::code
            LanguageContext["LanguageContext Provider"]:::code
            Hook["useLanguageHook"]:::code
            subgraph "Portfolio Sections"
                direction TB
                TopNav["TopNav"]:::code
                Presentation["Presentation"]:::code
                AboutMe["AboutMe"]:::code
                Projects["Projects"]:::code
                Contact["Contact"]:::code
                CVComp["CV"]:::code
                CodeComp["Code"]:::code
                Jobs["Jobs"]:::code
                Skills["Skills"]:::code
                Studies["Studies"]:::code
                Footer["Footer"]:::code
                SectionWC["Section.jsx"]:::code
                StudyCard["StudyCard.jsx"]:::code
            end
            AssetsRun["Assets (images, fonts, CV PDF)"]:::runtime
        end
    end

    %% Connections
    Code -->|imports| ViteDev
    Assets -->|bundled| ViteDev
    StylesDev -->|bundled| ViteDev
    ViteConfig -->|configures| ViteDev
    CI -->|runs build| ViteDev
    Package -->|defines scripts| CI
    Code -->|git push| Git
    Assets -->|git push| Git
    Git -->|deploy| CI
    ViteDev -->|build output| CDN
    CDN -->|HTTP GET| Browser
    Browser -->|loads| HTML
    HTML -->|boots| ReactRoot
    ReactRoot -->|executes| Main
    Main -->|renders| App
    App -->|uses Context| LanguageContext
    LanguageContext -->|provides| Hook
    App -->|contains| TopNav
    App -->|contains| Presentation
    App -->|contains| AboutMe
    App -->|contains| Projects
    App -->|contains| Contact
    App -->|contains| CVComp
    App -->|contains| CodeComp
    App -->|contains| Jobs
    App -->|contains| Skills
    App -->|contains| Studies
    App -->|contains| Footer
    Presentation -->|wraps| SectionWC
    Studies -->|wraps| StudyCard
    TopNav -->|imports styles| StylesDev
    App -->|loads assets| AssetsRun

    %% Click Events
    click Code "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/tree/main/MyPortfolio/src/"
    click Assets "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/tree/main/MyPortfolio/public/"
    click StylesDev "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/tree/main/MyPortfolio/src/styles/"
    click ViteConfig "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/vite.config.js"
    click Package "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/package.json"
    click index "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/index.html"
    click Main "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/main.jsx"
    click App "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/App.jsx"
    click LanguageContext "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/Context/LanguageContext.jsx"
    click Hook "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/customHooks/useLanguageHook.jsx"
    click TopNav "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/TopNav.jsx"
    click Presentation "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/Presentation.jsx"
    click AboutMe "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/AboutMe.jsx"
    click Projects "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/Projects.jsx"
    click Contact "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/Contact.jsx"
    click CVComp "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/CV.jsx"
    click CodeComp "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/Code.jsx"
    click Jobs "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/Jobs.jsx"
    click Skills "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/Skills.jsx"
    click Studies "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/Studies.jsx"
    click Footer "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/Footer.jsx"
    click SectionWC "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/MiniComponents/Section.jsx"
    click StudyCard "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/blob/main/MyPortfolio/src/Components/MiniComponents/StudyCard.jsx"
    click AssetsRun "https://github.com/turnerlopezjuanpablo/myportfolio-turnerlopez/tree/main/MyPortfolio/src/assets/"
    classDef code fill:#D0E6FF,stroke:#0366d6,color:#0366d6
    classDef infra fill:#D0FFD8,stroke:#28a745,color:#22863a
    classDef runtime fill:#FFE3B8,stroke:#e36209,color:#e36209
```
