# ramiz-rahman/jali architecture

> Architecture diagram of the GitHub repository ramiz-rahman/jali, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ramiz-rahman/jali
- Repository: https://github.com/ramiz-rahman/jali

## Overview

Jali is a framework-independent adaptive pane-layout core with a React rendering layer. The main workflow is: an app defines pane kinds and an initial layout, creates a Jali instance, and mounts it in React; users arrange panes, while the core tracks and adapts layout state and React renders it. The README also highlights URL layout sync, ⌘K, Settings, and the chooser. Some subsystem links are documented capabilities rather than inspected calls; unsampled implementation details are not inferred.

Main entry points: [`packages/react/src/features/defaults.ts`](https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/features/defaults.ts) (Default features), [`packages/core/src/state/store.ts`](https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/state/store.ts) (Instance store), [`packages/react/src/JaliRoot.tsx`](https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/JaliRoot.tsx) (Jali root), [`packages/react/src/workspace/Workspace.tsx`](https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/workspace/Workspace.tsx) (Workspace view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Layout core"]
  node_pane_kinds["Pane definitions<br/>[pane-kinds.ts]"]
  node_actions["User actions"]
  node_store["Instance store<br/>[store.ts]"]
  node_apply["State application<br/>[apply.ts]"]
  node_layout_engine["Layout engine"]
  node_profile["Layout profile<br/>[profile.ts]"]
  node_commands["Command interface"]
end

subgraph group_react["React interface"]
  node_react_state["React state hooks<br/>[react.tsx]"]
  node_root["Jali root<br/>[JaliRoot.tsx]"]
  node_workspace["Workspace view<br/>[Workspace.tsx]"]
  node_pane_view["Pane rendering<br/>[PaneFrame.tsx]"]
  node_dividers["Divider controls<br/>[DividerLayer.tsx]"]
  node_dialogs["Dialogs"]
end

subgraph group_features["User features"]
  node_feature_defaults["Default features<br/>[defaults.ts]"]
  node_url_sync["URL sync<br/>[url-sync.ts]"]
  node_pop_out["Pop-out panes<br/>[pop-out.tsx]"]
  node_page["Curated pages"]
end

subgraph group_integrations["App integration"]
  node_jali_api["Jali package API<br/>[index.ts]"]
end

node_app(("Application"))

node_app -->|"defines panes"| node_pane_kinds
node_app -->|"creates instance"| node_store
node_app -->|"mounts UI"| node_root
node_app -->|"enables features"| node_feature_defaults
node_actions -->|"runs through"| node_store
node_store -->|"commits outcomes"| node_apply
node_apply -->|"updates layout"| node_layout_engine
node_store -->|"derives layout"| node_layout_engine
node_store -->|"uses registry"| node_pane_kinds
node_root -->|"provides state"| node_react_state
node_react_state -->|"subscribes to"| node_store
node_root -->|"renders workspace"| node_workspace
node_workspace -.->|"renders panes"| node_pane_view
node_workspace -.->|"offers resizing"| node_dividers
node_feature_defaults -->|"offers URL sync"| node_url_sync
node_feature_defaults -->|"offers shortcuts"| node_commands
node_feature_defaults -->|"offers chooser"| node_dialogs
node_feature_defaults -.->|"supports pages"| node_page
node_feature_defaults -.->|"supports pop-out"| node_pop_out
node_jali_api -->|"exposes React"| node_root

click node_pane_kinds "https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/pane-kinds.ts"
click node_actions "https://github.com/ramiz-rahman/jali/tree/master/packages/core/src/actions"
click node_store "https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/state/store.ts"
click node_apply "https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/state/apply.ts"
click node_layout_engine "https://github.com/ramiz-rahman/jali/tree/master/packages/core/src/layout"
click node_profile "https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/profile.ts"
click node_react_state "https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/state/react.tsx"
click node_root "https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/JaliRoot.tsx"
click node_workspace "https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/workspace/Workspace.tsx"
click node_pane_view "https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/pane/PaneFrame.tsx"
click node_dividers "https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/dividers/DividerLayer.tsx"
click node_dialogs "https://github.com/ramiz-rahman/jali/tree/master/packages/react/src/dialogs"
click node_commands "https://github.com/ramiz-rahman/jali/tree/master/packages/core/src/commands"
click node_feature_defaults "https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/features/defaults.ts"
click node_url_sync "https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/features/url-sync.ts"
click node_pop_out "https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/features/pop-out.tsx"
click node_page "https://github.com/ramiz-rahman/jali/tree/master/packages/react/src/page"
click node_jali_api "https://github.com/ramiz-rahman/jali/blob/master/packages/jali/src/index.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_pane_kinds,node_actions,node_store,node_apply,node_layout_engine,node_profile,node_commands toneBlue
class node_react_state,node_root,node_workspace,node_pane_view,node_dividers,node_dialogs toneAmber
class node_feature_defaults,node_url_sync,node_pop_out,node_page toneMint
class node_jali_api toneRose
class node_app toneIndigo
```

## Components

### Layout core

- [Pane definitions](https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/pane-kinds.ts): `packages/core/src/pane-kinds.ts`
- [User actions](https://github.com/ramiz-rahman/jali/tree/master/packages/core/src/actions): `packages/core/src/actions`
- [Instance store](https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/state/store.ts): `packages/core/src/state/store.ts`
- [State application](https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/state/apply.ts): `packages/core/src/state/apply.ts`
- [Layout engine](https://github.com/ramiz-rahman/jali/tree/master/packages/core/src/layout): `packages/core/src/layout`
- [Layout profile](https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/profile.ts): `packages/core/src/profile.ts`
- [Command interface](https://github.com/ramiz-rahman/jali/tree/master/packages/core/src/commands): `packages/core/src/commands`

### React interface

- [React state hooks](https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/state/react.tsx): `packages/react/src/state/react.tsx`
- [Jali root](https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/JaliRoot.tsx): `packages/react/src/JaliRoot.tsx`
- [Workspace view](https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/workspace/Workspace.tsx): `packages/react/src/workspace/Workspace.tsx`
- [Pane rendering](https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/pane/PaneFrame.tsx): `packages/react/src/pane/PaneFrame.tsx`
- [Divider controls](https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/dividers/DividerLayer.tsx): `packages/react/src/dividers/DividerLayer.tsx`
- [Dialogs](https://github.com/ramiz-rahman/jali/tree/master/packages/react/src/dialogs): `packages/react/src/dialogs`

### User features

- [Default features](https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/features/defaults.ts): `packages/react/src/features/defaults.ts`
- [URL sync](https://github.com/ramiz-rahman/jali/blob/master/packages/core/src/features/url-sync.ts): `packages/core/src/features/url-sync.ts`
- [Pop-out panes](https://github.com/ramiz-rahman/jali/blob/master/packages/react/src/features/pop-out.tsx): `packages/react/src/features/pop-out.tsx`
- [Curated pages](https://github.com/ramiz-rahman/jali/tree/master/packages/react/src/page): `packages/react/src/page`

### App integration

- [Jali package API](https://github.com/ramiz-rahman/jali/blob/master/packages/jali/src/index.ts): `packages/jali/src/index.ts`

### Other components

- **Application**

## Connections

- Application → Pane definitions: defines panes (evidence: `README.md`)
- Application → Instance store: creates instance (evidence: `README.md`)
- Application → Jali root: mounts UI (evidence: `README.md`)
- Application → Default features: enables features (evidence: `README.md`)
- User actions → Instance store: runs through (evidence: `packages/core/src/actions/index.ts`)
- Instance store → State application: commits outcomes (evidence: `packages/core/src/state/store.ts`)
- State application → Layout engine: updates layout (evidence: `packages/core/src/state/apply.ts`)
- Instance store → Layout engine: derives layout (evidence: `packages/core/src/state/store.ts`)
- Instance store → Pane definitions: uses registry (evidence: `packages/core/src/state/store.ts`)
- Jali root → React state hooks: provides state (evidence: `packages/react/src/state/react.tsx`)
- React state hooks → Instance store: subscribes to (evidence: `packages/react/src/state/react.tsx`)
- Jali root → Workspace view: renders workspace (evidence: `README.md`)
- Workspace view → Pane rendering: renders panes
- Workspace view → Divider controls: offers resizing
- Default features → URL sync: offers URL sync (evidence: `README.md`)
- Default features → Command interface: offers shortcuts (evidence: `README.md`)
- Default features → Dialogs: offers chooser (evidence: `README.md`)
- Default features → Curated pages: supports pages
- Default features → Pop-out panes: supports pop-out
- Jali package API → Jali root: exposes React
