# xiang511/xiang511 architecture

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

- Interactive diagram: https://gitdiagram.com/xiang511/xiang511
- Repository: https://github.com/xiang511/xiang511

## Overview

##### Main Components

a) Data Sources Layer:
- GitHub API (for repository and contribution data)
- WakaTime API (for coding time statistics)
- Profile Views Counter Service
- GitHub Followers/Stars Counter

b) Profile Components Layer:
- Profile Summary Cards Generator
- Theme Management System
- Statistics Visualization Components
- Skills Display Component
- Activity Tracking Components

c) Output Layer:
- Generated SVG Files
- Markdown Rendering
- Theme-specific Outputs

**[External Services]**
- ↓
**[Data Collection Layer]**
- ↓
**[Processing Layer]**
- ↓
**[Visualization Layer]**
- ↓
**[Output Layer]**

##### Component Relationships

**GitHub API ──→ Data Collector**
- ↓
- Theme Processor ←── Theme Configurations
- ↓
- Statistics Generator
- ↓
- SVG/Markdown Renderer
- ↓
- Profile Display Layer

##### Key Elements to Highlight

- Theme System: Show how the 60+ themes are managed
- GitHub Actions Workflow: Indicate automated generation process
- Data Processing Pipeline: Show transformation of raw data to visualizations
- Output Management: Display how different output formats are handled

##### Technical Details

- GitHub Actions workflow integration
- SVG generation process
- Markdown compilation
- API integration points
- Theme switching mechanism

##### Implementation Notes

- Version/update information
- Notes about the automation process

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph External
        GH[GitHub API]:::external
        WK[WakaTime API]:::external
        PV[Profile Views Counter]:::external
        FS[Followers/Stars Counter]:::external
    end

    subgraph DataCollection
        DC[Data Collector]:::process
        GH & WK & PV & FS --> DC
    end

    subgraph Processing
        TM["Theme Management System"]:::process
        TC["Theme Configurations"]:::config
        SG["Statistics Generator"]:::process
        
        DC --> SG
        TC --> TM
        TM --> SG
    end

    subgraph Visualization
        SVG["SVG Generator"]:::output
        MD["Markdown Renderer"]:::output
        
        SG --> SVG
        SG --> MD
    end

    subgraph Output
        PSC["Profile Summary Cards"]:::output
        DOC["Documentation"]:::doc
        
        SVG & MD --> PSC
        PSC --> DOC
    end

    %% Component Mappings
    click TM "https://github.com/xiang511/xiang511/tree/main/profile-summary-card-output/"
    click PSC "https://github.com/xiang511/xiang511/tree/main/profile-summary-card-output/"
    click DOC "https://github.com/xiang511/xiang511/blob/main/README.md"
    click TC "https://github.com/xiang511/xiang511/tree/main/profile-summary-card-output/default/"

    %% Styles
    classDef external fill:#68a0cf,stroke:#333,stroke-width:2px
    classDef process fill:#98FF98,stroke:#333,stroke-width:2px
    classDef config fill:#FFB366,stroke:#333,stroke-width:2px
    classDef output fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef doc fill:#F0E68C,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[External Services]:::external
        L2[Processing Components]:::process
        L3[Configuration]:::config
        L4[Output Components]:::output
        L5[Documentation]:::doc
    end
```
