# manish-ach/ci-cd-orchestrator architecture

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

- Interactive diagram: https://gitdiagram.com/manish-ach/ci-cd-orchestrator
- Repository: https://github.com/manish-ach/ci-cd-orchestrator

## Overview

This archived, work-in-progress Rust binary has two CLI modes: a coordinator that serves HTTP endpoints and a worker mode that currently only prints its name. The documented coordinator workflow is registering workers, then listing them or querying the health count; worker records are held in memory. Job dispatch, a worker client, heartbeats, and cleanup are not implemented. The graph reflects the sampled source and README, not unsampled behavior.

Main entry points: [`src/coordinator.rs`](https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/coordinator.rs) (Coordinator API), [`src/main.rs`](https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/main.rs) (Mode dispatch), [`src/types.rs`](https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/types.rs) (Worker record), [`src/worker.rs`](https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/worker.rs) (Worker mode)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Program entry"]
  node_cli["Mode dispatch<br/>[main.rs]"]
  node_worker_mode["Worker mode<br/>[worker.rs]"]
end

subgraph group_coord["Coordinator service"]
  node_http_api["Coordinator API<br/>[coordinator.rs]"]
  node_registry[("Worker registry<br/>[coordinator.rs]")]
end

subgraph group_domain["Worker domain"]
  node_worker_record["Worker record<br/>[types.rs]"]
end

node_user(("CLI operator"))
node_client(("HTTP client"))

node_user -->|"selects mode"| node_cli
node_cli -->|"starts coordinator"| node_http_api
node_cli -->|"starts worker"| node_worker_mode
node_client -->|"sends requests"| node_http_api
node_http_api -->|"reads and updates"| node_registry
node_http_api -->|"creates and returns"| node_worker_record
node_registry -->|"stores records"| node_worker_record

click node_cli "https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/main.rs"
click node_worker_mode "https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/worker.rs"
click node_http_api "https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/coordinator.rs"
click node_registry "https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/coordinator.rs"
click node_worker_record "https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/types.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_worker_mode,node_client toneBlue
class node_http_api,node_registry toneAmber
class node_worker_record toneMint
class node_user toneIndigo
```

## Components

### Program entry

- [Mode dispatch](https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/main.rs): `src/main.rs`
- [Worker mode](https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/worker.rs): `src/worker.rs`

### Coordinator service

- [Coordinator API](https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/coordinator.rs): `src/coordinator.rs`
- [Worker registry](https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/coordinator.rs): `src/coordinator.rs`

### Worker domain

- [Worker record](https://github.com/manish-ach/ci-cd-orchestrator/blob/main/src/types.rs): `src/types.rs`

### Other components

- **CLI operator**
- **HTTP client**

## Connections

- CLI operator → Mode dispatch: selects mode (evidence: `README.md`)
- Mode dispatch → Coordinator API: starts coordinator (evidence: `src/main.rs`)
- Mode dispatch → Worker mode: starts worker (evidence: `src/main.rs`)
- HTTP client → Coordinator API: sends requests (evidence: `README.md`)
- Coordinator API → Worker registry: reads and updates (evidence: `src/coordinator.rs`)
- Coordinator API → Worker record: creates and returns (evidence: `src/coordinator.rs`)
- Worker registry → Worker record: stores records (evidence: `src/coordinator.rs`)
