# edfloreshz/devmode architecture

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

- Interactive diagram: https://gitdiagram.com/edfloreshz/devmode
- Repository: https://github.com/edfloreshz/devmode

## Overview

Devmode is a local-first project and workspace manager with CLI, terminal, and desktop interfaces over shared core data. The main workflow is to clone, create, track, or discover repositories; organize their paths and metadata; then search or group them into workspaces and open a workspace in an editor. The graph preserves those domain stages and the shared Git, discovery, and persistence layers. Some command and UI implementations are unsampled, so their links rely on documented shared behavior and are limited to those capabilities.

Main entry points: [`crates/cli/src/commands/repo`](https://github.com/edfloreshz/devmode/tree/main/crates/cli/src/commands/repo) (Repo operations), [`crates/cli/src/commands/workspace`](https://github.com/edfloreshz/devmode/tree/main/crates/cli/src/commands/workspace) (Workspace operations), [`crates/core/src/registry/store.rs`](https://github.com/edfloreshz/devmode/blob/main/crates/core/src/registry/store.rs) (Repository registry), [`crates/cli/src/main.rs`](https://github.com/edfloreshz/devmode/blob/main/crates/cli/src/main.rs) (CLI entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["CLI entry<br/>[main.rs]"]
  node_cli_repo["Repo commands"]
  node_cli_ws["Workspace commands"]
  node_tui["Terminal UI<br/>[app.rs]"]
  node_tui_views["Terminal views<br/>[mod.rs]"]
  node_gui["Desktop app<br/>[app.rs]"]
  node_gui_screens["Desktop screens"]
end

subgraph group_repo["Repository management"]
  node_repo_ops["Repo operations"]
  node_discovery["Discovery and sync<br/>[discovery.rs]"]
  node_layout["Layout and relayout<br/>[layout.rs]"]
  node_git["Local Git<br/>[mod.rs]"]
end

subgraph group_workspace["Workspaces"]
  node_workspace_ops["Workspace operations"]
  node_workspace_switch["Workspace switch<br/>[switch.rs]"]
end

subgraph group_core["Shared core"]
  node_registry[("Repository registry<br/>[store.rs]")]
  node_workspace_store[("Workspace store<br/>[store.rs]")]
  node_config["Configuration<br/>[config.rs]"]
end

node_user(("Developer"))
node_local_disk["Local filesystem"]
node_git_remote["Git remote"]
node_editor["Configured editor"]

node_user -->|"runs commands"| node_cli
node_user -->|"browses and edits"| node_tui
node_user -->|"browses and edits"| node_gui
node_cli -->|"dispatches repo"| node_cli_repo
node_cli -->|"dispatches workspace"| node_cli_ws
node_cli_repo -->|"invokes"| node_repo_ops
node_cli_ws -->|"invokes"| node_workspace_ops
node_tui -->|"renders"| node_tui_views
node_tui -->|"performs repo actions"| node_repo_ops
node_tui -->|"performs workspace actions"| node_workspace_ops
node_gui -->|"dispatches messages"| node_gui_screens
node_gui_screens -->|"performs repo actions"| node_repo_ops
node_gui_screens -->|"performs workspace actions"| node_workspace_ops
node_gui_screens -->|"scans and resolves"| node_discovery
node_repo_ops -->|"clones and inspects"| node_git
node_repo_ops -->|"places and relayouts"| node_layout
node_repo_ops -->|"tracks and queries"| node_registry
node_discovery -->|"finds repos and remotes"| node_git
node_discovery -->|"checks and updates"| node_registry
node_git -->|"reads and writes repos"| node_local_disk
node_git -.->|"clones over Git"| node_git_remote
node_layout -->|"moves repos"| node_local_disk
node_layout -->|"updates paths"| node_registry
node_workspace_ops -->|"manages workspaces"| node_workspace_store
node_workspace_ops -->|"resolves repo members"| node_registry
node_workspace_switch -->|"reads members and settings"| node_workspace_store
node_workspace_switch -->|"resolves member paths"| node_registry
node_workspace_switch -->|"opens workspace"| node_editor
node_cli -->|"uses configuration"| node_config
node_repo_ops -->|"reads repo settings"| node_config

click node_cli "https://github.com/edfloreshz/devmode/blob/main/crates/cli/src/main.rs"
click node_cli_repo "https://github.com/edfloreshz/devmode/tree/main/crates/cli/src/commands/repo"
click node_cli_ws "https://github.com/edfloreshz/devmode/tree/main/crates/cli/src/commands/workspace"
click node_tui "https://github.com/edfloreshz/devmode/blob/main/crates/tui/src/app.rs"
click node_tui_views "https://github.com/edfloreshz/devmode/blob/main/crates/tui/src/ui/mod.rs"
click node_gui "https://github.com/edfloreshz/devmode/blob/main/crates/ui/src/app.rs"
click node_gui_screens "https://github.com/edfloreshz/devmode/tree/main/crates/ui/src/screen"
click node_repo_ops "https://github.com/edfloreshz/devmode/tree/main/crates/cli/src/commands/repo"
click node_discovery "https://github.com/edfloreshz/devmode/blob/main/crates/core/src/discovery.rs"
click node_layout "https://github.com/edfloreshz/devmode/blob/main/crates/core/src/layout.rs"
click node_git "https://github.com/edfloreshz/devmode/blob/main/crates/core/src/git/mod.rs"
click node_workspace_ops "https://github.com/edfloreshz/devmode/tree/main/crates/cli/src/commands/workspace"
click node_workspace_switch "https://github.com/edfloreshz/devmode/blob/main/crates/cli/src/commands/workspace/switch.rs"
click node_registry "https://github.com/edfloreshz/devmode/blob/main/crates/core/src/registry/store.rs"
click node_workspace_store "https://github.com/edfloreshz/devmode/blob/main/crates/core/src/workspace/store.rs"
click node_config "https://github.com/edfloreshz/devmode/blob/main/crates/core/src/config.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_cli,node_cli_repo,node_cli_ws,node_tui,node_tui_views,node_gui,node_gui_screens toneBlue
class node_repo_ops,node_discovery,node_layout,node_git toneAmber
class node_workspace_ops,node_workspace_switch toneMint
class node_registry,node_workspace_store,node_config toneRose
class node_user,node_local_disk,node_git_remote,node_editor toneIndigo
```

## Components

### User interfaces

- [CLI entry](https://github.com/edfloreshz/devmode/blob/main/crates/cli/src/main.rs): `crates/cli/src/main.rs`
- [Repo commands](https://github.com/edfloreshz/devmode/tree/main/crates/cli/src/commands/repo): `crates/cli/src/commands/repo`
- [Workspace commands](https://github.com/edfloreshz/devmode/tree/main/crates/cli/src/commands/workspace): `crates/cli/src/commands/workspace`
- [Terminal UI](https://github.com/edfloreshz/devmode/blob/main/crates/tui/src/app.rs): `crates/tui/src/app.rs`
- [Terminal views](https://github.com/edfloreshz/devmode/blob/main/crates/tui/src/ui/mod.rs): `crates/tui/src/ui/mod.rs`
- [Desktop app](https://github.com/edfloreshz/devmode/blob/main/crates/ui/src/app.rs): `crates/ui/src/app.rs`
- [Desktop screens](https://github.com/edfloreshz/devmode/tree/main/crates/ui/src/screen): `crates/ui/src/screen`

### Repository management

- [Repo operations](https://github.com/edfloreshz/devmode/tree/main/crates/cli/src/commands/repo): `crates/cli/src/commands/repo`
- [Discovery and sync](https://github.com/edfloreshz/devmode/blob/main/crates/core/src/discovery.rs): `crates/core/src/discovery.rs`
- [Layout and relayout](https://github.com/edfloreshz/devmode/blob/main/crates/core/src/layout.rs): `crates/core/src/layout.rs`
- [Local Git](https://github.com/edfloreshz/devmode/blob/main/crates/core/src/git/mod.rs): `crates/core/src/git/mod.rs`

### Workspaces

- [Workspace operations](https://github.com/edfloreshz/devmode/tree/main/crates/cli/src/commands/workspace): `crates/cli/src/commands/workspace`
- [Workspace switch](https://github.com/edfloreshz/devmode/blob/main/crates/cli/src/commands/workspace/switch.rs): `crates/cli/src/commands/workspace/switch.rs`

### Shared core

- [Repository registry](https://github.com/edfloreshz/devmode/blob/main/crates/core/src/registry/store.rs): `crates/core/src/registry/store.rs`
- [Workspace store](https://github.com/edfloreshz/devmode/blob/main/crates/core/src/workspace/store.rs): `crates/core/src/workspace/store.rs`
- [Configuration](https://github.com/edfloreshz/devmode/blob/main/crates/core/src/config.rs): `crates/core/src/config.rs`

### Other components

- **Developer**
- **Local filesystem**
- **Git remote**
- **Configured editor**

## Connections

- Developer → CLI entry: runs commands
- Developer → Terminal UI: browses and edits
- Developer → Desktop app: browses and edits
- CLI entry → Repo commands: dispatches repo
- CLI entry → Workspace commands: dispatches workspace
- Repo commands → Repo operations: invokes
- Workspace commands → Workspace operations: invokes
- Terminal UI → Terminal views: renders
- Terminal UI → Repo operations: performs repo actions
- Terminal UI → Workspace operations: performs workspace actions
- Desktop app → Desktop screens: dispatches messages
- Desktop screens → Repo operations: performs repo actions
- Desktop screens → Workspace operations: performs workspace actions
- Desktop screens → Discovery and sync: scans and resolves
- Repo operations → Local Git: clones and inspects
- Repo operations → Layout and relayout: places and relayouts
- Repo operations → Repository registry: tracks and queries
- Discovery and sync → Local Git: finds repos and remotes
- Discovery and sync → Repository registry: checks and updates
- Local Git → Local filesystem: reads and writes repos
- Local Git → Git remote: clones over Git
- Layout and relayout → Local filesystem: moves repos
- Layout and relayout → Repository registry: updates paths
- Workspace operations → Workspace store: manages workspaces
- Workspace operations → Repository registry: resolves repo members
- Workspace switch → Workspace store: reads members and settings
- Workspace switch → Repository registry: resolves member paths
- Workspace switch → Configured editor: opens workspace
- CLI entry → Configuration: uses configuration
- Repo operations → Configuration: reads repo settings
