# ivogarraza/ivogarraza-portfolio-v3 architecture

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

- Interactive diagram: https://gitdiagram.com/ivogarraza/ivogarraza-portfolio-v3
- Repository: https://github.com/ivogarraza/ivogarraza-portfolio-v3

## Overview

##### Main Components
- Entry Point and Build Configuration: At the root you have index.html, main entry file (main.jsx), and configuration files such as vite.config.js, tailwind.config.js, postcss.config.js, and ESLint configuration. These indicate how the application is bootstrapped and built.
- Application Core (React Layers): The src directory serves as the heart of the application. Inside src, App.jsx (and App.css) set up the overall layout, while the components folder contains a wide array of React components (e.g., Navbar, AboutCard, Chat, Projects, Assistant, etc.) that form the UI.
- Internationalization and Constants: The languages folder with separate data for “en” and “es” along with the constants directory highlight a built-in mechanism for language support and centralized constants.
- Utility Layers: The hooks and utils directories imply that custom hooks and helper functions are used to encapsulate logic shared across components.
- Pages and Routing: With pages like ChatPage.jsx and ProjectPage.jsx, the application likely uses page routing to display different views, even though routing details might not be explicit in the file names.
- CI/CD and Deployment: Directories/files such as .github/workflows, deploy.sh, and package configuration files point to built-in deployment scripts and automation via GitHub Actions.

##### Relationships and Interactions
- The index.html serves as the static entry that loads main.jsx and, subsequently, the React app.
- Vite (with plugins for React) handles the build and development process, integrating with the configuration files.
- Within React, the App component renders and orchestrates different smaller components (found in the components directory) and uses React state/hook hooks (from src/hooks) to manage UI state and data flows.
- Assets and media files are imported by various components to enhance visual and audio elements.
- The languages data and constants are globally imported where needed, ensuring consistency across different parts of the UI.
- The deployment pipeline (deploy.sh and GitHub workflows) ties into the version control process to automatically test and deploy changes.

##### Architectural Patterns and Design Principles
- Component-based Architecture: The UI is composed of many self-contained React components organized by type/functionality.
- Separation of Concerns: Configuration (Vite, ESLint, Tailwind, etc.), application logic (components, hooks, utils), styling (CSS/SCSS modules, PostCSS), and static assets are all placed in dedicated directories.
- Internationalization: The structure supports multiple languages (en/es), hinting at careful separation between core logic and localized content.
- CI/CD Integration: The inclusion of GitHub workflow files underlines the emphasis on continuous integration and deployment, a key part of modern frontend development.

- Entry and Configuration: Indicate index.html, main.jsx, and config files (vite.config.js, tailwind.config.js, postcss.config.js, .eslintrc.cjs).
- Utility Services: Indicate hooks, utils, constants, and internationalization resources, showing how they provide support to the UI.
- CI/CD and Deployment: Show a separate section for deploy.sh and the GitHub workflows that automate testing and deployment.

- From Entry (index.html/main.jsx) to the App component.
- Connections from UI components to utility layers (hooks, utils, languages).
- How assets are imported into components (e.g., images and styles).

