# danpacho/obsidian_blog architecture

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

## Overview

##### Main Components Identification

The system consists of several key packages that should be represented as major components:

a. Core Components:
- Obsidian Plugin (packages/obsidian_plugin)
- Build System (packages/build_system)
- Publish System (packages/publish_system)
- Blogger Application (packages/blogger)
- Template Engine (packages/template)

b. Supporting Components:
- Design System (packages/design_system)
- Helpers (packages/helpers)
- CLI (packages/cli)
- AST Parser (packages/ast)

**┌─ User Interface Layer ─────────────────────┐**
- Obsidian Plugin UI                       │
- Blogger Desktop Application              │
- ┬───────────────────────┘
- ↓
**┌─ Core Processing Layer ────────────────────┐**
- ┌─ Build Pipeline ─┐  ┌─ Publish Pipeline ─│
- AST Parser     │  │ - Git Integration  │
- Build System   │  │ - Deploy System    │
- ┘  └───────────────────┘│
- ┬───────────────────────┘
- ↓
**┌─ Infrastructure Layer ───────────────────┐**
- File System                           │
- Version Control                       │
- Deployment Platforms                  │
- ┘

##### Component Relationships

- Obsidian Plugin → Build System (note processing)
- Build System → AST Parser (content parsing)
- Build System → Template Engine (content rendering)
- Publish System → External Services (deployment)
- Design System → UI Components (shared styling)

##### Additional Elements

Important aspects:
- Data flow indicators showing content transformation
- Plugin extension points
- Storage mechanisms
- External service integration points

##### Technical Details

For each major component, show:
- Key dependencies
- Main responsibilities
- Integration points
- Data formats handled

##### Notes for Implementation

- The plugin's integration with Obsidian
- The build pipeline's transformation process
- The publishing workflow
- Extension points for future features

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef infra fill:#f1c40f,stroke:#f39c12,color:black
    classDef util fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef critical fill:#e74c3c,stroke:#c0392b,color:white

    %% User Interface Layer
    subgraph UI
        Plugin["Obsidian Plugin"]:::ui
        BloggerApp["Blogger Desktop App"]:::ui
        
        subgraph PluginComponents
            UIComp["UI Components"]:::ui
            PluginCore["Plugin Core"]:::ui
            Settings["Settings"]:::ui
        end
    end

    %% Core Processing Layer
    subgraph CoreProcessing
        subgraph BuildSystem
            BuildCore["Build System Core"]:::core
            MDProcessor["Markdown Processor"]:::core
            BuildPlugins["Builder Plugins"]:::core
        end

        subgraph PublishSystem
            PublishCore["Publish System Core"]:::core
            GitIntegration["Git Integration"]:::core
            DeployPlugins["Deploy Plugins"]:::core
        end

        subgraph AST
            ASTParser["Parser Core"]:::core
            ASTTypes["AST Types"]:::core
        end
    end

    %% Infrastructure Layer
    subgraph Infrastructure
        subgraph TemplateEngine
            Layouts["Layouts"]:::infra
            Components["Components"]:::infra
            PageTemplates["Page Templates"]:::infra
        end

        subgraph Helpers
            FileOps["File Operations"]:::util
            Storage["Storage"]:::util
            Logger["Logger"]:::util
        end

        subgraph DesignSystem
            DSComponents["Design Components"]:::infra
            Hooks["Hooks"]:::infra
            Tools["Tools"]:::infra
        end

        subgraph CLI
            CLICore["CLI Core"]:::util
            CLITemplates["CLI Templates"]:::util
        end
    end

    %% Relationships
    Plugin --> BuildCore
    Plugin --> PublishCore
    BloggerApp --> BuildCore
    BloggerApp --> PublishCore
    BuildCore --> ASTParser
    ASTParser --> MDProcessor
    PublishCore --> GitIntegration
    GitIntegration --> DeployPlugins
    BuildCore --> TemplateEngine
    TemplateEngine --> Components
    Components --> DSComponents

    %% Click Events
    click Plugin "https://github.com/danpacho/obsidian_blog/tree/main/packages/obsidian_plugin"
    click UIComp "https://github.com/danpacho/obsidian_blog/tree/main/packages/obsidian_plugin/src/react"
    click PluginCore "https://github.com/danpacho/obsidian_blog/blob/main/packages/obsidian_plugin/src/plugin/main.ts"
    click Settings "https://github.com/danpacho/obsidian_blog/blob/main/packages/obsidian_plugin/src/plugin/settings.ts"
    click BuildCore "https://github.com/danpacho/obsidian_blog/blob/main/packages/build_system/src/build.system.ts"
    click BuildPlugins "https://github.com/danpacho/obsidian_blog/tree/main/packages/build_system/src/builder/plugin"
    click MDProcessor "https://github.com/danpacho/obsidian_blog/blob/main/packages/build_system/src/md/processor.ts"
    click PublishCore "https://github.com/danpacho/obsidian_blog/blob/main/packages/publish_system/src/publish.system.ts"
    click GitIntegration "https://github.com/danpacho/obsidian_blog/blob/main/packages/publish_system/src/core/git.ts"
    click DeployPlugins "https://github.com/danpacho/obsidian_blog/blob/main/packages/publish_system/src/publisher/plugin/deploy.ts"
    click BloggerApp "https://github.com/danpacho/obsidian_blog/blob/main/packages/blogger/src/main.ts"
    click Layouts "https://github.com/danpacho/obsidian_blog/tree/main/packages/template/src/layouts"
    click Components "https://github.com/danpacho/obsidian_blog/tree/main/packages/template/src/components"
    click PageTemplates "https://github.com/danpacho/obsidian_blog/tree/main/packages/template/src/pages"
    click DSComponents "https://github.com/danpacho/obsidian_blog/tree/main/packages/design_system/src/components"
    click Hooks "https://github.com/danpacho/obsidian_blog/tree/main/packages/design_system/src/hooks"
    click Tools "https://github.com/danpacho/obsidian_blog/tree/main/packages/design_system/src/tools"
    click ASTParser "https://github.com/danpacho/obsidian_blog/blob/main/packages/ast/src/parser.ts"
    click ASTTypes "https://github.com/danpacho/obsidian_blog/blob/main/packages/ast/src/ast.ts"
    click FileOps "https://github.com/danpacho/obsidian_blog/tree/main/packages/helpers/src/io"
    click Storage "https://github.com/danpacho/obsidian_blog/tree/main/packages/helpers/src/storage"
    click Logger "https://github.com/danpacho/obsidian_blog/tree/main/packages/helpers/src/logger"
    click CLICore "https://github.com/danpacho/obsidian_blog/tree/main/packages/cli/src/core"
    click CLITemplates "https://github.com/danpacho/obsidian_blog/tree/main/packages/cli/src/template"

    %% Legend
    subgraph Legend
        UI_L["User Interface"]:::ui
        Core_L["Core Processing"]:::core
        Infra_L["Infrastructure"]:::infra
        Util_L["Utilities"]:::util
    end
```
