# jamesmcewan/mcwn architecture

> Architecture diagram of the GitHub repository jamesmcewan/mcwn, 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/jamesmcewan/mcwn
- Repository: https://github.com/jamesmcewan/mcwn

## Overview

##### Main Components Identification

a) Development Environment:
- Astro Static Site Generator
- TypeScript/JavaScript compilation layer
- PostCSS/Tailwind CSS processing
- Husky (pre-commit hooks)

b) Content Layer:
- Markdown files (in src/pages)
- Components (Astro components)
- Static assets (public directory)

c) Build/Deploy Pipeline:
- GitHub Actions CI/CD
- SST (Serverless Stack) configuration
- Vercel deployment

**[Development Environment] → [Build Process] → [Production Environment]**

##### Detailed Component Relationships

Following flows:

**[Source Files] → [Astro Build Process] → [Static Output]**
- ↑                    ↑                     ↓
**[Components] → [PostCSS/Tailwind] → [Vercel Deployment]**

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Development
        AstroConfig["Astro Config"]:::config
        TSConfig["TypeScript Config"]:::config
        StyleConfig["PostCSS/Tailwind"]:::config
        Husky["Pre-commit Hooks"]:::tool
    end

    subgraph ContentLayer
        Pages["Pages"]:::content
        Components["Components"]:::component
        Layouts["Layouts"]:::component
        SiteData["Site Data"]:::data
    end

    subgraph StaticAssets
        Icons["Icons"]:::asset
        Images["Images"]:::asset
        Manifest["Web Manifest"]:::asset
    end

    subgraph CoreComponents
        Head["Head Management"]:::component
        Meta["Meta Information"]:::component
        Nav["Navigation"]:::component
        Footer["Footer"]:::component
        PageLayout["Page Layout"]:::component
    end

    subgraph BuildDeploy
        GHActions["GitHub Actions"]:::pipeline
        SSTConfig["SST Config"]:::config
        VercelConfig["Vercel Config"]:::config
    end

    subgraph External
        PostHog["PostHog Analytics"]:::external
        Vercel["Vercel Platform"]:::external
    end

    ContentLayer --> CoreComponents
    StaticAssets --> BuildDeploy
    CoreComponents --> BuildDeploy
    Development --> BuildDeploy
    BuildDeploy --> Vercel
    CoreComponents --> PostHog

    %% Click Events
    click AstroConfig "https://github.com/jamesmcewan/mcwn/blob/main/astro.config.mjs"
    click TSConfig "https://github.com/jamesmcewan/mcwn/blob/main/tsconfig.json"
    click StyleConfig "https://github.com/jamesmcewan/mcwn/blob/main/postcss.config.cjs"
    click Husky "https://github.com/jamesmcewan/mcwn/tree/main/.husky/pre-commit"
    click Pages "https://github.com/jamesmcewan/mcwn/tree/main/src/pages/"
    click Components "https://github.com/jamesmcewan/mcwn/tree/main/src/components/"
    click Layouts "https://github.com/jamesmcewan/mcwn/tree/main/src/layouts/"
    click SiteData "https://github.com/jamesmcewan/mcwn/blob/main/src/data/site.json"
    click Icons "https://github.com/jamesmcewan/mcwn/tree/main/public/icons"
    click Images "https://github.com/jamesmcewan/mcwn/tree/main/public/images"
    click Manifest "https://github.com/jamesmcewan/mcwn/blob/main/public/manifest.webmanifest"
    click GHActions "https://github.com/jamesmcewan/mcwn/blob/main/.github/workflows/ci.yml"
    click SSTConfig "https://github.com/jamesmcewan/mcwn/blob/main/sst.config.ts"
    click VercelConfig "https://github.com/jamesmcewan/mcwn/blob/main/vercel.json"
    click Head "https://github.com/jamesmcewan/mcwn/blob/main/src/components/Head.astro"
    click Meta "https://github.com/jamesmcewan/mcwn/blob/main/src/components/Meta.astro"
    click Nav "https://github.com/jamesmcewan/mcwn/blob/main/src/components/Links.astro"
    click Footer "https://github.com/jamesmcewan/mcwn/blob/main/src/components/Footer.astro"
    click PageLayout "https://github.com/jamesmcewan/mcwn/blob/main/src/layouts/PageLayout.astro"
    click PostHog "https://github.com/jamesmcewan/mcwn/blob/main/src/components/PostHog.astro"

    %% Styling
    classDef config fill:#a8dadc,stroke:#457b9d
    classDef tool fill:#f4a261,stroke:#e76f51
    classDef content fill:#2a9d8f,stroke:#264653
    classDef component fill:#8ecae6,stroke:#219ebc
    classDef data fill:#ffb703,stroke:#fb8500
    classDef asset fill:#9b5de5,stroke:#7209b7
    classDef pipeline fill:#f72585,stroke:#3a0ca3
    classDef external fill:#adb5bd,stroke:#495057

    %% Legend
    subgraph Legend
        Config["Configuration"]:::config
        Tool["Development Tools"]:::tool
        Content["Content Files"]:::content
        Comp["Components"]:::component
        Data["Data Files"]:::data
        Asset["Static Assets"]:::asset
        Pipeline["CI/CD Pipeline"]:::pipeline
        Ext["External Services"]:::external
    end
```
