# kevinpayravi/indie-wiki-buddy architecture

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

- Interactive diagram: https://gitdiagram.com/kevinpayravi/indie-wiki-buddy
- Repository: https://github.com/kevinpayravi/indie-wiki-buddy

## Overview

a. User Interactions:
- Browser → Extension Popup
- Browser → Extension Settings
- Browser → Extension Guide

b. Content Processing:
- URL Detection → Wiki Mapping Lookup
- Search Results Filtering
- Redirect/Notification Flow

c. Data Flows:
- Wiki Mapping Data → Background Service
- User Preferences → Content Scripts
- Localization → UI Components

##### Key Components Detail

Background Service:
- [Background Service]
- URL Monitoring
- Wiki Detection
- Redirect Management

Content Scripts:
- [Content Scripts]
- Banner Injection
- Search Results Filtering
- BreezeWiki Integration

Data Management:
- [Wiki Mappings]
- Multiple Language Support
- Origin/Destination Pairs
- Platform-specific Settings

##### Specific features
- Multi-browser support (Chrome/Firefox)
- Multi-language support (20+ languages)
- Search engine integration
- BreezeWiki support
- Customizable redirect settings

##### User configuration flow

Keep the abstraction level focused on the main architectural components while showing the extension-specific elements that make this project unique. Use standard browser extension architecture patterns but highlight the wiki-specific functionality that makes this tool special.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Browser
        direction TB
        User[User Browser]
        
        subgraph ExtensionUI[Extension UI Layer]
            direction TB
            Popup["Popup Interface"]
            Settings["Settings Interface"]
            Guide["Guide Interface"]
            CommonPage["Common Page Functions"]
        end
        
        subgraph ContentScripts[Content Scripts Layer]
            direction TB
            SearchFilter["Search Results Filtering"]
            BannerInject["Banner Injection"]
            BreezeInt["BreezeWiki Integration"]
            CommonFunc["Common Functions"]
        end
        
        subgraph BackgroundService[Background Service Layer]
            direction TB
            BGService["Background Service"]
        end
        
        subgraph DataStorage[Data Storage Layer]
            direction TB
            WikiMaps["Wiki Mappings"]
            Favicons["Favicon Assets"]
            L10n["Localization Data"]
        end
        
        subgraph Styling[Styling Components]
            direction TB
            CommonCSS["Common Styles"]
            BannerCSS["Banner Styles"]
            SearchCSS["Search Filtering Styles"]
            PopupCSS["Popup Styles"]
            SettingsCSS["Settings Styles"]
            GuideCSS["Guide Styles"]
        end
    end
    
    subgraph External[External Systems]
        direction TB
        CorpWikis["Corporate Wiki Farms"]
        IndieWikis["Independent Wikis"]
        SearchEngines["Search Engines"]
        BreezeWiki["BreezeWiki Service"]
    end
    
    %% Interactions
    User --> ExtensionUI
    User --> ContentScripts
    ContentScripts --> External
    BGService --> External
    DataStorage --> BGService
    DataStorage --> ContentScripts
    DataStorage --> ExtensionUI
    Styling --> ExtensionUI
    Styling --> ContentScripts
    
    %% Click Events
    click BGService "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/background.js"
    click Popup "https://github.com/KevinPayravi/indie-wiki-buddy/tree/main/pages/popup/"
    click Settings "https://github.com/KevinPayravi/indie-wiki-buddy/tree/main/pages/settings/"
    click Guide "https://github.com/KevinPayravi/indie-wiki-buddy/tree/main/pages/guide/"
    click CommonPage "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/pages/common-page-functions.js"
    click SearchFilter "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/scripts/content-search-filtering.js"
    click BannerInject "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/scripts/content-banners.js"
    click BreezeInt "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/scripts/content-breezewiki.js"
    click CommonFunc "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/scripts/common-functions.js"
    click WikiMaps "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/data/*.json"
    click Favicons "https://github.com/KevinPayravi/indie-wiki-buddy/tree/main/favicons/"
    click L10n "https://github.com/KevinPayravi/indie-wiki-buddy/tree/main/_locales/"
    click CommonCSS "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/css/common.css"
    click BannerCSS "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/css/content-banners.css"
    click SearchCSS "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/css/content-search-filtering.css"
    click PopupCSS "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/css/popup.css"
    click SettingsCSS "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/css/settings.css"
    click GuideCSS "https://github.com/KevinPayravi/indie-wiki-buddy/blob/main/css/guide.css"
    
    %% Styling
    classDef external fill:#FFA07A,stroke:#FF6347
    classDef ui fill:#9370DB,stroke:#6A5ACD
    classDef content fill:#4682B4,stroke:#4169E1
    classDef background fill:#20B2AA,stroke:#008B8B
    classDef storage fill:#90EE90,stroke:#3CB371
    classDef styling fill:#DDA0DD,stroke:#BA55D3
    
    class CorpWikis,IndieWikis,SearchEngines,BreezeWiki external
    class Popup,Settings,Guide,CommonPage ui
    class SearchFilter,BannerInject,BreezeInt,CommonFunc content
    class BGService background
    class WikiMaps,Favicons,L10n storage
    class CommonCSS,BannerCSS,SearchCSS,PopupCSS,SettingsCSS,GuideCSS styling
```
