# facusole/facundo-portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- The project is a front-end portfolio website built with Astro. Its purpose is to showcase the developer’s skills, projects, and personal profile.

##### Analyzing the File Structure
- At the top level, you have configuration files (package.json, tsconfig.json, astro.config.mjs, etc.) that set up the environment.
- The public directory holds static assets (images of various sizes for desktop, mobile, tablet) that represent visual content for the site.
- The src directory is divided into subdirectories:
- components: Contains reusable UI elements (e.g., AboutMe, Contact, Hero, Navbar, ProjectsContainer, Cards, CTAs, etc.).
- data: Includes static data files (for footer links, navbar links, projects), which are likely used to render dynamic content within components.
- layouts: Contains layout components (MainLayout, ProjectsLayout) which provide a common wrapper or structure for pages.
- pages: Contains the route-specific pages (homepage, about-me, projects) that use layouts and components.
- A small integration of React is noted in the SVGAnimated.jsx file, indicating that although Astro is used, it might incorporate React components.

##### Key Components and Their Interactions
a. Main Components:
- Frontend/UI Pages: Located in src/pages for different sections (home, about-me, projects).
- Layouts: Wrap pages and manage global UI structure (e.g., header and footer via MainLayout).
- Reusable Components: Such as Navbar, Hero, ProjectsContainer, Footer, etc., in src/components.
- Static Assets: Stored in public for images and other static content.
- Data Sources: In src/data for dynamic content used across components.

b. Relationships and Data Flow:
- Pages call upon Layouts to provide a consistent UI frame.
- Layouts import multiple Components (Navbar, Footer, etc.) to render specific sections.
- Components render content dynamically by consuming data from the data folder.
- The Astro framework ties the file-based routing (from src/pages) to the layout and component layers.
- Configuration files and build scripts (e.g., astro.config.mjs, tsconfig.json) support project compilation and deployment.
- Public assets are referenced by components or pages, ensuring that multimedia content is served correctly.

