# aaolmedo2/portfolio architecture

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

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

## Overview

##### Establish Relationships and Data Flows
- A directional flow starting from index.html that loads “src/main.jsx”, which in turn renders “App.jsx”.
- That data flows from “src/data/constants.jsx” to components like Projects and Skills to dynamically populate content.
- How “src/utils/Theme.jsx” may provide global styling or theming to multiple components.

##### Architectural Patterns and Design Principles
- Component-Based Architecture: Note that the project is modular – each UI part (e.g., Navbar, HeroSection) is encapsulated, making it easy to update or reuse.
- Separation of Concerns: Clearly separate presentation (React components), data (constants), and utility (theme) layers.
- Build/Dependency Management: Vite handles bundling and development server configurations, which is key to the SPA model.

##### Additional Details
- Mention that although the overall project is lean (focused on a portfolio), capturing each component, data source, and utility is essential to represent the architecture fully.
- Detail how each component contributes to the overall functionality (navigation, project display, contact info, etc.).
- Since this is a client-side application, emphasize that communication is limited to internal data flow rather than external API services.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entry & Configuration
    subgraph "Entry & Configuration"
        HTML("index.html"):::config
        PKG("package.json"):::config
        VITE("vite.config.js"):::config
    end

    %% Application Core
    subgraph "Application Core"
        MAIN("src/main.jsx"):::core
        APP("src/App.jsx"):::core
    end

    %% UI Components
    subgraph "UI Components"
        NAV("Navbar"):::ui
        HS("HeroSection"):::ui
        HBA("HeroBgAnimation"):::ui
        PROJ("Projects"):::ui
        PCARDS("ProjectsCards"):::ui
        PDETAILS("ProjectDetails"):::ui
        SKILL("Skills"):::ui
        CONT("Contacto"):::ui
        FOOT("Footer"):::ui
    end

    %% Data & Utilities
    subgraph "Data & Utilities"
        CONST("constants.jsx"):::data
        THEME("Theme.jsx"):::data
    end

    %% Assets
    subgraph "Assets"
        ASSETS("assets"):::assets
    end

    %% Connections: Entry & Configuration to Application Core
    HTML -->|"loads"| MAIN
    PKG  -->|"supports"| MAIN
    VITE -->|"configures"| MAIN

    %% Application Core Flow
    MAIN -->|"renders"| APP

    %% Application Core to UI Components
    APP -->|"renders"| NAV
    APP -->|"renders"| HS
    APP -->|"renders"| HBA
    APP -->|"renders"| PROJ
    APP -->|"renders"| SKILL
    APP -->|"renders"| CONT
    APP -->|"renders"| FOOT

    %% Projects Composition
    PROJ -->|"includes"| PCARDS
    PROJ -->|"details"| PDETAILS

    %% Data injection from constants
    CONST -->|"injectsData"| PCARDS
    CONST -->|"injectsData"| SKILL

    %% Theme application
    THEME -->|"appliesTheme"| NAV
    THEME -->|"appliesTheme"| HS
    THEME -->|"appliesTheme"| HBA
    THEME -->|"appliesTheme"| PROJ
    THEME -->|"appliesTheme"| SKILL
    THEME -->|"appliesTheme"| CONT
    THEME -->|"appliesTheme"| FOOT

    %% Assets usage
    ASSETS -->|"contains"| HS

    %% Click Events
    click HTML "https://github.com/aaolmedo2/portfolio/blob/main//index.html"
    click PKG "https://github.com/aaolmedo2/portfolio/blob/main//package.json"
    click VITE "https://github.com/aaolmedo2/portfolio/blob/main//vite.config.js"
    click MAIN "https://github.com/aaolmedo2/portfolio/blob/main//src/main.jsx"
    click APP "https://github.com/aaolmedo2/portfolio/blob/main//src/App.jsx"
    click NAV "https://github.com/aaolmedo2/portfolio/tree/main//src/components/Navbar"
    click HS "https://github.com/aaolmedo2/portfolio/tree/main//src/components/HeroSection"
    click HBA "https://github.com/aaolmedo2/portfolio/tree/main//src/components/HeroBgAnimation"
    click PROJ "https://github.com/aaolmedo2/portfolio/tree/main//src/components/Projects"
    click PCARDS "https://github.com/aaolmedo2/portfolio/blob/main//src/components/Cards/ProjectsCards.jsx"
    click PDETAILS "https://github.com/aaolmedo2/portfolio/blob/main//src/components/ProjectDetails/index.jsx"
    click SKILL "https://github.com/aaolmedo2/portfolio/blob/main//src/components/Skills/index.jsx"
    click CONT "https://github.com/aaolmedo2/portfolio/blob/main//src/components/Contacto/index.jsx"
    click FOOT "https://github.com/aaolmedo2/portfolio/blob/main//src/components/Footer/index.jsx"
    click CONST "https://github.com/aaolmedo2/portfolio/blob/main//src/data/constants.jsx"
    click THEME "https://github.com/aaolmedo2/portfolio/blob/main//src/utils/Theme.jsx"
    click ASSETS "https://github.com/aaolmedo2/portfolio/tree/main//src/assets"

    %% Styles
    classDef config fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef core fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
    classDef ui fill:#d4edda,stroke:#155724,stroke-width:2px,stroke-dasharray:5,5;
    classDef data fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef assets fill:#cce5ff,stroke:#004085,stroke-width:2px;
```
