# cyanvoxel/obsidian-releases architecture

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

- Interactive diagram: https://gitdiagram.com/cyanvoxel/obsidian-releases
- Repository: https://github.com/cyanvoxel/obsidian-releases

## Overview

##### Main Components

a) Central Repository Components:
- JSON Registry Files (community-plugins.json, community-css-themes.json)
- Release Tracking (desktop-releases.json)
- Plugin Statistics (community-plugin-stats.json)
- Deprecation Registry (community-plugin-deprecation.json)

b) External Components:
- GitHub Platform
- Obsidian Client Application
- Plugin/Theme Developer Repositories
- GitHub Actions Workflow System

**┌─────────────────────┐    ┌──────────────────┐**
- Obsidian Client   │    │  Developer Repos  │
- ┘    └──────────────────┘

**┌─────────────────────────────────────────┐**
- GitHub Actions               │
- (Validation, Stats, Release Tracking)  │
- ┘

**┌─────────────────────────────────────────┐**
- JSON Registry Files             │
- (Plugins, Themes, Stats, Releases)     │
- ┘

##### Key Processes to Highlight

a) Plugin/Theme Submission Process:
**Developer Repo → Pull Request → GitHub Actions Validation → Registry Update**

b) Distribution Process:
**Registry Files → Obsidian Client → End User Installation**

c) Statistics Collection:
**Plugin Usage → Stats Collection → Stats JSON Update**

##### Additional Elements

- Plugin validation workflow
- Theme validation workflow
- Release tracking system
- Deprecation handling

##### Important Notes

- Clear separation between submission and distribution flows
- Automated validation processes
- Version compatibility checking system
- Interaction with GitHub releases for actual file distribution

##### Technical Details

- File format requirements (manifest.json, README.md)
- Version compatibility checking
- Release tag requirements
- Required file components (main.js, styles.css)

- Plugin/theme submission
- Validation processes
- Distribution mechanisms
- Version management
- Statistics tracking

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef external fill:#90EE90,stroke:#333
    classDef core fill:#ADD8E6,stroke:#333
    classDef workflow fill:#FFA500,stroke:#333
    classDef registry fill:#DDA0DD,stroke:#333
    
    %% Distribution & Integration Layer
    subgraph External
        Client["Obsidian Client"]:::external
        DevRepos["Developer Repositories"]:::external
    end

    %% Registry & Validation Layer
    subgraph Workflows
        direction TB
        GHActions["GitHub Actions"]:::workflow
        
        subgraph ValidationProcesses
            direction TB
            PluginVal["Plugin Validation"]:::workflow
            ThemeVal["Theme Validation"]:::workflow
            StatCollection["Statistics Collection"]:::workflow
        end
    end

    %% Data Storage Layer
    subgraph Registries
        direction TB
        PluginReg["Plugin Registry"]:::registry
        ThemeReg["Theme Registry"]:::registry
        ReleaseTrack["Release Tracking"]:::registry
        PluginStats["Plugin Statistics"]:::registry
        DeprecationReg["Deprecation Registry"]:::registry
        SnippetReg["Code Snippet Registry"]:::registry
    end

    %% Templates and Guidelines
    subgraph SubmissionSystem
        direction TB
        PluginTemplate["Plugin Submission Template"]:::core
        ThemeTemplate["Theme Submission Template"]:::core
        ReviewGuide["Plugin Review Guidelines"]:::core
    end

    %% Relationships
    DevRepos -.->|Submit| PluginTemplate & ThemeTemplate
    PluginTemplate --> PluginVal
    ThemeTemplate --> ThemeVal
    
    PluginVal --> PluginReg
    ThemeVal --> ThemeReg
    StatCollection --> PluginStats
    
    Client -->|Fetch| PluginReg & ThemeReg
    Client -->|Report Usage| StatCollection
    
    GHActions -->|Manage| ValidationProcesses
    ValidationProcesses -->|Update| Registries
    
    ReviewGuide -.->|Guide| ValidationProcesses

    %% Click Events
    click PluginReg "https://github.com/CyanVoxel/obsidian-releases/blob/master/community-plugins.json"
    click ThemeReg "https://github.com/CyanVoxel/obsidian-releases/blob/master/community-css-themes.json"
    click ReleaseTrack "https://github.com/CyanVoxel/obsidian-releases/blob/master/desktop-releases.json"
    click PluginStats "https://github.com/CyanVoxel/obsidian-releases/blob/master/community-plugin-stats.json"
    click DeprecationReg "https://github.com/CyanVoxel/obsidian-releases/blob/master/community-plugin-deprecation.json"
    click PluginVal "https://github.com/CyanVoxel/obsidian-releases/blob/master/.github/workflows/validate-plugin-entry.yml"
    click ThemeVal "https://github.com/CyanVoxel/obsidian-releases/blob/master/.github/workflows/validate-theme-entry.yml"
    click StatCollection "https://github.com/CyanVoxel/obsidian-releases/blob/master/.github/workflows/plugin-stat.yml"
    click PluginTemplate "https://github.com/CyanVoxel/obsidian-releases/blob/master/.github/PULL_REQUEST_TEMPLATE/plugin.md"
    click ThemeTemplate "https://github.com/CyanVoxel/obsidian-releases/blob/master/.github/PULL_REQUEST_TEMPLATE/theme.md"
    click ReviewGuide "https://github.com/CyanVoxel/obsidian-releases/blob/master/plugin-review.md"
    click SnippetReg "https://github.com/CyanVoxel/obsidian-releases/blob/master/community-snippets.json"

    %% Legend
    subgraph Legend
        direction TB
        L1["External Components"]:::external
        L2["Core Components"]:::core
        L3["Workflow Components"]:::workflow
        L4["Registry Components"]:::registry
    end
```
