# melthond/gitowl architecture

> Architecture diagram of the GitHub repository melthond/gitowl, 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/melthond/gitowl
- Repository: https://github.com/melthond/gitowl

## Overview

gitowl is a native Git and GitHub workspace: a user opens a repository, reviews changes or history, and requests local Git or GitHub operations from the interface. The desktop/server entry point serves the frontend and routes authenticated API actions through Service, which dispatches Git work and GitHub CLI operations. Distinct capabilities include branch and remote management, conflict recovery, history editing, pull-request review, repository settings, and activity views. Edges follow shown calls, imports, or README-documented behavior; unsampled subsystem internals are represented at their source paths without guessing their internal wiring.

Main entry points: [`src/service.rs`](https://github.com/melthond/gitowl/blob/main/src/service.rs) (Action dispatcher), [`src/git.rs`](https://github.com/melthond/gitowl/blob/main/src/git.rs) (Git operations), [`frontend/src/App.tsx`](https://github.com/melthond/gitowl/blob/main/frontend/src/App.tsx) (Workspace shell), [`frontend/src/api.ts`](https://github.com/melthond/gitowl/blob/main/frontend/src/api.ts) (Frontend API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace interface"]
  node_app["Workspace shell<br/>[App.tsx]"]
  node_changes["Changes and diffs<br/>[ChangesParts.tsx]"]
  node_history["History and reflog<br/>[HistoryParts.tsx]"]
  node_branches_ui["Branch controls<br/>[BranchPanel.tsx]"]
  node_overview["Overview and activity<br/>[Overview.tsx]"]
  node_activity["Activity heatmap"]
  node_repo_settings["Repository settings"]
  node_settings_parts["Settings panes<br/>[SettingsParts.tsx]"]
  node_github_ui["GitHub workspace<br/>[GitHubPanel.tsx]"]
  node_github_more["GitHub management<br/>[GitHubMore.tsx]"]
  node_pr_parts["PR review parts<br/>[PrParts.tsx]"]
  node_diff["Diff renderer<br/>[Diff.tsx]"]
end

subgraph group_localgit["Local Git"]
  node_git_core["Git operations<br/>[git.rs]"]
  node_branches["Branch operations<br/>[branches.rs]"]
  node_commit_edit["Commit editing<br/>[commit_edit.rs]"]
  node_rewrite["History rewriting<br/>[rewrite.rs]"]
  node_conflict["Conflict handling<br/>[conflict.rs]"]
  node_hunks["Hunk staging<br/>[hunks.rs]"]
  node_remotes["Remote management<br/>[remotes.rs]"]
  node_stash["Stash operations<br/>[stash.rs]"]
  node_tags["Tag operations<br/>[tags.rs]"]
  node_packages["Package operations<br/>[packages.rs]"]
  node_activity_backend["Activity data<br/>[activity.rs]"]
  node_git_cli["Git executable"]
end

subgraph group_github["GitHub features"]
  node_github_backend["GitHub CLI actions<br/>[github.rs]"]
  node_gh_cli["GitHub CLI"]
end

subgraph group_runtime["Application runtime"]
  node_api["Frontend API client<br/>[api.ts]"]
  node_server["Desktop and HTTP entry<br/>[main.rs]"]
  node_service["Action dispatcher<br/>[service.rs]"]
end

node_user(("Repository user"))

node_user -->|"uses"| node_app
node_app -->|"requests actions"| node_api
node_app -->|"renders"| node_branches_ui
node_app -->|"renders"| node_diff
node_app -->|"renders"| node_changes
node_app -->|"renders"| node_history
node_overview -->|"renders"| node_activity
node_overview -->|"requests data"| node_api
node_repo_settings -->|"renders"| node_settings_parts
node_repo_settings -->|"requests settings"| node_api
node_github_ui -->|"renders"| node_github_more
node_github_ui -->|"renders"| node_pr_parts
node_github_ui -->|"renders"| node_diff
node_github_ui -->|"requests actions"| node_api
node_diff -->|"summarizes via"| node_api
node_api -->|"posts actions"| node_server
node_server -->|"dispatches"| node_service
node_service -->|"runs Git actions"| node_git_core
node_service -->|"dispatches"| node_branches
node_service -->|"dispatches"| node_commit_edit
node_service -->|"dispatches"| node_rewrite
node_service -.->|"dispatches"| node_conflict
node_service -.->|"dispatches"| node_hunks
node_service -->|"dispatches"| node_remotes
node_service -.->|"dispatches"| node_stash
node_service -->|"dispatches"| node_tags
node_service -->|"dispatches"| node_packages
node_service -.->|"dispatches"| node_activity_backend
node_service -->|"dispatches"| node_github_backend
node_branches -->|"uses Git helpers"| node_git_core
node_commit_edit -->|"uses Git helpers"| node_git_core
node_rewrite -->|"uses Git helpers"| node_git_core
node_conflict -->|"uses Git helpers"| node_git_core
node_hunks -->|"uses Git helpers"| node_git_core
node_remotes -->|"uses Git helpers"| node_git_core
node_stash -->|"uses Git helpers"| node_git_core
node_tags -->|"uses Git helpers"| node_git_core
node_packages -->|"uses Git helpers"| node_git_core
node_activity_backend -->|"uses Git helpers"| node_git_core
node_git_core -.->|"runs commands"| node_git_cli
node_github_backend -->|"runs commands"| node_gh_cli
node_github_backend -->|"uses Git helpers"| node_git_core

click node_app "https://github.com/melthond/gitowl/blob/main/frontend/src/App.tsx"
click node_changes "https://github.com/melthond/gitowl/blob/main/frontend/src/components/ChangesParts.tsx"
click node_history "https://github.com/melthond/gitowl/blob/main/frontend/src/components/HistoryParts.tsx"
click node_branches_ui "https://github.com/melthond/gitowl/blob/main/frontend/src/components/BranchPanel.tsx"
click node_overview "https://github.com/melthond/gitowl/blob/main/frontend/src/components/Overview.tsx"
click node_activity "https://github.com/melthond/gitowl/blob/main/frontend/src/components/RepositoryActivity.tsx"
click node_repo_settings "https://github.com/melthond/gitowl/blob/main/frontend/src/components/RepositorySettings.tsx"
click node_settings_parts "https://github.com/melthond/gitowl/blob/main/frontend/src/components/SettingsParts.tsx"
click node_github_ui "https://github.com/melthond/gitowl/blob/main/frontend/src/components/GitHubPanel.tsx"
click node_github_more "https://github.com/melthond/gitowl/blob/main/frontend/src/components/GitHubMore.tsx"
click node_pr_parts "https://github.com/melthond/gitowl/blob/main/frontend/src/components/PrParts.tsx"
click node_diff "https://github.com/melthond/gitowl/blob/main/frontend/src/components/Diff.tsx"
click node_api "https://github.com/melthond/gitowl/blob/main/frontend/src/api.ts"
click node_server "https://github.com/melthond/gitowl/blob/main/src/main.rs"
click node_service "https://github.com/melthond/gitowl/blob/main/src/service.rs"
click node_git_core "https://github.com/melthond/gitowl/blob/main/src/git.rs"
click node_branches "https://github.com/melthond/gitowl/blob/main/src/branches.rs"
click node_commit_edit "https://github.com/melthond/gitowl/blob/main/src/commit_edit.rs"
click node_rewrite "https://github.com/melthond/gitowl/blob/main/src/rewrite.rs"
click node_conflict "https://github.com/melthond/gitowl/blob/main/src/conflict.rs"
click node_hunks "https://github.com/melthond/gitowl/blob/main/src/hunks.rs"
click node_remotes "https://github.com/melthond/gitowl/blob/main/src/remotes.rs"
click node_stash "https://github.com/melthond/gitowl/blob/main/src/stash.rs"
click node_tags "https://github.com/melthond/gitowl/blob/main/src/tags.rs"
click node_packages "https://github.com/melthond/gitowl/blob/main/src/packages.rs"
click node_activity_backend "https://github.com/melthond/gitowl/blob/main/src/activity.rs"
click node_github_backend "https://github.com/melthond/gitowl/blob/main/src/github.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,node_changes,node_history,node_branches_ui,node_overview,node_activity,node_repo_settings,node_settings_parts,node_github_ui,node_github_more,node_pr_parts,node_diff,node_user toneBlue
class node_git_core,node_branches,node_commit_edit,node_rewrite,node_conflict,node_hunks,node_remotes,node_stash,node_tags,node_packages,node_activity_backend,node_git_cli toneAmber
class node_github_backend,node_gh_cli toneMint
class node_api,node_server,node_service toneRose
```

## Components

### Workspace interface

- [Workspace shell](https://github.com/melthond/gitowl/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Changes and diffs](https://github.com/melthond/gitowl/blob/main/frontend/src/components/ChangesParts.tsx): `frontend/src/components/ChangesParts.tsx`
- [History and reflog](https://github.com/melthond/gitowl/blob/main/frontend/src/components/HistoryParts.tsx): `frontend/src/components/HistoryParts.tsx`
- [Branch controls](https://github.com/melthond/gitowl/blob/main/frontend/src/components/BranchPanel.tsx): `frontend/src/components/BranchPanel.tsx`
- [Overview and activity](https://github.com/melthond/gitowl/blob/main/frontend/src/components/Overview.tsx): `frontend/src/components/Overview.tsx`
- [Activity heatmap](https://github.com/melthond/gitowl/blob/main/frontend/src/components/RepositoryActivity.tsx): `frontend/src/components/RepositoryActivity.tsx`
- [Repository settings](https://github.com/melthond/gitowl/blob/main/frontend/src/components/RepositorySettings.tsx): `frontend/src/components/RepositorySettings.tsx`
- [Settings panes](https://github.com/melthond/gitowl/blob/main/frontend/src/components/SettingsParts.tsx): `frontend/src/components/SettingsParts.tsx`
- [GitHub workspace](https://github.com/melthond/gitowl/blob/main/frontend/src/components/GitHubPanel.tsx): `frontend/src/components/GitHubPanel.tsx`
- [GitHub management](https://github.com/melthond/gitowl/blob/main/frontend/src/components/GitHubMore.tsx): `frontend/src/components/GitHubMore.tsx`
- [PR review parts](https://github.com/melthond/gitowl/blob/main/frontend/src/components/PrParts.tsx): `frontend/src/components/PrParts.tsx`
- [Diff renderer](https://github.com/melthond/gitowl/blob/main/frontend/src/components/Diff.tsx): `frontend/src/components/Diff.tsx`

### Local Git

- [Git operations](https://github.com/melthond/gitowl/blob/main/src/git.rs): `src/git.rs`
- [Branch operations](https://github.com/melthond/gitowl/blob/main/src/branches.rs): `src/branches.rs`
- [Commit editing](https://github.com/melthond/gitowl/blob/main/src/commit_edit.rs): `src/commit_edit.rs`
- [History rewriting](https://github.com/melthond/gitowl/blob/main/src/rewrite.rs): `src/rewrite.rs`
- [Conflict handling](https://github.com/melthond/gitowl/blob/main/src/conflict.rs): `src/conflict.rs`
- [Hunk staging](https://github.com/melthond/gitowl/blob/main/src/hunks.rs): `src/hunks.rs`
- [Remote management](https://github.com/melthond/gitowl/blob/main/src/remotes.rs): `src/remotes.rs`
- [Stash operations](https://github.com/melthond/gitowl/blob/main/src/stash.rs): `src/stash.rs`
- [Tag operations](https://github.com/melthond/gitowl/blob/main/src/tags.rs): `src/tags.rs`
- [Package operations](https://github.com/melthond/gitowl/blob/main/src/packages.rs): `src/packages.rs`
- [Activity data](https://github.com/melthond/gitowl/blob/main/src/activity.rs): `src/activity.rs`
- **Git executable**

### GitHub features

- [GitHub CLI actions](https://github.com/melthond/gitowl/blob/main/src/github.rs): `src/github.rs`
- **GitHub CLI**

### Application runtime

- [Frontend API client](https://github.com/melthond/gitowl/blob/main/frontend/src/api.ts): `frontend/src/api.ts`
- [Desktop and HTTP entry](https://github.com/melthond/gitowl/blob/main/src/main.rs): `src/main.rs`
- [Action dispatcher](https://github.com/melthond/gitowl/blob/main/src/service.rs): `src/service.rs`

### Other components

- **Repository user**

## Connections

- Repository user → Workspace shell: uses (evidence: `README.md`)
- Workspace shell → Frontend API client: requests actions (evidence: `frontend/src/App.tsx`)
- Workspace shell → Branch controls: renders (evidence: `frontend/src/App.tsx`)
- Workspace shell → Diff renderer: renders (evidence: `frontend/src/App.tsx`)
- Workspace shell → Changes and diffs: renders (evidence: `frontend/src/App.tsx`)
- Workspace shell → History and reflog: renders (evidence: `frontend/src/App.tsx`)
- Overview and activity → Activity heatmap: renders (evidence: `frontend/src/components/Overview.tsx`)
- Overview and activity → Frontend API client: requests data (evidence: `frontend/src/components/Overview.tsx`)
- Repository settings → Settings panes: renders (evidence: `frontend/src/components/RepositorySettings.tsx`)
- Repository settings → Frontend API client: requests settings (evidence: `frontend/src/components/RepositorySettings.tsx`)
- GitHub workspace → GitHub management: renders (evidence: `frontend/src/components/GitHubPanel.tsx`)
- GitHub workspace → PR review parts: renders (evidence: `frontend/src/components/GitHubPanel.tsx`)
- GitHub workspace → Diff renderer: renders (evidence: `frontend/src/components/GitHubPanel.tsx`)
- GitHub workspace → Frontend API client: requests actions (evidence: `frontend/src/components/GitHubPanel.tsx`)
- Diff renderer → Frontend API client: summarizes via (evidence: `frontend/src/components/Diff.tsx`)
- Frontend API client → Desktop and HTTP entry: posts actions (evidence: `frontend/src/api.ts`)
- Desktop and HTTP entry → Action dispatcher: dispatches (evidence: `src/main.rs`)
- Action dispatcher → Git operations: runs Git actions (evidence: `src/service.rs`)
- Action dispatcher → Branch operations: dispatches (evidence: `src/service.rs`)
- Action dispatcher → Commit editing: dispatches (evidence: `src/service.rs`)
- Action dispatcher → History rewriting: dispatches (evidence: `src/service.rs`)
- Action dispatcher → Conflict handling: dispatches (evidence: `src/service.rs`)
- Action dispatcher → Hunk staging: dispatches (evidence: `src/service.rs`)
- Action dispatcher → Remote management: dispatches (evidence: `src/service.rs`)
- Action dispatcher → Stash operations: dispatches (evidence: `src/service.rs`)
- Action dispatcher → Tag operations: dispatches (evidence: `src/service.rs`)
- Action dispatcher → Package operations: dispatches (evidence: `src/service.rs`)
- Action dispatcher → Activity data: dispatches (evidence: `src/service.rs`)
- Action dispatcher → GitHub CLI actions: dispatches (evidence: `src/service.rs`)
- Branch operations → Git operations: uses Git helpers (evidence: `src/branches.rs`)
- Commit editing → Git operations: uses Git helpers (evidence: `src/commit_edit.rs`)
- History rewriting → Git operations: uses Git helpers (evidence: `src/rewrite.rs`)
- Conflict handling → Git operations: uses Git helpers (evidence: `src/conflict.rs`)
- Hunk staging → Git operations: uses Git helpers (evidence: `src/hunks.rs`)
- Remote management → Git operations: uses Git helpers (evidence: `src/remotes.rs`)
- Stash operations → Git operations: uses Git helpers (evidence: `src/stash.rs`)
- Tag operations → Git operations: uses Git helpers (evidence: `src/tags.rs`)
- Package operations → Git operations: uses Git helpers (evidence: `src/packages.rs`)
- Activity data → Git operations: uses Git helpers (evidence: `src/activity.rs`)
- Git operations → Git executable: runs commands
- GitHub CLI actions → GitHub CLI: runs commands (evidence: `src/github.rs`)
- GitHub CLI actions → Git operations: uses Git helpers (evidence: `src/github.rs`)