##### Key Architectural Patterns
- Component-based design: Many small, reusable components enable modular UI building.
- Layout abstraction: Using shared layouts (MainLayout, ProjectsLayout) to wrap individual pages.
- File-based routing: Letting Astro’s convention-over-configuration manage page routing.
- Separation of concerns: Clear distinction between data (src/data), presentation (src/components and layouts), and static assets (public).

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Astro Portfolio Website"
        %% Pages/Routes Subgraph
        subgraph "Pages/Routes"
            Index["index.astro"]:::pages
            AboutMePage["about-me.astro"]:::pages
            ProjectsPage["projects.astro"]:::pages
        end

        %% Layouts Subgraph
        subgraph "Layouts"
            MainLayout["MainLayout.astro"]:::layouts
            ProjectsLayout["ProjectsLayout.astro"]:::layouts
        end

        %% UI Components Subgraph
        subgraph "UI Components"
            subgraph "General Components"
                AboutMeComp["AboutMe.astro"]:::components
                ContactComp["Contact.astro"]:::components
                FooterComp["Footer.astro"]:::components
                HeroComp["Hero.astro"]:::components
                NavbarComp["Navbar.astro"]:::components
                ProjectsContainerComp["ProjectsContainer.astro"]:::components
                SelectedProjectsComp["SelectedProjects.astro"]:::components
                SkillsComp["Skills.astro"]:::components
                TestimonialsComp["Testimonials.astro"]:::components
            end
            subgraph "Card Components"
                CardComp["Card.astro"]:::components
            end
            subgraph "CTA Components"
                CTAComp["CTA.astro"]:::components
            end
            subgraph "Small Card Components"
                SmallCardComp["SmallCard.astro"]:::components
            end
            subgraph "Tag Label Components"
                TagLabelComp["TagLabel.astro"]:::components
            end
            subgraph "Testimony Components"
                TestimonyComp["Testimony.astro"]:::components
            end
            subgraph "React Integration"
                SVGAnimated["SVGAnimated.jsx"]:::components
            end
        end

        %% Data Layer Subgraph
        subgraph "Data Layer"
            FooterLinks["footer_links.ts"]:::data
            NavbarLinks["navbar_links.ts"]:::data
            ProjectsData["projects.ts"]:::data
        end

        %% Static Assets Subgraph
        subgraph "Static Assets"
            Assets["public/assets"]:::assets
        end

        %% Project Configuration Subgraph
        subgraph "Project Configuration"
            AstroConfig["astro.config.mjs"]:::config
            PackageJSON["package.json"]:::config
            Tsconfig["tsconfig.json"]:::config
        end
    end

    %% Connections from Pages to Layouts
    Index -->|"wraps"| MainLayout
    AboutMePage -->|"wraps"| MainLayout
    ProjectsPage -->|"wraps"| ProjectsLayout

    %% Connections from Layouts to UI Components
    MainLayout -->|"includes"| NavbarComp
    MainLayout -->|"includes"| FooterComp
    ProjectsLayout -->|"includes"| ProjectsContainerComp

    %% Connections from UI Components to Data Layer
    NavbarComp -->|"reads"| NavbarLinks
    FooterComp -->|"reads"| FooterLinks
    ProjectsContainerComp -->|"renders"| ProjectsData

    %% Connections from UI Components to Static Assets
    HeroComp -->|"uses"| Assets
    FooterComp -->|"uses"| Assets

    %% Click Events for Pages/Routes
    click Index "https://github.com/facusole/facundo-portfolio/blob/master/src/pages/index.astro"
    click AboutMePage "https://github.com/facusole/facundo-portfolio/blob/master/src/pages/about-me.astro"
    click ProjectsPage "https://github.com/facusole/facundo-portfolio/blob/master/src/pages/projects.astro"

    %% Click Events for Layouts
    click MainLayout "https://github.com/facusole/facundo-portfolio/blob/master/src/layouts/MainLayout.astro"
    click ProjectsLayout "https://github.com/facusole/facundo-portfolio/blob/master/src/layouts/ProjectsLayout.astro"

    %% Click Events for UI Components - General Components
    click AboutMeComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/AboutMe.astro"
    click ContactComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/Contact.astro"
    click FooterComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/Footer.astro"
    click HeroComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/Hero.astro"
    click NavbarComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/Navbar.astro"
    click ProjectsContainerComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/ProjectsContainer.astro"
    click SelectedProjectsComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/SelectedProjects.astro"
    click SkillsComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/Skills.astro"
    click TestimonialsComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/Testimonials.astro"

    %% Click Events for UI Components - Card Components
    click CardComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/card/Card.astro"

    %% Click Events for UI Components - CTA Components
    click CTAComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/cta/CTA.astro"

    %% Click Events for UI Components - Small Card Components
    click SmallCardComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/smallCard/SmallCard.astro"

    %% Click Events for UI Components - Tag Label Components
    click TagLabelComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/tagLabel/TagLabel.astro"

    %% Click Events for UI Components - Testimony Components
    click TestimonyComp "https://github.com/facusole/facundo-portfolio/blob/master/src/components/testimony/Testimony.astro"

    %% Click Event for UI Components - React Integration
    click SVGAnimated "https://github.com/facusole/facundo-portfolio/blob/master/src/components/SVGAnimated.jsx"

    %% Click Events for Data Layer
    click FooterLinks "https://github.com/facusole/facundo-portfolio/blob/master/src/data/footer_links.ts"
    click NavbarLinks "https://github.com/facusole/facundo-portfolio/blob/master/src/data/navbar_links.ts"
    click ProjectsData "https://github.com/facusole/facundo-portfolio/blob/master/src/data/projects.ts"

    %% Click Event for Static Assets
    click Assets "https://github.com/facusole/facundo-portfolio/tree/master/public/assets"

    %% Click Events for Project Configuration
    click AstroConfig "https://github.com/facusole/facundo-portfolio/blob/master/astro.config.mjs"
    click PackageJSON "https://github.com/facusole/facundo-portfolio/blob/master/package.json"
    click Tsconfig "https://github.com/facusole/facundo-portfolio/blob/master/tsconfig.json"

    %% Styles
    classDef pages fill:#BBDEFB,stroke:#0D47A1,stroke-width:2px;
    classDef layouts fill:#C8E6C9,stroke:#1B5E20,stroke-width:2px;
    classDef components fill:#FFECB3,stroke:#FF6F00,stroke-width:2px;
    classDef data fill:#FFCDD2,stroke:#B71C1C,stroke-width:2px;
    classDef assets fill:#D1C4E9,stroke:#4A148C,stroke-width:2px;
    classDef config fill:#B2DFDB,stroke:#00695C,stroke-width:2px;
```
