# marianaaa05/portafolio-astro architecture

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

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

## Overview

##### Main Components
- Astro Framework & Build Process: Represent how Astro compiles .astro and .md files in the src/pages directory into routes and then bundles everything for production. Include the role of astro.config.mjs and package.json (which defines dependencies and scripts for commands such as npm run dev, build, etc.).
- Static Assets & Public Folder: Show the public/ directory that holds static files like images (e.g., favicon.svg) or any other assets that do not require processing.
- Source Code Structure:
- Pages: The src/pages folder which maps file names to routes (e.g., index.astro).
- Layouts: The src/layouts directory, exemplified by Layout.astro, which acts as the overall template for page rendering.
- Data Files: The src/cv.json file may house structured data (presumably content) used by the site.

##### Relationships and Interactions
- How data from cv.json might be injected into components as props or context during rendering.

##### Architectural Patterns and Design Principles
- Component-based Architecture in which UI pieces are modularized. The clear separation between pages, layouts, and components follows modern UI development practices.
- Static Site Generation (SSG) model: Astro uses its configuration and the project’s file structure to automatically generate routes.
- If applicable, note any design patterns like separation of concerns (layout vs. content vs. components).

##### Relevant Technologies and Tools
- Astro as the core framework and build tool.
- Usage of .astro files (a mix of HTML, JavaScript/TypeScript, and framework-like components).
- npm for dependency management and using package.json for scripts.
- TypeScript hints (e.g., tsconfig.json and the env.d.ts file) which suggest type-checking.
- Version control with .gitignore and the use of .vscode configuration for development.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Layer 1: Final Output and User Interaction
    U("User/Client"):::user
    CS("Compiled Site (dist)"):::compiled

    %% Layer 2: Build Process
    BC("Astro Compiler/Build Engine"):::build

    %% Layer 3: Source Code
    subgraph "Configuration"
        AC("Astro Config"):::config
        PM("Package Manager"):::config
        TS("TypeScript Config"):::config
    end

    subgraph "Static Assets"
        PA("Public Assets"):::assets
    end

    subgraph "App Structure"
        PAGES("Pages (Routes)"):::structure
        LAYOUT("Layout Template"):::structure
        KBM("KeyBoard Manager"):::structure
        SECTIONGEN("Section Component"):::structure
        subgraph "Section-Specific Components"
            ABOUT("About Section"):::structure
            EDUCATION("Education Section"):::structure
            EXPERIENCE("Experience Section"):::structure
            HERO("Hero Section"):::structure
            PROJECTS("Projects Section"):::structure
            SKILLS("Skills Section"):::structure
        end
        ICONS("Icons Library"):::structure
        DATA("CV Data"):::structure
    end

    %% Data Flow in App Structure
    PAGES -->|"uses"| LAYOUT
    LAYOUT -->|"includes"| KBM
    LAYOUT -->|"includes"| SECTIONGEN
    DATA -->|"injects"| ABOUT
    DATA -->|"injects"| EDUCATION
    DATA -->|"injects"| EXPERIENCE
    DATA -->|"injects"| HERO
    DATA -->|"injects"| PROJECTS
    DATA -->|"injects"| SKILLS
    ICONS -->|"supports"| SECTIONGEN

    %% Source Code feeds Build Process
    AC -->|"feeds"| BC
    PM -->|"feeds"| BC
    TS -->|"feeds"| BC
    PA -->|"feeds"| BC
    PAGES -->|"feeds"| BC
    LAYOUT -->|"feeds"| BC
    KBM -->|"feeds"| BC
    SECTIONGEN -->|"feeds"| BC
    ABOUT -->|"feeds"| BC
    EDUCATION -->|"feeds"| BC
    EXPERIENCE -->|"feeds"| BC
    HERO -->|"feeds"| BC
    PROJECTS -->|"feeds"| BC
    SKILLS -->|"feeds"| BC
    ICONS -->|"feeds"| BC
    DATA -->|"feeds"| BC

    %% Build Process produces the Final Output
    BC -->|"builds"| CS

    %% User Interaction with the Final Output
    U -->|"accesses"| CS

    %% Click Events for Configuration
    click AC "https://github.com/marianaaa05/portafolio-astro/blob/main/astro.config.mjs"
    click PM "https://github.com/marianaaa05/portafolio-astro/blob/main/package.json"
    click TS "https://github.com/marianaaa05/portafolio-astro/blob/main/tsconfig.json"

    %% Click Event for Static Assets
    click PA "https://github.com/marianaaa05/portafolio-astro/tree/main/public/"

    %% Click Events for App Structure
    click PAGES "https://github.com/marianaaa05/portafolio-astro/tree/main/src/pages"
    click LAYOUT "https://github.com/marianaaa05/portafolio-astro/blob/main/src/layouts/Layout.astro"
    click KBM "https://github.com/marianaaa05/portafolio-astro/blob/main/src/components/KeyBoardManager.astro"
    click SECTIONGEN "https://github.com/marianaaa05/portafolio-astro/blob/main/src/components/Section.astro"
    click ABOUT "https://github.com/marianaaa05/portafolio-astro/blob/main/src/components/section/About.astro"
    click EDUCATION "https://github.com/marianaaa05/portafolio-astro/blob/main/src/components/section/Education.astro"
    click EXPERIENCE "https://github.com/marianaaa05/portafolio-astro/blob/main/src/components/section/Experience.astro"
    click HERO "https://github.com/marianaaa05/portafolio-astro/blob/main/src/components/section/Hero.astro"
    click PROJECTS "https://github.com/marianaaa05/portafolio-astro/blob/main/src/components/section/Projects.astro"
    click SKILLS "https://github.com/marianaaa05/portafolio-astro/blob/main/src/components/section/Skills.astro"
    click ICONS "https://github.com/marianaaa05/portafolio-astro/tree/main/src/icons/"
    click DATA "https://github.com/marianaaa05/portafolio-astro/blob/main/src/cv.json"

    %% Styles
    classDef user fill:#A2D9CE,stroke:#1E8449,stroke-width:2px;
    classDef compiled fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef build fill:#F5CBA7,stroke:#C0392B,stroke-width:2px;
    classDef config fill:#D2B4DE,stroke:#8E44AD,stroke-width:2px;
    classDef assets fill:#AED6F1,stroke:#2471A3,stroke-width:2px;
    classDef structure fill:#FAD7A0,stroke:#D35400,stroke-width:2px;
```
