# richardcastiblancoo/portafolio architecture

> Architecture diagram of the GitHub repository richardcastiblancoo/portafolio, 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/richardcastiblancoo/portafolio
- Repository: https://github.com/richardcastiblancoo/portafolio

## Overview

##### Main Components Identification
- Frontend (Static Site): This is the heart of the project, built with Astro. It includes the pages, layouts, and components that render the portfolio.
- Components Layer: Under src/components, each component (e.g., About.astro, Certificados.astro, Experiencia.astro, etc.) represents a self-contained UI element for different sections.
- Layouts: In src/layouts, the Layout.astro file acts as the skeleton/template used by various pages to maintain a consistent structure.
- Pages: Located in src/pages, these represent individual routes (with index.astro as the landing page) that combine layouts and components.
- Public Assets: The public directory holds static resources like images (for instance, the preview image and "hoja de vida.pdf") that the site uses.
- Configuration/Build: Files such as astro.config.mjs, package.json, and tsconfig.json define the project’s build settings, dependencies, and TypeScript configuration.

##### Relationships and Interactions
- The Pages use Layouts to maintain consistency across the site.
- The Layouts embed various Components to render specific portfolio sections (such as About, Proyectos, Experiencia, etc.).
- The build process (managed by Astro) takes the React and Astro components and generates static HTML files.
- Public assets are referenced within the pages and components to display images and downloadable files.
- Data and interactions are mostly handled at compile-time; thus, the flow is principally from source code (pages/layouts/components) to static generated output.

##### Key Architectural Patterns and Design Principles
- Component-Based Architecture: Each UI segment is modularized into its own component to promote reusability.
- Separation of Concerns: The structure separates concerns into pages (routing), layouts (common design), and components (individual UI pieces).
- Static Site Generation: Astro’s philosophy allows for pre-rendering pages, leading to faster load times and better SEO.
- Responsive Design: Modern design principles ensuring the portfolio adapts to various screen sizes.

##### Relevant Technologies to Highlight
- Astro: As the Static Site Generator.
- React (and possibly TypeScript): As used within the components.
- Node.js and npm: For development environment and building the project.
- Deployment Platforms (e.g., Vercel, Netlify): Mention that the built site is ready for deployment on these platforms.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Source Code Layer
    subgraph "Source Code"
        A["Frontend (Static Site)"]:::frontend
        subgraph "Pages Layer"
            B["src/pages/index.astro"]:::frontend
        end
        subgraph "Layouts"
            C["src/layouts/Layout.astro"]:::layout
        end
        subgraph "Components"
            D["About.astro"]:::components
            E["Certificados.astro"]:::components
            F["Experiencia.astro"]:::components
            G["Footer.astro"]:::components
            H["Header.astro"]:::components
            I["Proyectos.astro"]:::components
            J["Tecnologia.astro"]:::components
        end
        K["Public Assets"]:::publicAssets
        subgraph "Configuration/Build"
            L["astro.config.mjs"]:::config
            M["package.json"]:::config
            N["tsconfig.json"]:::config
        end
    end

    %% Build Process and Output
    O(["Build with Astro"]):::process
    P(["Static Site (Static HTML)"]):::output

    %% Relationships: Source Code Relationships
    B -->|"uses"| C
    C -->|"embeds"| D
    C -->|"embeds"| E
    C -->|"embeds"| F
    C -->|"embeds"| G
    C -->|"embeds"| H
    C -->|"embeds"| I
    C -->|"embeds"| J

    %% Overall flow to build process
    A --> O
    K --> O
    L --> O
    M --> O
    N --> O
    O --> P

    %% Click Events
    click A "https://github.com/richardcastiblancoo/portafolio/tree/main/src/"
    click B "https://github.com/richardcastiblancoo/portafolio/blob/main/src/pages/index.astro"
    click C "https://github.com/richardcastiblancoo/portafolio/blob/main/src/layouts/Layout.astro"
    click D "https://github.com/richardcastiblancoo/portafolio/blob/main/src/components/About.astro"
    click E "https://github.com/richardcastiblancoo/portafolio/blob/main/src/components/Certificados.astro"
    click F "https://github.com/richardcastiblancoo/portafolio/blob/main/src/components/Experiencia.astro"
    click G "https://github.com/richardcastiblancoo/portafolio/blob/main/src/components/Footer.astro"
    click H "https://github.com/richardcastiblancoo/portafolio/blob/main/src/components/Header.astro"
    click I "https://github.com/richardcastiblancoo/portafolio/blob/main/src/components/Proyectos.astro"
    click J "https://github.com/richardcastiblancoo/portafolio/blob/main/src/components/Tecnologia.astro"
    click K "https://github.com/richardcastiblancoo/portafolio/tree/main/public/"
    click L "https://github.com/richardcastiblancoo/portafolio/blob/main/astro.config.mjs"
    click M "https://github.com/richardcastiblancoo/portafolio/blob/main/package.json"
    click N "https://github.com/richardcastiblancoo/portafolio/blob/main/tsconfig.json"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef layout fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef components fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef publicAssets fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
    classDef config fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef process fill:#e2e3e5,stroke:#6c757d,stroke-width:2px;
    classDef output fill:#c3e6cb,stroke:#155724,stroke-width:2px;
```
