# howarewoo/git-stacks architecture

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

- Interactive diagram: https://gitdiagram.com/howarewoo/git-stacks
- Repository: https://github.com/howarewoo/git-stacks

## Overview

Git Stacks is a local-first Electron desktop app for managing Git branches and pull-request stacks, reviewing changes, and coordinating publishing workflows without a separate stack CLI. The principal path is a developer operating the renderer, which uses the preload bridge to request main-process Git or GitHub work and displays the resulting repository, stack, and review state. The graph also preserves onboarding, settings, notifications, and signed updates. Several implementation links are documented or visible in the source index; unsampled subsystem wiring is not asserted.

Main entry points: [`apps/desktop/src/renderer/src/App.tsx`](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/App.tsx) (Workspace UI), [`apps/desktop/src/main/index.ts`](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/index.ts) (Main process), [`apps/desktop/src/main/clone-repository.ts`](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/clone-repository.ts) (Repository clone), [`apps/desktop/src/main/update/service.ts`](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/update/service.ts) (Update service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_renderer["Workspace UI<br/>[App.tsx]"]
  node_repository_views["Repository views"]
  node_workflow_dialog["Stack workflows"]
  node_workflow_composition["Workflow composition"]
  node_graph_workbench["Graph workbench"]
  node_onboarding["Onboarding<br/>[onboarding.tsx]"]
  node_settings_ui["Settings UI"]
  node_preload["Preload bridge<br/>[index.ts]"]
  node_main["Main process<br/>[index.ts]"]
end

subgraph group_git["Local Git"]
  node_git_core["Git operations<br/>[git-core.ts]"]
  node_git_runtime["Git runtime<br/>[git-runtime.ts]"]
  node_clone["Repository clone"]
  node_scheduler["Repository refresh"]
  node_promote["Clone promotion"]
end

subgraph group_github["Pull requests"]
  node_github["GitHub services<br/>[github.ts]"]
  node_pr_inbox["PR inbox<br/>[pr-inbox.ts]"]
  node_review["Review services<br/>[review.ts]"]
end

subgraph group_platform["Shared and platform"]
  node_review_domain["Review domain<br/>[review.ts]"]
  node_shared_types["Shared domain<br/>[types.ts]"]
  node_ui_package["UI components<br/>[button.tsx]"]
  node_updates["Update service<br/>[service.ts]"]
  node_update_manifest["Update verification<br/>[manifest.ts]"]
  node_update_artifact["Update artifacts<br/>[artifact.ts]"]
  node_update_install["Update installation<br/>[install.ts]"]
end

node_developer(("Developer"))
node_github_service{{"GitHub"}}

node_developer -->|"operates"| node_renderer
node_renderer -.->|"requests via"| node_preload
node_preload -.->|"bridges to"| node_main
node_renderer -.->|"renders"| node_repository_views
node_renderer -->|"opens"| node_workflow_dialog
node_workflow_dialog -->|"renders"| node_workflow_composition
node_renderer -.->|"renders"| node_graph_workbench
node_renderer -->|"renders"| node_onboarding
node_renderer -.->|"opens"| node_settings_ui
node_main -.->|"dispatches"| node_clone
node_clone -->|"executes Git"| node_git_core
node_clone -->|"resolves runtime"| node_git_runtime
node_clone -->|"promotes clone"| node_promote
node_git_core -->|"uses runtime"| node_git_runtime
node_main -.->|"dispatches"| node_scheduler
node_scheduler -->|"refreshes through"| node_git_core
node_main -.->|"dispatches"| node_github
node_main -.->|"dispatches"| node_pr_inbox
node_main -.->|"dispatches"| node_review
node_github -.->|"communicates with"| node_github_service
node_review -.->|"uses domain types"| node_review_domain
node_review_domain -->|"imports types"| node_shared_types
node_renderer -->|"uses controls"| node_ui_package
node_main -.->|"dispatches"| node_updates
node_updates -->|"loads verified feed"| node_update_manifest
node_updates -->|"downloads artifact"| node_update_artifact
node_updates -->|"resolves install"| node_update_install

click node_renderer "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/App.tsx"
click node_repository_views "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/repository-views.tsx"
click node_workflow_dialog "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/workflow-dialog.tsx"
click node_workflow_composition "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/workflow-composition.tsx"
click node_graph_workbench "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/graph-workbench.tsx"
click node_onboarding "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/onboarding.tsx"
click node_settings_ui "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/settings-dialog.tsx"
click node_preload "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/preload/index.ts"
click node_main "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/index.ts"
click node_git_core "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/git-core.ts"
click node_git_runtime "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/git-runtime.ts"
click node_clone "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/clone-repository.ts"
click node_scheduler "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/repository-scheduler.ts"
click node_promote "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/promote-repository.ts"
click node_github "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/github.ts"
click node_pr_inbox "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/pr-inbox.ts"
click node_review "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/review.ts"
click node_review_domain "https://github.com/howarewoo/git-stacks/blob/main/packages/shared/src/review.ts"
click node_shared_types "https://github.com/howarewoo/git-stacks/blob/main/packages/shared/src/types.ts"
click node_ui_package "https://github.com/howarewoo/git-stacks/blob/main/packages/ui/src/components/ui/button.tsx"
click node_updates "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/update/service.ts"
click node_update_manifest "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/update/manifest.ts"
click node_update_artifact "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/update/artifact.ts"
click node_update_install "https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/update/install.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_renderer,node_repository_views,node_workflow_dialog,node_workflow_composition,node_graph_workbench,node_onboarding,node_settings_ui,node_preload,node_main toneBlue
class node_git_core,node_git_runtime,node_clone,node_scheduler,node_promote toneAmber
class node_github,node_pr_inbox,node_review toneMint
class node_review_domain,node_shared_types,node_ui_package,node_updates,node_update_manifest,node_update_artifact,node_update_install toneRose
class node_developer,node_github_service toneIndigo
```

## Components

### Desktop experience

- [Workspace UI](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/App.tsx): `apps/desktop/src/renderer/src/App.tsx`
- [Repository views](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/repository-views.tsx): `apps/desktop/src/renderer/src/components/repository-views.tsx`
- [Stack workflows](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/workflow-dialog.tsx): `apps/desktop/src/renderer/src/components/workflow-dialog.tsx`
- [Workflow composition](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/workflow-composition.tsx): `apps/desktop/src/renderer/src/components/workflow-composition.tsx`
- [Graph workbench](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/graph-workbench.tsx): `apps/desktop/src/renderer/src/components/graph-workbench.tsx`
- [Onboarding](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/onboarding.tsx): `apps/desktop/src/renderer/src/components/onboarding.tsx`
- [Settings UI](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/renderer/src/components/settings-dialog.tsx): `apps/desktop/src/renderer/src/components/settings-dialog.tsx`
- [Preload bridge](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/preload/index.ts): `apps/desktop/src/preload/index.ts`
- [Main process](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/index.ts): `apps/desktop/src/main/index.ts`

### Local Git

- [Git operations](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/git-core.ts): `apps/desktop/src/main/git-core.ts`
- [Git runtime](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/git-runtime.ts): `apps/desktop/src/main/git-runtime.ts`
- [Repository clone](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/clone-repository.ts): `apps/desktop/src/main/clone-repository.ts`
- [Repository refresh](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/repository-scheduler.ts): `apps/desktop/src/main/repository-scheduler.ts`
- [Clone promotion](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/promote-repository.ts): `apps/desktop/src/main/promote-repository.ts`

### Pull requests

- [GitHub services](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/github.ts): `apps/desktop/src/main/github.ts`
- [PR inbox](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/pr-inbox.ts): `apps/desktop/src/main/pr-inbox.ts`
- [Review services](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/review.ts): `apps/desktop/src/main/review.ts`

### Shared and platform

- [Review domain](https://github.com/howarewoo/git-stacks/blob/main/packages/shared/src/review.ts): `packages/shared/src/review.ts`
- [Shared domain](https://github.com/howarewoo/git-stacks/blob/main/packages/shared/src/types.ts): `packages/shared/src/types.ts`
- [UI components](https://github.com/howarewoo/git-stacks/blob/main/packages/ui/src/components/ui/button.tsx): `packages/ui/src/components/ui/button.tsx`
- [Update service](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/update/service.ts): `apps/desktop/src/main/update/service.ts`
- [Update verification](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/update/manifest.ts): `apps/desktop/src/main/update/manifest.ts`
- [Update artifacts](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/update/artifact.ts): `apps/desktop/src/main/update/artifact.ts`
- [Update installation](https://github.com/howarewoo/git-stacks/blob/main/apps/desktop/src/main/update/install.ts): `apps/desktop/src/main/update/install.ts`

### Other components

- **Developer**
- **GitHub**

## Connections

- Developer → Workspace UI: operates (evidence: `README.md`)
- Workspace UI → Preload bridge: requests via (evidence: `README.md`)
- Preload bridge → Main process: bridges to (evidence: `README.md`)
- Workspace UI → Repository views: renders (evidence: `apps/desktop/src/renderer/src/App.tsx`)
- Workspace UI → Stack workflows: opens (evidence: `apps/desktop/src/renderer/src/App.tsx`)
- Stack workflows → Workflow composition: renders (evidence: `apps/desktop/src/renderer/src/components/workflow-dialog.tsx`)
- Workspace UI → Graph workbench: renders (evidence: `apps/desktop/src/renderer/src/App.tsx`)
- Workspace UI → Onboarding: renders (evidence: `apps/desktop/src/renderer/src/App.tsx`)
- Workspace UI → Settings UI: opens (evidence: `apps/desktop/src/renderer/src/App.tsx`)
- Main process → Repository clone: dispatches
- Repository clone → Git operations: executes Git (evidence: `apps/desktop/src/main/clone-repository.ts`)
- Repository clone → Git runtime: resolves runtime (evidence: `apps/desktop/src/main/clone-repository.ts`)
- Repository clone → Clone promotion: promotes clone (evidence: `apps/desktop/src/main/clone-repository.ts`)
- Git operations → Git runtime: uses runtime (evidence: `apps/desktop/src/main/git-core.ts`)
- Main process → Repository refresh: dispatches
- Repository refresh → Git operations: refreshes through (evidence: `apps/desktop/src/main/repository-scheduler.ts`)
- Main process → GitHub services: dispatches
- Main process → PR inbox: dispatches
- Main process → Review services: dispatches
- GitHub services → GitHub: communicates with
- Review services → Review domain: uses domain types
- Review domain → Shared domain: imports types (evidence: `packages/shared/src/review.ts`)
- Workspace UI → UI components: uses controls
- Main process → Update service: dispatches
- Update service → Update verification: loads verified feed (evidence: `apps/desktop/src/main/update/service.ts`)
- Update service → Update artifacts: downloads artifact (evidence: `apps/desktop/src/main/update/service.ts`)
- Update service → Update installation: resolves install (evidence: `apps/desktop/src/main/update/service.ts`)
