# psudonem/socialmirror architecture

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

- Interactive diagram: https://gitdiagram.com/psudonem/socialmirror
- Repository: https://github.com/psudonem/socialmirror

## Overview

##### Main Components

a) Input Sources Layer:
- RSS Feed Connectors (Multiple)
- Distinct connections for:
- Backloggd
- Letterboxd
- MyAnimeList
- Goodreads

b) Core Processing Layer:
- Mirror Master Component (mirrorMaster.py)
- Local Database System (socialDB.py)
- Individual Platform Handlers:
- backloggdMirror.py
- letterboxdMirror.py
- myAnimeList.py
- goodreads.py

c) Output Layer:
- HTML Generator
- Style Component (style.css)
- Deployment Mechanism (update.bat)

##### Component Relationships

a) Data Flow:
- RSS Feeds → Individual Platform Handlers
- Platform Handlers → Mirror Master
- Mirror Master → Local JSON Database
- Local JSON Database → HTML Generator
- HTML/CSS → Deployment Script

b) Dependencies:
- Configuration dependencies between saveicon.py and mirrorMaster.py
- Style.css relationship with generated HTML

##### Technical Stack Indicators

Following technologies:
- Python 3.x Runtime
- Required Libraries:
- PySimpleGUI
- feedparser
- BeautifulSoup4
- JSON Database
- CSS Styling
- Batch Script Deployment

##### Additional Elements

Include:
- Version information
- Platform support indication (Windows-only currently)
- Future expansion points (marked differently for planned services like Oku)

Remember to indicate the user interaction points through the GUI interface and show the configuration flow for usernames and settings.

This system design should clearly communicate both the current functionality and the planned expansion points while maintaining a clear visualization of the data flow from source platforms to the final deployed web pages.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Style definitions
    classDef input fill:#a8d1f0,stroke:#333
    classDef processing fill:#90EE90,stroke:#333
    classDef storage fill:#FFA500,stroke:#333
    classDef output fill:#DDA0DD,stroke:#333
    classDef future fill:#E6E6E6,stroke:#333,stroke-dasharray: 5 5

    subgraph "Data Collection Layer"
        B_RSS["Backloggd RSS"]:::input
        L_RSS["Letterboxd RSS"]:::input
        M_RSS["MyAnimeList RSS"]:::input
        G_RSS["Goodreads RSS"]:::input
        OKU["Oku RSS (Planned)"]:::future
    end

    subgraph "Processing Layer"
        MM["Mirror Master"]:::processing
        BM["Backloggd Handler"]:::processing
        LM["Letterboxd Handler"]:::processing
        MAL["MyAnimeList Handler"]:::processing
        GR["Goodreads Handler"]:::processing
        SI["Save Icon Utility"]:::processing
    end

    subgraph "Storage Layer"
        DB["Local JSON Database"]:::storage
        CONF["User Configuration"]:::storage
    end

    subgraph "Presentation Layer"
        HTML["HTML Generator"]:::output
        CSS["Style Component"]:::output
        DEPLOY["Deployment Script"]:::output
    end

    %% Connections
    B_RSS --> BM
    L_RSS --> LM
    M_RSS --> MAL
    G_RSS --> GR

    BM --> MM
    LM --> MM
    MAL --> MM
    GR --> MM
    
    MM --> DB
    SI --> MM
    
    DB --> HTML
    CSS --> HTML
    HTML --> DEPLOY
    CONF --> MM

    %% Click events
    click MM "https://github.com/Psudonem/socialMirror/blob/main/mirrorMaster.py"
    click DB "https://github.com/Psudonem/socialMirror/blob/main/socialDB.py"
    click BM "https://github.com/Psudonem/socialMirror/blob/main/backloggdMirror.py"
    click LM "https://github.com/Psudonem/socialMirror/blob/main/letterboxdMirror.py"
    click MAL "https://github.com/Psudonem/socialMirror/blob/main/myAnimeList.py"
    click GR "https://github.com/Psudonem/socialMirror/blob/main/goodreads.py"
    click CSS "https://github.com/Psudonem/socialMirror/blob/main/style.css"
    click DEPLOY "https://github.com/Psudonem/socialMirror/blob/main/update.bat"
    click SI "https://github.com/Psudonem/socialMirror/blob/main/saveicon.py"

    %% Legend
    subgraph Legend
        I["Input Sources"]:::input
        P["Processing Components"]:::processing
        S["Storage Components"]:::storage
        O["Output Components"]:::output
        F["Future Components"]:::future
    end
```
