# malpor23/gitora architecture

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

- Interactive diagram: https://gitdiagram.com/malpor23/gitora
- Repository: https://github.com/malpor23/gitora

## Overview

Gitora is a desktop Git client: users open, clone, or create a repository, inspect and change its working tree/history, then commit and manage branches or remotes. The Angular UI communicates through a shared API to Electron, which runs the installed Git executable; separate provider integrations support account authentication, remote repository discovery, and pull requests. README-documented capabilities include conflict resolution, repository insights, and command-palette actions. Some feature implementations were not sampled, so their internal call relationships are omitted.

Main entry points: [`src/app/core/services/bridge.service.ts`](https://github.com/malpor23/gitora/blob/main/src/app/core/services/bridge.service.ts) (IPC bridge), [`src/app/app.ts`](https://github.com/malpor23/gitora/blob/main/src/app/app.ts) (App shell), [`electron/main.ts`](https://github.com/malpor23/gitora/blob/main/electron/main.ts) (Electron main), [`electron/git/git-service.ts`](https://github.com/malpor23/gitora/blob/main/electron/git/git-service.ts) (Git service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app["App shell<br/>[app.ts]"]
  node_workspace["Workspace"]
  node_repo_state["Repository state"]
  node_changes["Working changes<br/>[changes.ts]"]
  node_history["History viewer<br/>[viewer.ts]"]
  node_git_actions["Git actions"]
  node_commands["Command palette"]
  node_conflicts["Conflict resolver"]
  node_insights["Repository insights<br/>[repo-stats.ts]"]
  node_remote_ui["Remote features<br/>[pull-requests.ts]"]
end

subgraph group_git["Local Git operations"]
  node_git_service["Git service<br/>[git-service.ts]"]
  node_git_runner["Git process runner<br/>[git-runner.ts]"]
  node_git_parsers["Git output parsers<br/>[log.parser.ts]"]
  node_git_flow["Git flow operations<br/>[git-flow.ts]"]
end

subgraph group_providers["Remote providers"]
  node_provider_registry["Provider registry"]
  node_provider_api["Provider clients<br/>[provider.ts]"]
  node_oauth["OAuth device flow<br/>[oauth.ts]"]
end

subgraph group_runtime["Electron runtime"]
  node_bridge["IPC bridge<br/>[bridge.service.ts]"]
  node_api["Shared API<br/>[api.ts]"]
  node_main["Electron main<br/>[main.ts]"]
  node_watcher["Repository watcher<br/>[repo-watcher.ts]"]
  node_settings[("Settings store<br/>[settings-store.ts]")]
end

node_user(("User"))
node_remote_services{{"Git hosting services"}}
node_git_binary{{"Installed Git"}}

node_user -->|"uses"| node_app
node_app -->|"restores workspace"| node_workspace
node_app -->|"dispatches commands"| node_commands
node_app -.->|"uses actions"| node_git_actions
node_app -.->|"invokes"| node_bridge
node_workspace -.->|"maintains state"| node_repo_state
node_changes -.->|"requests changes"| node_git_actions
node_history -.->|"requests history"| node_bridge
node_conflicts -.->|"requests resolution"| node_bridge
node_insights -.->|"requests analysis"| node_bridge
node_remote_ui -.->|"requests remotes"| node_bridge
node_bridge -.->|"uses contract"| node_api
node_main -->|"implements operations"| node_api
node_main -->|"dispatches Git operations"| node_git_service
node_main -->|"reads and updates"| node_settings
node_main -->|"watches repositories"| node_watcher
node_git_service -->|"runs commands"| node_git_runner
node_git_service -->|"parses output"| node_git_parsers
node_git_service -->|"uses flow operations"| node_git_flow
node_git_runner -->|"spawns"| node_git_binary
node_provider_registry -->|"uses clients"| node_provider_api
node_provider_registry -->|"starts device flow"| node_oauth
node_provider_registry -->|"loads accounts"| node_settings
node_provider_api -.->|"calls APIs"| node_remote_services
node_git_runner -.->|"accesses Git remotes"| node_remote_services

click node_app "https://github.com/malpor23/gitora/blob/main/src/app/app.ts"
click node_workspace "https://github.com/malpor23/gitora/blob/main/src/app/core/services/workspace.service.ts"
click node_repo_state "https://github.com/malpor23/gitora/blob/main/src/app/core/store/repository.store.ts"
click node_changes "https://github.com/malpor23/gitora/blob/main/src/app/features/changes/changes.ts"
click node_history "https://github.com/malpor23/gitora/blob/main/src/app/features/history/viewer/viewer.ts"
click node_git_actions "https://github.com/malpor23/gitora/blob/main/src/app/features/actions/git-flows.service.ts"
click node_commands "https://github.com/malpor23/gitora/blob/main/src/app/features/actions/commands.service.ts"
click node_conflicts "https://github.com/malpor23/gitora/blob/main/src/app/features/dialogs/conflict-resolver/conflict-resolver.ts"
click node_insights "https://github.com/malpor23/gitora/blob/main/src/app/features/dialogs/repo-stats/repo-stats.ts"
click node_remote_ui "https://github.com/malpor23/gitora/blob/main/src/app/features/remote/pull-requests/pull-requests.ts"
click node_bridge "https://github.com/malpor23/gitora/blob/main/src/app/core/services/bridge.service.ts"
click node_api "https://github.com/malpor23/gitora/blob/main/shared/api.ts"
click node_main "https://github.com/malpor23/gitora/blob/main/electron/main.ts"
click node_watcher "https://github.com/malpor23/gitora/blob/main/electron/repo-watcher.ts"
click node_settings "https://github.com/malpor23/gitora/blob/main/electron/settings-store.ts"
click node_git_service "https://github.com/malpor23/gitora/blob/main/electron/git/git-service.ts"
click node_git_runner "https://github.com/malpor23/gitora/blob/main/electron/git/git-runner.ts"
click node_git_parsers "https://github.com/malpor23/gitora/blob/main/electron/git/parsers/log.parser.ts"
click node_git_flow "https://github.com/malpor23/gitora/blob/main/electron/git/git-flow.ts"
click node_provider_registry "https://github.com/malpor23/gitora/blob/main/electron/providers/provider-registry.ts"
click node_provider_api "https://github.com/malpor23/gitora/blob/main/electron/providers/provider.ts"
click node_oauth "https://github.com/malpor23/gitora/blob/main/electron/providers/oauth.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_app,node_workspace,node_repo_state,node_changes,node_history,node_git_actions,node_commands,node_conflicts,node_insights,node_remote_ui,node_user toneBlue
class node_git_service,node_git_runner,node_git_parsers,node_git_flow toneAmber
class node_provider_registry,node_provider_api,node_oauth toneMint
class node_bridge,node_api,node_main,node_watcher,node_settings toneRose
class node_remote_services,node_git_binary toneIndigo
```

## Components

### Desktop interface

- [App shell](https://github.com/malpor23/gitora/blob/main/src/app/app.ts): `src/app/app.ts`
- [Workspace](https://github.com/malpor23/gitora/blob/main/src/app/core/services/workspace.service.ts): `src/app/core/services/workspace.service.ts`
- [Repository state](https://github.com/malpor23/gitora/blob/main/src/app/core/store/repository.store.ts): `src/app/core/store/repository.store.ts`
- [Working changes](https://github.com/malpor23/gitora/blob/main/src/app/features/changes/changes.ts): `src/app/features/changes/changes.ts`
- [History viewer](https://github.com/malpor23/gitora/blob/main/src/app/features/history/viewer/viewer.ts): `src/app/features/history/viewer/viewer.ts`
- [Git actions](https://github.com/malpor23/gitora/blob/main/src/app/features/actions/git-flows.service.ts): `src/app/features/actions/git-flows.service.ts`
- [Command palette](https://github.com/malpor23/gitora/blob/main/src/app/features/actions/commands.service.ts): `src/app/features/actions/commands.service.ts`
- [Conflict resolver](https://github.com/malpor23/gitora/blob/main/src/app/features/dialogs/conflict-resolver/conflict-resolver.ts): `src/app/features/dialogs/conflict-resolver/conflict-resolver.ts`
- [Repository insights](https://github.com/malpor23/gitora/blob/main/src/app/features/dialogs/repo-stats/repo-stats.ts): `src/app/features/dialogs/repo-stats/repo-stats.ts`
- [Remote features](https://github.com/malpor23/gitora/blob/main/src/app/features/remote/pull-requests/pull-requests.ts): `src/app/features/remote/pull-requests/pull-requests.ts`

### Local Git operations

- [Git service](https://github.com/malpor23/gitora/blob/main/electron/git/git-service.ts): `electron/git/git-service.ts`
- [Git process runner](https://github.com/malpor23/gitora/blob/main/electron/git/git-runner.ts): `electron/git/git-runner.ts`
- [Git output parsers](https://github.com/malpor23/gitora/blob/main/electron/git/parsers/log.parser.ts): `electron/git/parsers/log.parser.ts`
- [Git flow operations](https://github.com/malpor23/gitora/blob/main/electron/git/git-flow.ts): `electron/git/git-flow.ts`

### Remote providers

- [Provider registry](https://github.com/malpor23/gitora/blob/main/electron/providers/provider-registry.ts): `electron/providers/provider-registry.ts`
- [Provider clients](https://github.com/malpor23/gitora/blob/main/electron/providers/provider.ts): `electron/providers/provider.ts`
- [OAuth device flow](https://github.com/malpor23/gitora/blob/main/electron/providers/oauth.ts): `electron/providers/oauth.ts`

### Electron runtime

- [IPC bridge](https://github.com/malpor23/gitora/blob/main/src/app/core/services/bridge.service.ts): `src/app/core/services/bridge.service.ts`
- [Shared API](https://github.com/malpor23/gitora/blob/main/shared/api.ts): `shared/api.ts`
- [Electron main](https://github.com/malpor23/gitora/blob/main/electron/main.ts): `electron/main.ts`
- [Repository watcher](https://github.com/malpor23/gitora/blob/main/electron/repo-watcher.ts): `electron/repo-watcher.ts`
- [Settings store](https://github.com/malpor23/gitora/blob/main/electron/settings-store.ts): `electron/settings-store.ts`

### Other components

- **User**
- **Git hosting services**
- **Installed Git**

## Connections

- User → App shell: uses (evidence: `README.md`)
- App shell → Workspace: restores workspace (evidence: `src/app/app.ts`)
- App shell → Command palette: dispatches commands (evidence: `src/app/app.ts`)
- App shell → Git actions: uses actions
- App shell → IPC bridge: invokes
- Workspace → Repository state: maintains state
- Working changes → Git actions: requests changes
- History viewer → IPC bridge: requests history
- Conflict resolver → IPC bridge: requests resolution
- Repository insights → IPC bridge: requests analysis
- Remote features → IPC bridge: requests remotes
- IPC bridge → Shared API: uses contract
- Electron main → Shared API: implements operations (evidence: `electron/main.ts`)
- Electron main → Git service: dispatches Git operations (evidence: `electron/main.ts`)
- Electron main → Settings store: reads and updates (evidence: `electron/main.ts`)
- Electron main → Repository watcher: watches repositories (evidence: `electron/main.ts`)
- Git service → Git process runner: runs commands (evidence: `electron/git/git-service.ts`)
- Git service → Git output parsers: parses output (evidence: `electron/git/git-service.ts`)
- Git service → Git flow operations: uses flow operations (evidence: `electron/git/git-service.ts`)
- Git process runner → Installed Git: spawns (evidence: `electron/git/git-runner.ts`)
- Provider registry → Provider clients: uses clients (evidence: `electron/providers/provider-registry.ts`)
- Provider registry → OAuth device flow: starts device flow (evidence: `electron/providers/provider-registry.ts`)
- Provider registry → Settings store: loads accounts (evidence: `electron/providers/provider-registry.ts`)
- Provider clients → Git hosting services: calls APIs
- Git process runner → Git hosting services: accesses Git remotes
