# raulrls/astro-shadcn-portfolio architecture

> Architecture diagram of the GitHub repository raulrls/astro-shadcn-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/raulrls/astro-shadcn-portfolio
- Repository: https://github.com/raulrls/astro-shadcn-portfolio

## Overview

##### Project Type & Purpose
- This is a modern front-end, single-page (or multi-page) personal portfolio website designed to showcase projects, experience, and skills.
- It leverages Astro as the core framework, integrates React-based UI components (from Shadcn), and uses a data-driven approach (with files under /data) to manage content dynamically.
- The README emphasizes learning modern front-end techniques, API/data integration via configuration files, and deployment on Vercel.

##### Analyzing the File Structure
- Top-level files and directories:
- The presence of configuration files (astro.config.mjs, tailwind.config.mjs, tsconfig.json) indicates a strongly-typed, modern development environment.
- The /public directory suggests that static assets are served from there.
- The /src directory is where the bulk of the application lives, organized into:
▸ /components: Contains UI components like Experience, Footer, Hero, PortfolioFeed, and a dedicated /ui directory with a plethora of UI elements (accordion, button, carousel, etc.).
▸ /data: Holds configuration and content files (experienceData, footerData, heroData, portfolioData) that drive dynamic content.
▸ /layouts: Contains layout files (Layout.astro) that act as wrappers for pages.
▸ /pages: Contains route-specific page files (index.astro as the home page).
▸ /styles: Contains global CSS styling.
▸ /hooks and /lib: Utility hooks and functions (e.g., use-toast, utils.ts) that likely support component logic.

- Central role of the Astro framework, depicting how it ties together layout, data, and components.
- Integration points—especially where React-based Shadcn UI components are being used inside Astro pages.
- That the project is highly modular with the “/data” files driving dynamic content, allowing the portfolio to be easily customizable.

- The Frontend (Astro pages, layouts, components),
- Data sources (configuration and content files),
- Reusable UI libraries especially centered on Shadcn components,
- And the overall data flow from configuration to visual presentation.

This detailed representation will help ensure that every key aspect of the project’s architecture is captured, making it easier for future modifications or scaling.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Application Layer
    subgraph "Frontend Application Layer"
        Astro["Astro Engine\n(astro.config.mjs, tsconfig.json)"]:::frontend
        Index["Index Page\n(src/pages/index.astro)"]:::frontend
        Layout["Layout\n(src/layouts/Layout.astro)"]:::frontend
        Astro -->|"renders"| Index
        Index -->|"uses"| Layout
    end

    %% UI Components Layer
    subgraph "UI Components"
        Hero["Hero Component\n(src/components/Hero.tsx)"]:::component
        Experience["Experience Component\n(src/components/Experience.tsx)"]:::component
        Portfolio["PortfolioFeed Component\n(src/components/PortfolioFeed.tsx)"]:::component
        Footer["Footer Component\n(src/components/Footer.tsx)"]:::component

        Layout -->|"composes"| Hero
        Layout -->|"composes"| Experience
        Layout -->|"composes"| Portfolio
        Layout -->|"composes"| Footer

        subgraph "Reusable UI Library"
            UI["Shadcn UI Library\n(src/components/ui)"]:::component
        end
        Hero -->|"integrates"| UI
        Experience -->|"integrates"| UI
        Portfolio -->|"integrates"| UI
        Footer -->|"integrates"| UI
    end

    %% Data Layer
    subgraph "Data Layer"
        Data["Config & Content Files\n(src/data)"]:::data
    end

    %% Assets & Styles
    subgraph "Assets & Styles"
        Assets["Static Assets\n(public)"]:::assets
        Styles["Global Styles\n(src/styles/globals.css & tailwind.config.mjs)"]:::assets
    end

    %% Utility Functions & Hooks
    subgraph "Utility Functions & Hooks"
        Hooks["Hooks\n(src/hooks)"]:::utility
        Utils["Utility Functions\n(src/lib/utils.ts)"]:::utility
    end

    %% Deployment & Hosting
    subgraph "Deployment"
        Vercel["Vercel Deployment"]:::deployment
    end

    %% Data flow from Data Layer to UI Components
    Data -->|"supplies"| Hero
    Data -->|"supplies"| Experience
    Data -->|"supplies"| Portfolio
    Data -->|"supplies"| Footer

    %% Utility dependencies for UI Components
    Hooks -->|"supports"| Hero
    Hooks -->|"supports"| Footer
    Utils -->|"supports"| Experience
    Utils -->|"supports"| Portfolio

    %% Global integration & styling
    Styles -->|"styles"| Astro
    Assets -->|"assets to"| Hero

    %% Integration of React-based UI into Astro
    Astro -->|"integrates"| UI

    %% Deployment connection
    Astro -->|"deployed on"| Vercel

    %% Click Events
    click Astro "https://github.com/raulrls/astro-shadcn-portfolio/blob/main/astro.config.mjs"
    click Index "https://github.com/raulrls/astro-shadcn-portfolio/blob/main/src/pages/index.astro"
    click Layout "https://github.com/raulrls/astro-shadcn-portfolio/blob/main/src/layouts/Layout.astro"
    click Hero "https://github.com/raulrls/astro-shadcn-portfolio/blob/main/src/components/Hero.tsx"
    click Experience "https://github.com/raulrls/astro-shadcn-portfolio/blob/main/src/components/Experience.tsx"
    click Portfolio "https://github.com/raulrls/astro-shadcn-portfolio/blob/main/src/components/PortfolioFeed.tsx"
    click Footer "https://github.com/raulrls/astro-shadcn-portfolio/blob/main/src/components/Footer.tsx"
    click UI "https://github.com/raulrls/astro-shadcn-portfolio/tree/main/src/components/ui"
    click Data "https://github.com/raulrls/astro-shadcn-portfolio/tree/main/src/data"
    click Assets "https://github.com/raulrls/astro-shadcn-portfolio/tree/main/public"
    click Styles "https://github.com/raulrls/astro-shadcn-portfolio/blob/main/src/styles/globals.css"
    click Hooks "https://github.com/raulrls/astro-shadcn-portfolio/tree/main/src/hooks"
    click Utils "https://github.com/raulrls/astro-shadcn-portfolio/blob/main/src/lib/utils.ts"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#004085,stroke-width:2px,color:#004085;
    classDef component fill:#d4edda,stroke:#155724,stroke-width:2px,color:#155724;
    classDef data fill:#fff3cd,stroke:#856404,stroke-width:2px,color:#856404;
    classDef assets fill:#f8d7da,stroke:#721c24,stroke-width:2px,color:#721c24;
    classDef utility fill:#e2e3e5,stroke:#6c757d,stroke-width:2px,color:#6c757d;
    classDef deployment fill:#d1ecf1,stroke:#0c5460,stroke-width:2px,color:#0c5460;
```
