# devabdallahabdelrahim/obsidian-vtabs-engine architecture

> Architecture diagram of the GitHub repository devabdallahabdelrahim/obsidian-vtabs-engine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/devabdallahabdelrahim/obsidian-vtabs-engine
- Repository: https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine

## Overview

VTabs Engine is an Obsidian plugin that mirrors workspace leaves into a persistent, nested tab-and-group tree and presents that tree in a vertical sidebar. The principal flow is Obsidian workspace events → synchronized store → React tree view; users can search, reorder, manage groups and tabs, and split group workspaces. Settings, icons, persistence, deduplication, and zoom support that workflow. Edges are limited to relationships stated in the README or visible in the supplied excerpts and SOURCE INDEX; unsampled subsystems are included where documented, without guessing their internal wiring.

Main entry points: [`src/store/tab-store.ts`](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/store/tab-store.ts) (Reactive tab store), [`src/main.ts`](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/main.ts) (Plugin entry), [`src/ui/components/VirtualTabList.tsx`](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/components/VirtualTabList.tsx) (Virtual tab list), [`src/ui/components/TabGroupNode.tsx`](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/components/TabGroupNode.tsx) (Group renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plugin["Plugin lifecycle"]
  node_plugin_entry["Plugin entry<br/>[main.ts]"]
  node_workspace_adapter["Workspace event adapter<br/>[obsidian-events.ts]"]
  node_settings_ui["Plugin settings<br/>[setting-tab.ts]"]
  node_plugin_context["Plugin context<br/>[plugin-context.tsx]"]
  node_settings_model["Settings model<br/>[plugin-settings.ts]"]
end

subgraph group_state["Tree and state"]
  node_tab_store["Reactive tab store<br/>[tab-store.ts]"]
  node_tree_types["Tree node model<br/>[tree.ts]"]
  node_persistence["Tree persistence<br/>[persistence.ts]"]
  node_dedup["Tab deduplication"]
  node_tree_utils["Tree search and ordering<br/>[tree-utils.ts]"]
end

subgraph group_sidebar["Sidebar experience"]
  node_view_bridge["Sidebar view bridge<br/>[view-container.ts]"]
  node_virtual_list["Virtual tab list<br/>[VirtualTabList.tsx]"]
  node_group_node["Group renderer<br/>[TabGroupNode.tsx]"]
  node_tab_node["Tab renderer<br/>[TabItemNode.tsx]"]
  node_icon_engine["Icon resolution<br/>[icon-engine.ts]"]
  node_icon_component["Obsidian icon<br/>[ObsidianIcon.tsx]"]
  node_modals["Group and tab modals"]
  node_styles["Sidebar styling"]
end

subgraph group_features["Workspace features"]
  node_group_split["Workspace group split"]
  node_split_controls["Split controls"]
  node_zoom["Tree zoom<br/>[useTreeZoom.ts]"]
  node_zoom_controls["Zoom controls<br/>[ZoomControls.tsx]"]
  node_focus_guards["Leaf focus guards<br/>[focus-guards.ts]"]
end

node_user(("Obsidian user"))
node_obsidian["Obsidian workspace"]

node_user -->|"uses plugin"| node_obsidian
node_plugin_entry -->|"hydrates tree"| node_tab_store
node_plugin_entry -->|"registers events"| node_workspace_adapter
node_plugin_entry -->|"registers view"| node_view_bridge
node_plugin_entry -->|"opens settings"| node_settings_ui
node_plugin_entry -->|"loads settings"| node_settings_model
node_workspace_adapter -->|"syncs leaves"| node_tab_store
node_workspace_adapter -->|"uses deduplication"| node_dedup
node_tab_store -->|"serializes tree"| node_persistence
node_tab_store -->|"models nodes"| node_tree_types
node_dedup -->|"updates tabs"| node_tab_store
node_dedup -->|"guards focus"| node_focus_guards
node_view_bridge -->|"provides plugin"| node_plugin_context
node_view_bridge -->|"renders list"| node_virtual_list
node_virtual_list -->|"reads tree state"| node_tab_store
node_virtual_list -->|"filters tree"| node_tree_utils
node_virtual_list -->|"renders groups"| node_group_node
node_virtual_list -->|"renders tabs"| node_tab_node
node_virtual_list -->|"renders controls"| node_zoom_controls
node_group_node -->|"mutates groups"| node_tab_store
node_group_node -->|"gets siblings"| node_tree_utils
node_group_node -->|"resolves icon"| node_icon_engine
node_group_node -->|"opens modals"| node_modals
node_group_node -->|"renders split control"| node_split_controls
node_tab_node -->|"mutates tabs"| node_tab_store
node_tab_node -->|"gets siblings"| node_tree_utils
node_tab_node -->|"resolves icon"| node_icon_engine
node_tab_node -->|"opens modals"| node_modals
node_tab_node -->|"renders split control"| node_split_controls
node_icon_component -->|"applies icon"| node_icon_engine
node_split_controls -->|"invokes split"| node_group_split
node_group_split -->|"detaches tabs"| node_tab_store
node_group_split -->|"guards leaf actions"| node_focus_guards
node_group_split -->|"rearranges leaves"| node_obsidian
node_zoom_controls -->|"uses zoom hook"| node_zoom
node_zoom -->|"reads settings"| node_plugin_context
node_zoom -->|"saves zoom"| node_plugin_entry
node_settings_ui -->|"saves settings"| node_plugin_entry
node_plugin_context -->|"subscribes settings"| node_plugin_entry

click node_plugin_entry "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/main.ts"
click node_workspace_adapter "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/adapter/obsidian-events.ts"
click node_settings_ui "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/settings/setting-tab.ts"
click node_plugin_context "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/context/plugin-context.tsx"
click node_settings_model "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/types/plugin-settings.ts"
click node_tab_store "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/store/tab-store.ts"
click node_tree_types "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/types/tree.ts"
click node_persistence "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/utils/persistence.ts"
click node_dedup "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/features/deduplication/deduplication.service.ts"
click node_tree_utils "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/utils/tree-utils.ts"
click node_view_bridge "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/types/view-container.ts"
click node_virtual_list "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/components/VirtualTabList.tsx"
click node_group_node "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/components/TabGroupNode.tsx"
click node_tab_node "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/components/TabItemNode.tsx"
click node_icon_engine "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/engine/icon-engine.ts"
click node_icon_component "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/components/ObsidianIcon.tsx"
click node_modals "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/tree/master/src/modals"
click node_styles "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/tree/master/src/styles"
click node_group_split "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/features/group-workspace-split/group-split.service.ts"
click node_split_controls "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/tree/master/src/features/group-workspace-split"
click node_zoom "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/features/tree-zoom/useTreeZoom.ts"
click node_zoom_controls "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/features/tree-zoom/ZoomControls.tsx"
click node_focus_guards "https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/utils/focus-guards.ts"

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_plugin_entry,node_workspace_adapter,node_settings_ui,node_plugin_context,node_settings_model,node_user toneBlue
class node_tab_store,node_tree_types,node_persistence,node_dedup,node_tree_utils toneAmber
class node_view_bridge,node_virtual_list,node_group_node,node_tab_node,node_icon_engine,node_icon_component,node_modals,node_styles toneMint
class node_group_split,node_split_controls,node_zoom,node_zoom_controls,node_focus_guards toneRose
class node_obsidian toneIndigo
```

## Components

### Plugin lifecycle

- [Plugin entry](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/main.ts): `src/main.ts`
- [Workspace event adapter](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/adapter/obsidian-events.ts): `src/adapter/obsidian-events.ts`
- [Plugin settings](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/settings/setting-tab.ts): `src/settings/setting-tab.ts`
- [Plugin context](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/context/plugin-context.tsx): `src/ui/context/plugin-context.tsx`
- [Settings model](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/types/plugin-settings.ts): `src/types/plugin-settings.ts`

### Tree and state

- [Reactive tab store](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/store/tab-store.ts): `src/store/tab-store.ts`
- [Tree node model](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/types/tree.ts): `src/types/tree.ts`
- [Tree persistence](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/utils/persistence.ts): `src/utils/persistence.ts`
- [Tab deduplication](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/features/deduplication/deduplication.service.ts): `src/features/deduplication/deduplication.service.ts`
- [Tree search and ordering](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/utils/tree-utils.ts): `src/utils/tree-utils.ts`

### Sidebar experience

- [Sidebar view bridge](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/types/view-container.ts): `src/ui/types/view-container.ts`
- [Virtual tab list](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/components/VirtualTabList.tsx): `src/ui/components/VirtualTabList.tsx`
- [Group renderer](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/components/TabGroupNode.tsx): `src/ui/components/TabGroupNode.tsx`
- [Tab renderer](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/components/TabItemNode.tsx): `src/ui/components/TabItemNode.tsx`
- [Icon resolution](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/engine/icon-engine.ts): `src/engine/icon-engine.ts`
- [Obsidian icon](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/ui/components/ObsidianIcon.tsx): `src/ui/components/ObsidianIcon.tsx`
- [Group and tab modals](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/tree/master/src/modals): `src/modals`
- [Sidebar styling](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/tree/master/src/styles): `src/styles`

### Workspace features

- [Workspace group split](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/features/group-workspace-split/group-split.service.ts): `src/features/group-workspace-split/group-split.service.ts`
- [Split controls](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/tree/master/src/features/group-workspace-split): `src/features/group-workspace-split`
- [Tree zoom](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/features/tree-zoom/useTreeZoom.ts): `src/features/tree-zoom/useTreeZoom.ts`
- [Zoom controls](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/features/tree-zoom/ZoomControls.tsx): `src/features/tree-zoom/ZoomControls.tsx`
- [Leaf focus guards](https://github.com/devabdallahabdelrahim/obsidian-vtabs-engine/blob/master/src/utils/focus-guards.ts): `src/utils/focus-guards.ts`

### Other components

- **Obsidian user**
- **Obsidian workspace**

## Connections

- Obsidian user → Obsidian workspace: uses plugin (evidence: `README.md`)
- Plugin entry → Reactive tab store: hydrates tree (evidence: `src/main.ts`)
- Plugin entry → Workspace event adapter: registers events (evidence: `src/main.ts`)
- Plugin entry → Sidebar view bridge: registers view (evidence: `src/main.ts`)
- Plugin entry → Plugin settings: opens settings (evidence: `src/main.ts`)
- Plugin entry → Settings model: loads settings (evidence: `src/main.ts`)
- Workspace event adapter → Reactive tab store: syncs leaves (evidence: `src/adapter/obsidian-events.ts`)
- Workspace event adapter → Tab deduplication: uses deduplication (evidence: `src/adapter/obsidian-events.ts`)
- Reactive tab store → Tree persistence: serializes tree (evidence: `src/store/tab-store.ts`)
- Reactive tab store → Tree node model: models nodes (evidence: `src/store/tab-store.ts`)
- Tab deduplication → Reactive tab store: updates tabs (evidence: `src/features/deduplication/deduplication.service.ts`)
- Tab deduplication → Leaf focus guards: guards focus (evidence: `src/features/deduplication/deduplication.service.ts`)
- Sidebar view bridge → Plugin context: provides plugin (evidence: `src/ui/types/view-container.ts`)
- Sidebar view bridge → Virtual tab list: renders list (evidence: `src/ui/types/view-container.ts`)
- Virtual tab list → Reactive tab store: reads tree state (evidence: `src/ui/components/VirtualTabList.tsx`)
- Virtual tab list → Tree search and ordering: filters tree (evidence: `src/ui/components/VirtualTabList.tsx`)
- Virtual tab list → Group renderer: renders groups (evidence: `src/ui/components/VirtualTabList.tsx`)
- Virtual tab list → Tab renderer: renders tabs (evidence: `src/ui/components/VirtualTabList.tsx`)
- Virtual tab list → Zoom controls: renders controls (evidence: `src/ui/components/VirtualTabList.tsx`)
- Group renderer → Reactive tab store: mutates groups (evidence: `src/ui/components/TabGroupNode.tsx`)
- Group renderer → Tree search and ordering: gets siblings (evidence: `src/ui/components/TabGroupNode.tsx`)
- Group renderer → Icon resolution: resolves icon (evidence: `src/ui/components/TabGroupNode.tsx`)
- Group renderer → Group and tab modals: opens modals (evidence: `src/ui/components/TabGroupNode.tsx`)
- Group renderer → Split controls: renders split control (evidence: `src/ui/components/TabGroupNode.tsx`)
- Tab renderer → Reactive tab store: mutates tabs (evidence: `src/ui/components/TabItemNode.tsx`)
- Tab renderer → Tree search and ordering: gets siblings (evidence: `src/ui/components/TabItemNode.tsx`)
- Tab renderer → Icon resolution: resolves icon (evidence: `src/ui/components/TabItemNode.tsx`)
- Tab renderer → Group and tab modals: opens modals (evidence: `src/ui/components/TabItemNode.tsx`)
- Tab renderer → Split controls: renders split control (evidence: `src/ui/components/TabItemNode.tsx`)
- Obsidian icon → Icon resolution: applies icon (evidence: `src/ui/components/ObsidianIcon.tsx`)
- Split controls → Workspace group split: invokes split (evidence: `src/features/group-workspace-split/GroupSplitButton.tsx`)
- Workspace group split → Reactive tab store: detaches tabs (evidence: `src/features/group-workspace-split/group-split.service.ts`)
- Workspace group split → Leaf focus guards: guards leaf actions (evidence: `src/features/group-workspace-split/group-split.service.ts`)
- Workspace group split → Obsidian workspace: rearranges leaves (evidence: `README.md`)
- Zoom controls → Tree zoom: uses zoom hook (evidence: `src/features/tree-zoom/ZoomControls.tsx`)
- Tree zoom → Plugin context: reads settings (evidence: `src/features/tree-zoom/useTreeZoom.ts`)
- Tree zoom → Plugin entry: saves zoom (evidence: `src/features/tree-zoom/useTreeZoom.ts`)
- Plugin settings → Plugin entry: saves settings (evidence: `src/settings/setting-tab.ts`)
- Plugin context → Plugin entry: subscribes settings (evidence: `src/ui/context/plugin-context.tsx`)
