# maximilianmauroner/home architecture

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

- Interactive diagram: https://gitdiagram.com/maximilianmauroner/home
- Repository: https://github.com/maximilianmauroner/home

## Overview

##### Main System Components

a) Client Layer:
- Static Pages (Astro-generated)
- Interactive Components (React)
- Styling (Tailwind CSS)

b) Build/Generation Layer:
- Astro Build System
- MDX Processing
- Static Site Generation

c) Content Management:
- Blog Posts
- Dev Logs
- Tools Section

**┌─ Client Layer ─────────────────────────────────┐**

- ┌─ Pages ──────┐  ┌─ Components ──────────┐  │
- Blog       │  │ - Header/Footer       │  │
- Dev Logs   │  │ - BlogPreview         │  │
- Tools      │  │ - Interactive Tools   │  │
- ┘  └────────────────────────┘  │

- ┬───────────────────────────┘

**┌───────────────────▼───────────────────────────┐**
- Static Site Generation (Astro)             │

- ┌─ Content ─────┐  ┌─ Processing ─────────┐  │
- MDX Files     │──▶ Remark Plugins       │  │
- Assets        │  │ - Reading Time       │  │
- Images        │  │ - Modified Time      │  │
- ┘  └────────────────────────┘  │

- ┬───────────────────────────┘

**┌───────────────────▼───────────────────────────┐**
- External Services                          │

- ┌─ APIs ───────┐  ┌─ Analytics ───────────┐  │
- Spotify      │  │ PostHog              │  │
- ┘  └────────────────────────┘  │

- ┘

##### Important Elements to Highlight

a) Content Flow:
- How content flows from MDX files through the build process
- How interactive components are hydrated on the client side

b) Tool Integration:
- Demonstrate how tools like Spotify Stats and WhatsApp Stats connect to their data sources
- Integration with PostHog analytics

##### Specific Implementation Details

Project-specific elements:
- File-based routing structure (/blog, /dev-log, /tools)
- Content processing pipeline (MDX → Remark plugins → Static HTML)
- Component architecture (Astro + React components)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Pages["Static Pages"]
        Components["Components"]
        
        subgraph StaticPages["Static Content"]
            Blog["Blog Pages"]:::static
            DevLog["Dev Log Pages"]:::static
            Tools["Tools Pages"]:::static
        end
        
        subgraph InteractiveComponents["Interactive Elements"]
            Header["Header"]:::component
            Footer["Footer"]:::component
            BlogPreview["Blog Preview"]:::component
            ToolsComponents["Tools Components"]:::component
            SpotifyStats["Spotify Stats"]:::component
            WhatsappStats["WhatsApp Stats"]:::component
            PosthogAnalytics["PostHog Analytics"]:::component
        end
        
        Pages --> StaticPages
        Components --> InteractiveComponents
    end
    
    subgraph BuildLayer["Build/Generation Layer"]
        AstroConfig["Astro Config"]:::config
        
        subgraph ContentProcessing["Content Processing"]
            MDX["MDX Files"]:::content
            RemarkPlugins["Remark Plugins"]:::processing
            ReadingTime["Reading Time Plugin"]:::plugin
            ModifiedTime["Modified Time Plugin"]:::plugin
        end
        
        subgraph Styling["Styling System"]
            GlobalStyles["Global Styles"]:::styles
            TailwindConfig["Tailwind Config"]:::config
        end
        
        MDX --> RemarkPlugins
        RemarkPlugins --> ReadingTime
        RemarkPlugins --> ModifiedTime
    end
    
    subgraph ContentManagement["Content Management"]
        BlogContent["Blog Content"]:::content
        DevLogContent["Dev Log Content"]:::content
        ContentConfig["Content Configuration"]:::config
    end
    
    subgraph Layouts["Layout System"]
        DefaultLayout["Default Layout"]:::layout
        PostLayout["Post Layout"]:::layout
    end
    
    subgraph Types["Type Definitions"]
        SpotifyTypes["Spotify Types"]:::types
        GeneralTypes["General Types"]:::types
    end
    
    subgraph ExternalServices["External Services"]
        Spotify["Spotify API"]:::external
        Posthog["PostHog Analytics"]:::external
    end
    
    ContentManagement --> BuildLayer
    BuildLayer --> Client
    ExternalServices --> InteractiveComponents
    
    %% Styles
    classDef static fill:#3b82f6
    classDef component fill:#22c55e
    classDef content fill:#f97316
    classDef processing fill:#ea580c
    classDef plugin fill:#c2410c
    classDef config fill:#7c3aed
    classDef styles fill:#ec4899
    classDef layout fill:#0ea5e9
    classDef types fill:#64748b
    classDef external fill:#8b5cf6
    
    %% Click Events
    click Pages "https://github.com/MaximilianMauroner/home/tree/main/src/pages"
    click Blog "https://github.com/MaximilianMauroner/home/tree/main/src/pages/blog"
    click DevLog "https://github.com/MaximilianMauroner/home/tree/main/src/pages/dev-log"
    click Tools "https://github.com/MaximilianMauroner/home/tree/main/src/pages/tools"
    click Components "https://github.com/MaximilianMauroner/home/tree/main/src/components"
    click Header "https://github.com/MaximilianMauroner/home/blob/main/src/components/Header.astro"
    click Footer "https://github.com/MaximilianMauroner/home/blob/main/src/components/Footer.astro"
    click BlogPreview "https://github.com/MaximilianMauroner/home/blob/main/src/components/BlogPreview.tsx"
    click ToolsComponents "https://github.com/MaximilianMauroner/home/tree/main/src/components/tools"
    click SpotifyStats "https://github.com/MaximilianMauroner/home/blob/main/src/components/tools/SpotifyStats.tsx"
    click WhatsappStats "https://github.com/MaximilianMauroner/home/blob/main/src/components/tools/WhatsappStats.tsx"
    click PosthogAnalytics "https://github.com/MaximilianMauroner/home/blob/main/src/components/Posthog.astro"
    click BlogContent "https://github.com/MaximilianMauroner/home/tree/main/src/content/blog"
    click DevLogContent "https://github.com/MaximilianMauroner/home/tree/main/src/content/log"
    click ContentConfig "https://github.com/MaximilianMauroner/home/blob/main/src/content.config.ts"
    click ReadingTime "https://github.com/MaximilianMauroner/home/blob/main/plugins/remark-reading-time.mjs"
    click ModifiedTime "https://github.com/MaximilianMauroner/home/blob/main/plugins/remark-modified-time.mjs"
    click AstroConfig "https://github.com/MaximilianMauroner/home/blob/main/astro.config.mjs"
    click GlobalStyles "https://github.com/MaximilianMauroner/home/blob/main/src/styles/globals.css"
    click TailwindConfig "https://github.com/MaximilianMauroner/home/blob/main/tailwind.config.mjs"
    click DefaultLayout "https://github.com/MaximilianMauroner/home/blob/main/src/layouts/DefaultLayout.astro"
    click PostLayout "https://github.com/MaximilianMauroner/home/blob/main/src/layouts/PostLayout.astro"
    click SpotifyTypes "https://github.com/MaximilianMauroner/home/blob/main/src/types/spotify.ts"
    click GeneralTypes "https://github.com/MaximilianMauroner/home/blob/main/src/utils/types.ts"
```