- To highlight specialized functionalities like internationalization and weather styles by adding annotations.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Top Level
    FE["Frontend Application"]:::frontend

    %% Entry & Configuration
    subgraph "Entry & Configuration"
        EIndex["index.html"]:::entry
        Main["src/main.jsx"]:::entry
        Vite["vite.config.js"]:::config
        Tailwind["tailwind.config.js"]:::config
        PostCSS["postcss.config.js"]:::config
        ESLint[".eslintrc.cjs"]:::config
    end

    %% Application Core
    subgraph "Application Core"
        App["src/App.jsx"]:::core
        AppCSS["src/App.css"]:::core
    end

    %% UI Components
    subgraph "UI Components"
        Components["src/components"]:::ui
    end

    %% Assets & Resources
    subgraph "Assets & Resources"
        Assets["src/assets"]:::assets
    end

    %% Internationalization & Constants
    subgraph "Internationalization & Constants"
        Languages["src/languages"]:::intl
        Constants["src/constants"]:::intl
    end

    %% Utility Layers
    subgraph "Utility Layers"
        Hooks["src/hooks"]:::utils
        Utils["src/utils"]:::utils
    end

    %% Pages & Routing
    subgraph "Pages & Routing"
        Pages["src/pages"]:::pages
    end

    %% CI/CD & Deployment
    subgraph "CI/CD & Deployment"
        Workflows[".github/workflows"]:::cicd
        Deploy["deploy.sh"]:::cicd
    end

    %% Connections from Frontend Application to Entry & Configuration and CI/CD
    FE -->|"bootstraps"| EIndex
    FE -->|"build config"| Vite
    FE -->|"build config"| Tailwind
    FE -->|"build config"| PostCSS
    FE -->|"build config"| ESLint
    FE -->|"triggers build"| Workflows

    %% Entry flow
    EIndex -->|"loads"| Main
    Vite -->|"configures"| Main
    Tailwind -->|"configures"| Main
    PostCSS -->|"configures"| Main
    ESLint -->|"ensures quality"| Main

    %% Application Core consumption
    Main -->|"initializes"| App
    App -->|"applies styles"| AppCSS

    %% Application layer flows
    App -->|"renders"| Components
    App -->|"defines routing"| Pages

    %% UI Components interactions
    Components -->|"imports media"| Assets
    Components -->|"utilizes hooks"| Hooks
    Components -->|"utilizes utilities"| Utils
    Components -->|"fetches text"| Languages
    Components -->|"uses constants"| Constants

    %% Additional routing connections
    Pages -->|"renders UI"| Components

    %% Deployment chain
    Workflows -->|"triggers"| Deploy

    %% Click Events
    click EIndex "https://github.com/ivogarraza/ivogarraza-portfolio-v3/blob/main/index.html"
    click Main "https://github.com/ivogarraza/ivogarraza-portfolio-v3/blob/main/src/main.jsx"
    click Vite "https://github.com/ivogarraza/ivogarraza-portfolio-v3/blob/main/vite.config.js"
    click Tailwind "https://github.com/ivogarraza/ivogarraza-portfolio-v3/blob/main/tailwind.config.js"
    click PostCSS "https://github.com/ivogarraza/ivogarraza-portfolio-v3/blob/main/postcss.config.js"
    click ESLint "https://github.com/ivogarraza/ivogarraza-portfolio-v3/blob/main/.eslintrc.cjs"
    click App "https://github.com/ivogarraza/ivogarraza-portfolio-v3/blob/main/src/App.jsx"
    click AppCSS "https://github.com/ivogarraza/ivogarraza-portfolio-v3/blob/main/src/App.css"
    click Components "https://github.com/ivogarraza/ivogarraza-portfolio-v3/tree/main/src/components"
    click Assets "https://github.com/ivogarraza/ivogarraza-portfolio-v3/tree/main/src/assets"
    click Languages "https://github.com/ivogarraza/ivogarraza-portfolio-v3/tree/main/src/languages"
    click Constants "https://github.com/ivogarraza/ivogarraza-portfolio-v3/tree/main/src/constants"
    click Hooks "https://github.com/ivogarraza/ivogarraza-portfolio-v3/tree/main/src/hooks"
    click Utils "https://github.com/ivogarraza/ivogarraza-portfolio-v3/tree/main/src/utils"
    click Pages "https://github.com/ivogarraza/ivogarraza-portfolio-v3/tree/main/src/pages"
    click Workflows "https://github.com/ivogarraza/ivogarraza-portfolio-v3/tree/main/.github/workflows"
    click Deploy "https://github.com/ivogarraza/ivogarraza-portfolio-v3/blob/main/deploy.sh"

    %% Styling Classes
    classDef frontend fill:#e1f5fe,stroke:#0277bd,stroke-width:2px;
    classDef entry fill:#fce4ec,stroke:#c2185b,stroke-width:2px;
    classDef config fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px;
    classDef core fill:#fff3e0,stroke:#ef6c00,stroke-width:2px;
    classDef ui fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px;
    classDef assets fill:#e0f7fa,stroke:#00838f,stroke-width:2px;
    classDef intl fill:#f9fbe7,stroke:#afb42b,stroke-width:2px;
    classDef utils fill:#ede7f6,stroke:#5e35b1,stroke-width:2px;
    classDef pages fill:#fffde7,stroke:#f9a825,stroke-width:2px;
    classDef cicd fill:#eceff1,stroke:#546e7a,stroke-width:2px;
```
