# nicholaslhq/astro-portfolio architecture

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

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

## Overview

##### Main Components

a) Build-time Components:
- Content Layer (MDX Files)
- Astro Static Site Generator
- Build Output

b) Runtime Components:
- Static Assets
- Client-side React Components
- Browser Runtime

##### Component Relationships

- Content flow from MDX files to built pages
- Component inheritance and composition
- Data flow between static and dynamic parts
- Build-time vs. Runtime processes

##### Specific Implementation Details

Key architectural elements:
**┌─ Content Layer ─────────────────┐**
- MDX Content                   │
- Profile Data                  │
- Static Assets                 │
- ┬────────────────┘
- ↓
**┌─ Astro Build Process ──────────┐**
- ┌─ Components ─┐ ┌─ Layouts ─┐ │
- Base       │ │ - Base    │ │
- UI         │ │ - MDX     │ │
- Sections   │ │ - Page    │ │
- ┘ └───────────┘ │
- ┬────────────────┘
- ↓
**┌─ Runtime Layer ────────────────┐**
- Static HTML                  │
- Hydrated React Components    │
- Client-side Interactivity   │
- ┘

##### Technical Details

Annotations for:
- Build optimization processes
- Client-side hydration points
- Static asset handling
- Content collection configuration
- Responsive design implementation

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Content
        MDX["MDX Content"]
        PD["Profile Data"]
        SA["Static Assets"]
    end

    subgraph BuildProcess
        direction TB
        BC["Base Components"]
        UI["UI Components"]
        SC["Section Components"]
        L["Layouts"]
        FBR["File-based Routing"]
        CC["Content Configuration"]
        
        subgraph BuildUtils
            UF["Utility Functions"]
            CON["Constants"]
        end
        
        subgraph StyleSystem
            GS["Global Styles"]
            FC["Font Configuration"]
            TC["Tailwind Config"]
        end
    end

    subgraph Runtime
        SH["Static HTML"]
        
        subgraph ReactComponents
            TT["Theme Toggle"]
            CD["Contact Dialog"]
            DT["Dynamic Time"]
            DV["Data Visualization"]
        end
        
        SEO["Head SEO"]
    end

    %% Relationships
    MDX --> BuildProcess
    PD --> BuildProcess
    SA --> BuildProcess
    BuildProcess --> Runtime
    
    %% Component relationships
    BC --> Runtime
    UI --> Runtime
    SC --> Runtime
    L --> Runtime
    FBR --> Runtime
    StyleSystem --> Runtime
    
    %% Click events for component mapping
    click MDX "https://github.com/nicholaslhq/astro-portfolio/tree/main//src/content/"
    click PD "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/content/profileData.ts"
    click SA "https://github.com/nicholaslhq/astro-portfolio/tree/main//public/"
    click BC "https://github.com/nicholaslhq/astro-portfolio/tree/main//src/components/"
    click UI "https://github.com/nicholaslhq/astro-portfolio/tree/main//src/components/ui/"
    click SC "https://github.com/nicholaslhq/astro-portfolio/tree/main//src/components/sections/"
    click L "https://github.com/nicholaslhq/astro-portfolio/tree/main//src/layouts/"
    click FBR "https://github.com/nicholaslhq/astro-portfolio/tree/main//src/pages/"
    click TT "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/components/react/ThemeToggle.tsx"
    click CD "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/components/react/ContactDialog.tsx"
    click DT "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/components/react/NowTime.tsx"
    click DV "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/components/react/WordCloud.tsx"
    click SEO "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/components/HeadSEO.astro"
    click GS "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/styles/globals.css"
    click FC "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/styles/fonts.css"
    click TC "https://github.com/nicholaslhq/astro-portfolio/blob/main/tailwind.config.ts"
    click CC "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/content/config.ts"
    click UF "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/lib/utils.ts"
    click CON "https://github.com/nicholaslhq/astro-portfolio/blob/main//src/lib/constants.ts"

    %% Styling
    classDef content fill:#e6e6fa,stroke:#333
    classDef build fill:#ffa500,stroke:#333
    classDef runtime fill:#90ee90,stroke:#333
    classDef utils fill:#d3d3d3,stroke:#333
    classDef styles fill:#add8e6,stroke:#333

    class MDX,PD,SA content
    class BC,UI,SC,L,FBR,CC build
    class SH,TT,CD,DT,DV,SEO runtime
    class UF,CON utils
    class GS,FC,TC styles
```
