# kenepa/multi-widget architecture

> Architecture diagram of the GitHub repository kenepa/multi-widget, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kenepa/multi-widget
- Repository: https://github.com/kenepa/multi-widget

## Overview

This is a small Filament package for presenting several widgets behind selectable tabs. Its workflow filters configured widgets by visibility, selects a default, and renders the selected widget through Livewire; users can switch tabs. The README only announces that the package moved, so this map reflects the sampled implementation rather than the successor repository.

Main entry points: [`src/MultiWidget.php`](https://github.com/kenepa/multi-widget/blob/2.x/src/MultiWidget.php) (MultiWidget), [`resources/views/multi-widget.blade.php`](https://github.com/kenepa/multi-widget/blob/2.x/resources/views/multi-widget.blade.php) (Widget tabs view), [`src/Concerns/HasTabs.php`](https://github.com/kenepa/multi-widget/blob/2.x/src/Concerns/HasTabs.php) (Tab session concern), [`src/MultiWidgetServiceProvider.php`](https://github.com/kenepa/multi-widget/blob/2.x/src/MultiWidgetServiceProvider.php) (Service provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Dashboard user"))
node_filament["Filament / Livewire"]
node_multiwidget["MultiWidget<br/>[MultiWidget.php]"]
node_tabs["Tab session concern<br/>[HasTabs.php]"]
node_view["Widget tabs view"]
node_childwidgets["Configured widgets"]
node_session[("Laravel session")]
node_provider["Service provider"]
node_package_tools["Package tools"]

node_filament -->|"hosts"| node_multiwidget
node_multiwidget -->|"uses"| node_tabs
node_filament -->|"renders"| node_view
node_view -->|"requests selection"| node_multiwidget
node_user -->|"clicks tab"| node_view
node_multiwidget -->|"filters and renders"| node_childwidgets
node_multiwidget -->|"supplies HTML"| node_view
node_tabs -.->|"provides key"| node_session
node_multiwidget -.->|"reads and writes selection"| node_session
node_provider -->|"configures views"| node_package_tools

click node_multiwidget "https://github.com/kenepa/multi-widget/blob/2.x/src/MultiWidget.php"
click node_tabs "https://github.com/kenepa/multi-widget/blob/2.x/src/Concerns/HasTabs.php"
click node_view "https://github.com/kenepa/multi-widget/blob/2.x/resources/views/multi-widget.blade.php"
click node_provider "https://github.com/kenepa/multi-widget/blob/2.x/src/MultiWidgetServiceProvider.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user,node_view toneBlue
class node_filament,node_childwidgets,node_provider,node_package_tools toneIndigo
class node_multiwidget,node_tabs toneTeal
class node_session toneAmber
```

## Components

### Other components

- **Dashboard user**
- **Filament / Livewire**
- [MultiWidget](https://github.com/kenepa/multi-widget/blob/2.x/src/MultiWidget.php): `src/MultiWidget.php`
- [Tab session concern](https://github.com/kenepa/multi-widget/blob/2.x/src/Concerns/HasTabs.php): `src/Concerns/HasTabs.php`
- [Widget tabs view](https://github.com/kenepa/multi-widget/blob/2.x/resources/views/multi-widget.blade.php): `resources/views/multi-widget.blade.php`
- **Configured widgets**
- **Laravel session**
- [Service provider](https://github.com/kenepa/multi-widget/blob/2.x/src/MultiWidgetServiceProvider.php): `src/MultiWidgetServiceProvider.php`
- **Package tools**

## Connections

- Filament / Livewire → MultiWidget: hosts
- MultiWidget → Tab session concern: uses
- Filament / Livewire → Widget tabs view: renders
- Widget tabs view → MultiWidget: requests selection
- Dashboard user → Widget tabs view: clicks tab
- MultiWidget → Configured widgets: filters and renders
- MultiWidget → Widget tabs view: supplies HTML
- Tab session concern → Laravel session: provides key
- MultiWidget → Laravel session: reads and writes selection
- Service provider → Package tools: configures views
