# nblackburn/website architecture

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

- Interactive diagram: https://gitdiagram.com/nblackburn/website
- Repository: https://github.com/nblackburn/website

## Overview

##### Main Components

a. Frontend Architecture (Primary Focus)
- Astro Pages Layer
- Vue Components Layer
- Styling System (Vanilla Extract)
- Static Content (Projects/MD files)
- API Endpoints

##### Key Architectural Elements

a. Client Layer:
- Browser/User Interface
- Static Assets (/public directory)

b. Astro Framework Layer:
- Pages Router (/src/pages/*)
- Layouts (/src/layouts/*)
- Content Collections (/src/content/*)

c. Component Layer:
- Vue Components (/src/components/*)
- Styling System
- CSS-in-TS files (*.css.ts)
- Theme configuration
- Palette management

d. API Layer:
- Contact Form Endpoint (/api/contact.ts)
- RSS Feed Generation (/projects/rss.xml.ts)

##### Specific Design Elements

Use the following visual elements:
- Blue rectangles for Astro components
- Green rectangles for Vue components
- Purple rectangles for API endpoints
- Orange rectangles for static content

##### Component Relationships

Key interactions:
- How pages compose layouts and components
- Content collection integration with project pages
- API endpoint interaction with the contact form
- Static asset serving
- Theme/palette system integration

##### Important Subsystems to Highlight

a. Content Management:
- Project content structure
- Markdown processing
- Image handling

b. Styling System:
- Theme configuration
- Palette management
- Component-specific styles

c. Routing System:
- Static pages
- Dynamic project pages
- Tag-based filtering

##### API endpoints

- Build-time vs. Runtime components
- Static vs. Dynamic routes
- Data flow direction
- Integration points with external services

Keep the abstraction level focused on the architectural components while showing the relationship between Astro pages, Vue components, and the styling system, as these are the core technical elements of the project.

Remember to emphasize the hybrid nature of the application, showing how Astro handles static site generation while incorporating Vue for interactive components where needed.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client
        Browser["Browser/User Interface"]
        StaticAssets["Static Assets"]:::static
    end

    subgraph AstroLayer
        Pages["Pages Router"]:::astro
        Layouts["Layouts"]:::astro
        Collections["Content Collections"]:::astro
    end

    subgraph ComponentLayer
        VueComponents["Vue Components"]:::vue
        StylingSystem["Styling System"]:::styling
        ThemePalette["Theme/Palette Manager"]:::styling
    end

    subgraph ContentLayer
        ProjectContent["Project Content"]:::content
        MarkdownFiles["Markdown Files"]:::content
    end

    subgraph APILayer
        ContactAPI["Contact Form API"]:::api
        RSSFeed["RSS Feed Generator"]:::api
    end

    subgraph IntegrationsLayer
        PostHog["PostHog Analytics"]:::integration
        TurnStile["TurnStile"]:::integration
    end

    subgraph ConfigLayer
        NavConfig["Navigation Config"]:::config
        SocialConfig["Social Links Config"]:::config
        ProjectConfig["Project Config"]:::config
    end

    Browser --> Pages
    StaticAssets --> Browser
    Pages --> Layouts
    Pages --> VueComponents
    Layouts --> VueComponents
    VueComponents --> StylingSystem
    VueComponents --> ThemePalette
    Pages --> Collections
    Collections --> ProjectContent
    Collections --> MarkdownFiles
    VueComponents --> ContactAPI
    Pages --> RSSFeed
    VueComponents --> PostHog
    VueComponents --> TurnStile
    Pages --> NavConfig
    Pages --> SocialConfig
    Pages --> ProjectConfig

    %% Click Events
    click Pages "https://github.com/nblackburn/website/tree/main/src/pages/*"
    click VueComponents "https://github.com/nblackburn/website/tree/main/src/components/*"
    click StylingSystem "https://github.com/nblackburn/website/blob/main/src/styles/theme.css.ts"
    click ProjectContent "https://github.com/nblackburn/website/tree/main/src/content/project/*"
    click ContactAPI "https://github.com/nblackburn/website/blob/main/src/pages/api/contact.ts"
    click RSSFeed "https://github.com/nblackburn/website/blob/main/src/pages/projects/rss.xml.ts"
    click Layouts "https://github.com/nblackburn/website/tree/main/src/layouts/*"
    click Collections "https://github.com/nblackburn/website/blob/main/src/content.config.ts"
    click ThemePalette "https://github.com/nblackburn/website/blob/main/src/utilities/paletteManager.ts"
    click NavConfig "https://github.com/nblackburn/website/blob/main/src/config/nav.ts"
    click SocialConfig "https://github.com/nblackburn/website/blob/main/src/config/socialLinks.ts"
    click PostHog "https://github.com/nblackburn/website/blob/main/src/components/posthog.astro"
    click TurnStile "https://github.com/nblackburn/website/blob/main/src/components/turnStile.vue"
    click ProjectConfig "https://github.com/nblackburn/website/blob/main/src/config/project.ts"
    click StaticAssets "https://github.com/nblackburn/website/tree/main/public/*"

    %% Styling
    classDef astro fill:#4F6BF7,color:white
    classDef vue fill:#42B883,color:white
    classDef styling fill:#FF69B4,color:white
    classDef content fill:#FFA500,color:white
    classDef api fill:#9932CC,color:white
    classDef integration fill:#20B2AA,color:white
    classDef config fill:#DAA520,color:white
    classDef static fill:#808080,color:white

    %% Legend
    subgraph Legend
        L1[Astro Components]:::astro
        L2[Vue Components]:::vue
        L3[Styling System]:::styling
        L4[Content]:::content
        L5[API Endpoints]:::api
        L6[Integrations]:::integration
        L7[Configuration]:::config
        L8[Static Assets]:::static
    end
```
