# llanesluis/portfolio architecture

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

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

## Overview

##### Main Architecture Components

a) Client-Side Layer
- Static site generation aspect (Astro's key feature)
- Component architecture
- Routing system

b) Build/Compilation Layer
- Demonstrate Astro's build process
- Integration with other frameworks (React/TypeScript)

c) Asset/Static Content Layer
- Public assets handling
- Static file serving

##### Component Organization

Create distinct sections for:

a) Core Components Structure
- Global components (/src/components/global/*)
- Section components (/src/components/sections/*)
- Helper components (/src/components/helpers/*)

b) Layout System
- RootLayout.astro as the main wrapper
- Page templates

##### Specific Implementation Details

a) Data Flow
- How constants (from /src/constants/*) feed into components
- Demonstrate the routing structure from /src/pages
- Form handling (ContactForm.tsx)

b) Styling System
- Tailwind CSS integration
- Global styles
- Theme switching mechanism

**┌─ Build Time ─────────────────────┐**
- Astro Build Process              │
- TypeScript Compilation           │
- Tailwind CSS Processing         │
- ┘

**┌─ Runtime ──────────────────────┐**
- Static Site Serving            │
- Client-side Interactivity     │
- Theme Switching               │
- ┘

**┌─ Components ────────────────────┐**
- Global Components              │
- Section Components            │
- Helper Components            │
- ┘

##### Key Relationships to Highlight

- How RootLayout.astro wraps all pages
- Demonstrate the relationship between sections and their components
- Theme control system's integration
- Form submission flow in the contact section

##### Technical Stack Indicators

- Astro
- React
- TypeScript
- Tailwind CSS
- Other integrated technologies

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Build Time"
        Build["Astro Build Process"]
        TSC["TypeScript Compilation"]
        TailwindBuild["Tailwind CSS Processing"]
        AstroConfig["Astro Config"]
        TSConfig["TypeScript Config"]
        
        Build --> TSC
        Build --> TailwindBuild
    end

    subgraph "Runtime"
        StaticServe["Static Site Serving"]
        ClientInt["Client-side Interactivity"]
        ThemeSwitch["Theme System"]
    end

    subgraph "Core Components"
        RootLayout["Root Layout"]
        
        subgraph "Component Types"
            Global["Global Components"]
            Sections["Section Components"]
            Helpers["Helper Components"]
            Icons["Icon Components"]
        end
        
        subgraph "Main Sections"
            Hero["Hero Section"]
            About["About Section"]
            Projects["Projects Section"]
            Experience["Experience Section"]
            Contact["Contact Section"]
        end
    end

    subgraph "Data Layer"
        Constants["Constants"]
        Utils["Utilities"]
        Actions["Actions"]
    end

    subgraph "Styling"
        TailwindConfig["Tailwind Config"]
        GlobalStyles["Global Styles"]
        ThemeControl["Theme Control"]
        ThemeToggle["Theme Toggle"]
    end

    subgraph "Assets"
        StaticAssets["Static Assets"]
    end

    RootLayout --> Global
    RootLayout --> Sections
    Sections --> Hero
    Sections --> About
    Sections --> Projects
    Sections --> Experience
    Sections --> Contact
    Global --> ThemeControl
    Helpers --> ThemeToggle
    ThemeControl --> ThemeToggle
    ThemeToggle --> ThemeSwitch
    Contact --> Actions

    %% Click events for component mapping
    click RootLayout "https://github.com/llanesluis/portfolio/blob/main/src/layouts/RootLayout.astro"
    click Global "https://github.com/llanesluis/portfolio/tree/main/src/components/global/"
    click Sections "https://github.com/llanesluis/portfolio/tree/main/src/components/sections/"
    click Icons "https://github.com/llanesluis/portfolio/tree/main/src/components/icons/"
    click Helpers "https://github.com/llanesluis/portfolio/tree/main/src/components/helpers/"
    click Constants "https://github.com/llanesluis/portfolio/tree/main/src/constants/"
    click Actions "https://github.com/llanesluis/portfolio/tree/main/src/actions/"
    click Utils "https://github.com/llanesluis/portfolio/blob/main/src/lib/utils.ts"
    click GlobalStyles "https://github.com/llanesluis/portfolio/blob/main/src/styles/globals.css"
    click TailwindConfig "https://github.com/llanesluis/portfolio/blob/main/tailwind.config.mjs"
    click ThemeControl "https://github.com/llanesluis/portfolio/blob/main/src/components/global/ThemeControl.astro"
    click ThemeToggle "https://github.com/llanesluis/portfolio/blob/main/src/components/helpers/ThemeToggle.astro"
    click Contact "https://github.com/llanesluis/portfolio/blob/main/src/components/sections/ContactMe.astro"
    click Hero "https://github.com/llanesluis/portfolio/blob/main/src/components/sections/Hero.astro"
    click About "https://github.com/llanesluis/portfolio/blob/main/src/components/sections/AboutMe.astro"
    click Projects "https://github.com/llanesluis/portfolio/blob/main/src/components/sections/Projects.astro"
    click Experience "https://github.com/llanesluis/portfolio/blob/main/src/components/sections/Experience.astro"
    click StaticAssets "https://github.com/llanesluis/portfolio/tree/main/public/"
    click AstroConfig "https://github.com/llanesluis/portfolio/blob/main/astro.config.mjs"
    click TSConfig "https://github.com/llanesluis/portfolio/blob/main/tsconfig.json"

    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px;
    classDef astro fill:#7e57c2,color:white;
    classDef react fill:#61dafb,color:black;
    classDef static fill:#ffb74d,color:black;
    classDef config fill:#fff176,color:black;
    classDef runtime fill:#81c784,color:black;

    class RootLayout,Global,Sections,Hero,About,Projects,Experience,Contact,ThemeControl,ThemeToggle astro;
    class Actions,Utils react;
    class StaticAssets static;
    class AstroConfig,TSConfig,TailwindConfig config;
    class StaticServe,ClientInt,ThemeSwitch runtime;
```
