# nuricanozturk01/mahzen-term architecture

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

- Interactive diagram: https://gitdiagram.com/nuricanozturk01/mahzen-term
- Repository: https://github.com/nuricanozturk01/mahzen-term

## Overview

MahzenTerm is a native terminal and developer workspace combining terminal sessions, editing, project tools, and operational panels; its companion `tf` command previews and browses content. The principal workflow is launching the app into its shell, then using panes and commands to work with terminals, files, projects, and integrations. The README documents these capabilities, but most app wiring was not sampled, so uncertain component links are omitted or marked dashed without evidence. The `tf` command is shown dispatching file handling, while its broader viewer relationships are documented but not verified in source excerpts.

Main entry points: [`crates/app/src/shell.rs`](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/shell.rs) (Workspace shell), [`crates/tf/src/main.rs`](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/tf/src/main.rs) (tf command), [`crates/app/src/main.rs`](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/main.rs) (App entry), [`crates/term/src/session.rs`](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/term/src/session.rs) (Terminal sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Workspace app"]
  node_app_entry["App entry<br/>[main.rs]"]
  node_shell["Workspace shell<br/>[shell.rs]"]
  node_commands["Command palette<br/>[commands.rs]"]
  node_app_state["App state<br/>[state.rs]"]
  node_layout["Pane layout<br/>[layout.rs]"]
end

subgraph group_terminal["Terminal runtime"]
  node_term_session["Terminal sessions<br/>[session.rs]"]
  node_term_graphics["Terminal graphics<br/>[gfx.rs]"]
  node_terminal_view["Terminal view<br/>[terminal_view.rs]"]
end

subgraph group_developer["Editing and projects"]
  node_editor["Code editor<br/>[state.rs]"]
  node_lsp["Language servers<br/>[lib.rs]"]
  node_project["Project workflows<br/>[project.rs]"]
  node_explorer["File explorer<br/>[lib.rs]"]
  node_workspaces["Named workspaces<br/>[workspace.rs]"]
end

subgraph group_integrations["Panels and integrations"]
  node_git["Git tools<br/>[ops.rs]"]
  node_docker["Docker panel<br/>[lib.rs]"]
  node_kubernetes["Kubernetes panel<br/>[kubectl.rs]"]
end

subgraph group_content["Content tools"]
  node_tf_cli["tf command<br/>[main.rs]"]
  node_viewer["File renderers<br/>[lib.rs]"]
  node_tf_browser["Web browsers<br/>[mod.rs]"]
  node_text_browser["Text browser<br/>[mod.rs]"]
  node_media["Media viewers<br/>[play.rs]"]
end

node_user(("User"))

node_user -->|"launches"| node_app_entry
node_app_entry -->|"starts daemon"| node_shell
node_user -.->|"invokes actions"| node_commands
node_user -->|"runs previews"| node_tf_cli
node_tf_cli -.->|"renders files"| node_viewer
node_tf_cli -.->|"opens real browser"| node_tf_browser
node_tf_cli -.->|"opens text browser"| node_text_browser
node_tf_cli -.->|"plays media"| node_media
node_shell -.->|"hosts terminals"| node_term_session
node_term_session -.->|"supplies terminal state"| node_terminal_view
node_terminal_view -.->|"draws terminal"| node_term_graphics
node_shell -.->|"hosts editor"| node_editor
node_editor -.->|"uses language services"| node_lsp
node_shell -.->|"opens projects"| node_project
node_shell -.->|"shows files"| node_explorer
node_shell -.->|"shows Git panel"| node_git
node_shell -.->|"shows Docker panel"| node_docker
node_shell -.->|"shows cluster panel"| node_kubernetes
node_shell -.->|"manages workspaces"| node_workspaces
node_shell -.->|"arranges panes"| node_layout
node_shell -.->|"tracks application state"| node_app_state
node_shell -.->|"dispatches commands"| node_commands

click node_app_entry "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/main.rs"
click node_shell "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/shell.rs"
click node_commands "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/commands.rs"
click node_app_state "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/state.rs"
click node_layout "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/layout.rs"
click node_term_session "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/term/src/session.rs"
click node_term_graphics "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/term/src/gfx.rs"
click node_terminal_view "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/ui-kit/src/terminal_view.rs"
click node_editor "https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/editor/src/state.rs"
click node_lsp "https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/lsp/src/lib.rs"
click node_project "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/project.rs"
click node_explorer "https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/explorer/src/lib.rs"
click node_git "https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/git/src/ops.rs"
click node_docker "https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/docker/src/lib.rs"
click node_kubernetes "https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/kubernetes/src/kubectl.rs"
click node_workspaces "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/core/src/workspace.rs"
click node_tf_cli "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/tf/src/main.rs"
click node_viewer "https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/viewer/src/lib.rs"
click node_tf_browser "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/tf/src/web/mod.rs"
click node_text_browser "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/tf/src/browse/mod.rs"
click node_media "https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/tf/src/play.rs"

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_app_entry,node_shell,node_commands,node_app_state,node_layout,node_user toneBlue
class node_term_session,node_term_graphics,node_terminal_view toneAmber
class node_editor,node_lsp,node_project,node_explorer,node_workspaces toneMint
class node_git,node_docker,node_kubernetes toneRose
class node_tf_cli,node_viewer,node_tf_browser,node_text_browser,node_media toneIndigo
```

## Components

### Workspace app

- [App entry](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/main.rs): `crates/app/src/main.rs`
- [Workspace shell](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/shell.rs): `crates/app/src/shell.rs`
- [Command palette](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/commands.rs): `crates/app/src/commands.rs`
- [App state](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/state.rs): `crates/app/src/state.rs`
- [Pane layout](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/layout.rs): `crates/app/src/layout.rs`

### Terminal runtime

- [Terminal sessions](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/term/src/session.rs): `crates/term/src/session.rs`
- [Terminal graphics](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/term/src/gfx.rs): `crates/term/src/gfx.rs`
- [Terminal view](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/ui-kit/src/terminal_view.rs): `crates/ui-kit/src/terminal_view.rs`

### Editing and projects

- [Code editor](https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/editor/src/state.rs): `modules/editor/src/state.rs`
- [Language servers](https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/lsp/src/lib.rs): `modules/lsp/src/lib.rs`
- [Project workflows](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/app/src/project.rs): `crates/app/src/project.rs`
- [File explorer](https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/explorer/src/lib.rs): `modules/explorer/src/lib.rs`
- [Named workspaces](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/core/src/workspace.rs): `crates/core/src/workspace.rs`

### Panels and integrations

- [Git tools](https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/git/src/ops.rs): `modules/git/src/ops.rs`
- [Docker panel](https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/docker/src/lib.rs): `modules/docker/src/lib.rs`
- [Kubernetes panel](https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/kubernetes/src/kubectl.rs): `modules/kubernetes/src/kubectl.rs`

### Content tools

- [tf command](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/tf/src/main.rs): `crates/tf/src/main.rs`
- [File renderers](https://github.com/nuricanozturk01/mahzen-term/blob/master/modules/viewer/src/lib.rs): `modules/viewer/src/lib.rs`
- [Web browsers](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/tf/src/web/mod.rs): `crates/tf/src/web/mod.rs`
- [Text browser](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/tf/src/browse/mod.rs): `crates/tf/src/browse/mod.rs`
- [Media viewers](https://github.com/nuricanozturk01/mahzen-term/blob/master/crates/tf/src/play.rs): `crates/tf/src/play.rs`

### Other components

- **User**

## Connections

- User → App entry: launches
- App entry → Workspace shell: starts daemon (evidence: `crates/app/src/main.rs`)
- User → Command palette: invokes actions
- User → tf command: runs previews
- tf command → File renderers: renders files
- tf command → Web browsers: opens real browser (evidence: `crates/tf/src/main.rs`)
- tf command → Text browser: opens text browser (evidence: `crates/tf/src/main.rs`)
- tf command → Media viewers: plays media (evidence: `crates/tf/src/main.rs`)
- Workspace shell → Terminal sessions: hosts terminals
- Terminal sessions → Terminal view: supplies terminal state
- Terminal view → Terminal graphics: draws terminal
- Workspace shell → Code editor: hosts editor
- Code editor → Language servers: uses language services
- Workspace shell → Project workflows: opens projects
- Workspace shell → File explorer: shows files
- Workspace shell → Git tools: shows Git panel
- Workspace shell → Docker panel: shows Docker panel
- Workspace shell → Kubernetes panel: shows cluster panel
- Workspace shell → Named workspaces: manages workspaces
- Workspace shell → Pane layout: arranges panes
- Workspace shell → App state: tracks application state
- Workspace shell → Command palette: dispatches commands
