# justoptimize/showhiddenchannels architecture

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

## Overview

##### Project Type Identification
This is a Discord plugin project that extends BetterDiscord's functionality. It's a client-side modification that integrates with Discord's existing architecture to reveal hidden channel information.

##### Main Components

A. Core Plugin Components:
- Entry Point (index.js)
- Configuration Layer (config.json)
- UI Components Layer (src/components/)
- Utility Layer (src/utils/)

B. External Dependencies:
- BetterDiscord API
- ZeresPluginLibrary
- Discord Client

##### Additional Elements

Notes about:
- Plugin lifecycle
- Discord API interaction points
- Permission handling
- Channel information retrieval mechanism

Remember to include a note about the potential future limitations due to Discord's experimental feature that might affect the plugin's functionality, as mentioned in the README's warning section.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "User Interface Layer"
        direction TB
        UI_COMPONENTS["UI Components"]
        ARC["AdminRolesComponent"]:::ui
        CRC["ChannelRolesComponent"]:::ui
        FC["ForumComponent"]:::ui
        HCI["HiddenChannelIcon"]:::ui
        ISW["IconSwitchWrapper"]:::ui
        LS["Lockscreen"]:::ui
        UMC["UserMentionsComponent"]:::ui
        
        UI_COMPONENTS --> ARC & CRC & FC & HCI & ISW & LS & UMC
    end

    subgraph "Core Layer"
        direction TB
        EP["Entry Point"]:::core
        CONFIG["Configuration"]:::core
        MAIN["Main Plugin Class"]:::core
        
        EP --> CONFIG
        EP --> MAIN
    end

    subgraph "Utility Layer"
        direction TB
        DATE_UTILS["Date Utils"]:::util
        MODULE_UTILS["Module Utils"]:::util
        STYLES["Styles"]:::util
    end

    subgraph "External Dependencies"
        direction TB
        BD["BetterDiscord API"]:::external
        ZERES["ZeresPluginLibrary"]:::external
        DISCORD["Discord Client"]:::external
    end

    %% Connections between layers
    MAIN --> UI_COMPONENTS
    MAIN --> DATE_UTILS
    MAIN --> MODULE_UTILS
    MAIN --> STYLES
    
    BD --> MAIN
    ZERES --> MAIN
    DISCORD --> MAIN

    %% Click events for component mapping
    click EP "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/index.js"
    click CONFIG "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/config.json"
    click UI_COMPONENTS "https://github.com/JustOptimize/ShowHiddenChannels/tree/main/src/components/"
    click ARC "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/components/AdminRolesComponent.jsx"
    click CRC "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/components/ChannelRolesComponent.jsx"
    click FC "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/components/ForumComponent.jsx"
    click HCI "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/components/HiddenChannelIcon.jsx"
    click ISW "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/components/IconSwitchWrapper.jsx"
    click LS "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/components/Lockscreen.jsx"
    click UMC "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/components/UserMentionsComponent.jsx"
    click DATE_UTILS "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/utils/date.js"
    click MODULE_UTILS "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/utils/modules.js"
    click MAIN "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/ShowHiddenChannels.plugin.js"
    click STYLES "https://github.com/JustOptimize/ShowHiddenChannels/blob/main/src/styles.css"

    %% Styling
    classDef core fill:#2196F3,stroke:#1565C0,color:white
    classDef ui fill:#4CAF50,stroke:#2E7D32,color:white
    classDef util fill:#9E9E9E,stroke:#616161,color:white
    classDef external fill:#FFC107,stroke:#FFA000,color:black

    %% Legend
    subgraph Legend
        direction TB
        L1["Core Components"]:::core
        L2["UI Components"]:::ui
        L3["Utility Modules"]:::util
        L4["External Dependencies"]:::external
    end
```
