# davidmariolc/portafolio architecture

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

- Interactive diagram: https://gitdiagram.com/davidmariolc/portafolio
- Repository: https://github.com/davidmariolc/portafolio

## Overview

##### Project Type Analysis
This is a Next.js-based personal portfolio website with React components, featuring a modern frontend architecture. It's a static site with some dynamic features like email functionality and dark mode support.

##### Main Components

A. Client-Side Layer:
- Sub-components:
- Pages (Home, API routes)
- Component Library
- Styling System
- Context API (for Dark Mode)

B. Next.js Framework Layer:
- Static Site Generation (SSG)
- File-based Routing
- API Routes

C. External Services:
- Email Service Integration

**┌─────────────────────────────────────┐**
- Client Layer                        │
- ┌─────────────┐    ┌─────────────┐ │
- Pages     │    │  Components │ │
- ┘    └─────────────┘ │
- ┌─────────────┐    ┌─────────────┐ │
- Styles    │    │  Context    │ │
- ┘    └─────────────┘ │
- ┘
- ↑
**┌─────────────────────────────────────┐**
- Next.js Framework Layer             │
- ┘
- ↑
**┌─────────────────────────────────────┐**
- External Services Layer             │
- ┘

##### Component Organization

**Components**
- Layout Components
- Header
- Footer
- Wrapper
- Feature Components
- Hero
- About
- Projects
- Technologies
- Contact
- UI Components
- Title
- ProjectCard
- SliderProjects
- Shared Components
- Decoration
- Socials

##### Data Flow Indicators

- User interaction flows
- Component composition
- Data flow through Context API
- API route communications

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Pages["Pages Layer"]
        MainPage["Main Page"]
        ApiRoutes["API Routes"]
        AppConfig["App Configuration"]
        
        subgraph Components
            direction TB
            
            subgraph LayoutComponents["Layout Components"]
                Header["Header"]
                Footer["Footer"]
                Wrapper["Wrapper"]
            end
            
            subgraph FeatureComponents["Feature Components"]
                Hero["Hero Section"]
                About["About Section"]
                Projects["Projects Section"]
                Technologies["Technologies Section"]
                Contact["Contact Section"]
            end
            
            subgraph UIComponents["UI Components"]
                Title["Title"]
                ProjectCard["Project Card"]
                SliderProjects["Slider Projects"]
            end
            
            subgraph SharedComponents["Shared Components"]
                Decoration["Decoration"]
                Socials["Socials"]
            end
        end
        
        subgraph Styling
            GlobalStyles["Global Styles"]
            AppStyles["App Styles"]
            ComponentStyles["Component Styles"]
        end
        
        subgraph Assets
            ProjectAssets["Project Assets"]
            TechAssets["Technology Stack Assets"]
            Fonts["Fonts"]
        end
    end
    
    subgraph NextFramework["Next.js Framework Layer"]
        SSG["Static Site Generation"]
        FileRouting["File-based Routing"]
        APIRoutes["API Routes Handler"]
    end
    
    subgraph External["External Services Layer"]
        EmailService["Email Service"]
    end
    
    %% Relationships
    Pages --> MainPage
    Pages --> ApiRoutes
    Pages --> AppConfig
    
    Components --> Pages
    Styling --> Components
    Assets --> Components
    
    Contact --> EmailService
    APIRoutes --> EmailService
    
    %% Click events
    click Pages "https://github.com/DavidMarioLC/Portafolio/tree/main/pages"
    click MainPage "https://github.com/DavidMarioLC/Portafolio/blob/main/pages/index.js"
    click ApiRoutes "https://github.com/DavidMarioLC/Portafolio/blob/main/pages/api/hello.js"
    click AppConfig "https://github.com/DavidMarioLC/Portafolio/blob/main/pages/_app.js"
    click Header "https://github.com/DavidMarioLC/Portafolio/blob/main/components/Header/Header.jsx"
    click Footer "https://github.com/DavidMarioLC/Portafolio/blob/main/components/Footer/Footer.jsx"
    click Wrapper "https://github.com/DavidMarioLC/Portafolio/blob/main/components/Wrapper/Wrapper.jsx"
    click Hero "https://github.com/DavidMarioLC/Portafolio/blob/main/components/Hero/Hero.jsx"
    click About "https://github.com/DavidMarioLC/Portafolio/blob/main/components/About/About.jsx"
    click Projects "https://github.com/DavidMarioLC/Portafolio/blob/main/components/Projects/Projects.jsx"
    click Technologies "https://github.com/DavidMarioLC/Portafolio/blob/main/components/Technologies/Technologies.jsx"
    click Contact "https://github.com/DavidMarioLC/Portafolio/blob/main/components/Contact/Contact.jsx"
    click Title "https://github.com/DavidMarioLC/Portafolio/blob/main/components/Title/Title.jsx"
    click ProjectCard "https://github.com/DavidMarioLC/Portafolio/blob/main/components/ProjectCard/ProjectCard.jsx"
    click SliderProjects "https://github.com/DavidMarioLC/Portafolio/blob/main/components/SliderProjects/SliderProjects.jsx"
    click Decoration "https://github.com/DavidMarioLC/Portafolio/blob/main/components/Decoration/Decoration.jsx"
    click Socials "https://github.com/DavidMarioLC/Portafolio/blob/main/components/Socials/Socials.jsx"
    click GlobalStyles "https://github.com/DavidMarioLC/Portafolio/blob/main/styles/globals.css"
    click AppStyles "https://github.com/DavidMarioLC/Portafolio/blob/main/styles/App.scss"
    click ProjectAssets "https://github.com/DavidMarioLC/Portafolio/tree/main/public/projects"
    click TechAssets "https://github.com/DavidMarioLC/Portafolio/tree/main/public/stack"
    click Fonts "https://github.com/DavidMarioLC/Portafolio/tree/main/public/fonts"
    
    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef framework fill:#b8d4ff,stroke:#333
    classDef component fill:#d4ffb8,stroke:#333
    classDef external fill:#ffb8d4,stroke:#333
    classDef styling fill:#f0f0f0,stroke:#333
    
    class NextFramework,SSG,FileRouting,APIRoutes framework
    class Components,LayoutComponents,FeatureComponents,UIComponents,SharedComponents component
    class External,EmailService external
    class Styling,GlobalStyles,AppStyles,ComponentStyles styling
```
