# libersoft-org/yellow-client architecture

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

- Interactive diagram: https://gitdiagram.com/libersoft-org/yellow-client
- Repository: https://github.com/libersoft-org/yellow-client

## Overview

##### Main Components Identification

The system should be represented with these primary components:

a) Core Application Layer:
- Located in `/src/core`
- Contains base components, account management, and core functionality
- Includes the application shell and common UI elements

b) Modular Architecture:
- Located in `/src/modules`
- Contains separate module bundles:
- Contacts Module (org.libersoft.contacts)
- Dating Module (org.libersoft.dating)
- Messages Module (org.libersoft.messages)
- Wallet Module (org.libersoft.wallet)
- IFrames Module (org.libersoft.iframes)

c) Frontend Framework:
- Svelte-based application
- SvelteKit routing system (indicated by /src/routes)
- Static assets management (/static)

**[Client Browser]**
- ↓
**[Application Shell]**
- ↓
**[Core Layer] ← → [Shared Store]**
- ↓
**[Module System]**
- ↓
**[Individual Modules]**

##### Component Relationships

Key interactions:
- Core components to module communication
- Shared state management (via svelte-shared-store)
- Module-to-module interactions
- Static asset usage

##### Specific Implementation Details

a) Core Features:
- Account management system
- UI Component library
- Modal system
- Wizard system

b) Module Features:
- Contacts management
- Dating functionality
- Messaging system
- Wallet operations
- IFrame handling

- Client Layer  |

- ↓

- Core Layer   |

- ↓

- Module System  |

- ↓

- Modules     |

##### Additional Notes

- Version information and debug mode access
- Configuration points (indicated by various config files)
- Development vs production paths

Remember to include the debug mode activation (CTRL + ` or CTRL + ;) as a special note, as it's an important development feature mentioned in the README.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]
        DebugMode["Debug Mode (CTRL + ` or CTRL + ;)"]:::debug
    end

    subgraph AppShell["Application Shell"]
        AppLayout["Main App Layout"]:::frontend
        MainPage["Main Page"]:::frontend
        HTML["App HTML"]:::frontend
    end

    subgraph CoreLayer["Core Layer"]
        CoreConfig["Core Configuration"]:::core
        AccountMgmt["Account Management"]:::core
        UIComponents["UI Components"]:::core
        ModalSystem["Modal System"]:::core
        WizardSystem["Wizard System"]:::core
        MenuSystem["Menu System"]:::core
        AccountBar["Account Bar"]:::core
        ModuleBar["Module Bar"]:::core
        BaseComponents["Base Components"]:::core
    end

    subgraph SharedServices["Shared Services"]
        SharedStore["Shared Store"]:::service
        ClientDebug["Debug Service"]:::service
    end

    subgraph ModuleSystem["Module System"]
        direction TB
        Contacts["Contacts Module"]:::module
        Dating["Dating Module"]:::module
        Messages["Messages Module"]:::module
        Wallet["Wallet Module"]:::module
        IFrames["IFrames Module"]:::module
    end

    subgraph StaticAssets["Static Assets"]
        ModuleAssets["Module Assets"]:::static
        Images["Images"]:::static
    end

    subgraph DevEnv["Development Environment"]
        Docker["Docker Configuration"]:::dev
        DevScripts["Development Scripts"]:::dev
    end

    Browser --> AppLayout
    Browser --> DebugMode
    DebugMode --> ClientDebug
    
    AppLayout --> CoreLayer
    CoreLayer <--> SharedStore
    CoreLayer --> ModuleSystem
    ModuleSystem --> StaticAssets
    SharedStore --> ModuleSystem

    %% Click Events
    click AppLayout "https://github.com/libersoft-org/yellow-client/blob/main/src/routes/+layout.js"
    click MainPage "https://github.com/libersoft-org/yellow-client/blob/main/src/routes/+page.svelte"
    click HTML "https://github.com/libersoft-org/yellow-client/blob/main/src/app.html"
    click CoreConfig "https://github.com/libersoft-org/yellow-client/blob/main/src/core/core.js"
    click AccountMgmt "https://github.com/libersoft-org/yellow-client/blob/main/src/core/pages/accounts.svelte"
    click UIComponents "https://github.com/libersoft-org/yellow-client/tree/main/src/core/components/"
    click ModalSystem "https://github.com/libersoft-org/yellow-client/blob/main/src/core/components/modal.svelte"
    click WizardSystem "https://github.com/libersoft-org/yellow-client/blob/main/src/core/components/wizard.svelte"
    click MenuSystem "https://github.com/libersoft-org/yellow-client/blob/main/src/core/components/menu.svelte"
    click AccountBar "https://github.com/libersoft-org/yellow-client/blob/main/src/core/components/account-bar.svelte"
    click ModuleBar "https://github.com/libersoft-org/yellow-client/blob/main/src/core/components/module-bar.svelte"
    click BaseComponents "https://github.com/libersoft-org/yellow-client/blob/main/src/core/components/base-button.svelte"
    click SharedStore "https://github.com/libersoft-org/yellow-client/blob/main/src/lib/svelte-shared-store.ts"
    click ClientDebug "https://github.com/libersoft-org/yellow-client/blob/main/src/core/client_debug.js"
    click Contacts "https://github.com/libersoft-org/yellow-client/tree/main/src/modules/org.libersoft.contacts/"
    click Dating "https://github.com/libersoft-org/yellow-client/tree/main/src/modules/org.libersoft.dating/"
    click Messages "https://github.com/libersoft-org/yellow-client/tree/main/src/modules/org.libersoft.messages/"
    click Wallet "https://github.com/libersoft-org/yellow-client/tree/main/src/modules/org.libersoft.wallet/"
    click IFrames "https://github.com/libersoft-org/yellow-client/tree/main/src/modules/org.libersoft.iframes/"
    click ModuleAssets "https://github.com/libersoft-org/yellow-client/tree/main/static/modules/"
    click Images "https://github.com/libersoft-org/yellow-client/tree/main/static/img/"
    click Docker "https://github.com/libersoft-org/yellow-client/tree/main/Dockerfile"
    click DevScripts "https://github.com/libersoft-org/yellow-client/blob/main/start-dev.sh"

    %% Styles
    classDef core fill:#2196F3,stroke:#1565C0,color:white
    classDef module fill:#4CAF50,stroke:#2E7D32,color:white
    classDef service fill:#FFC107,stroke:#FFA000,color:black
    classDef static fill:#9E9E9E,stroke:#616161,color:white
    classDef frontend fill:#03A9F4,stroke:#0288D1,color:white
    classDef dev fill:#F44336,stroke:#C62828,color:white
    classDef debug fill:#FF5722,stroke:#D84315,color:white
```
