# jorgesancere/orchestrator-service architecture

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

- Interactive diagram: https://gitdiagram.com/jorgesancere/orchestrator-service
- Repository: https://github.com/jorgesancere/orchestrator-service

## Overview

This is a small HTTP orchestration service. A client submits an execution request; the controller invokes the orchestration service, which requests a prepared sample, submits its features for prediction, and returns a unified result. The service also exposes a health endpoint. The sampled code shows the HTTP calls and routing; the acquisition and prediction services are external dependencies, not repository modules.

Main entry points: [`src/services/orchestrator.service.js`](https://github.com/jorgesancere/orchestrator-service/blob/main/src/services/orchestrator.service.js) (Execution service), [`src/controllers/orchestrator.controller.js`](https://github.com/jorgesancere/orchestrator-service/blob/main/src/controllers/orchestrator.controller.js) (Orchestrator controller), [`src/routes/orchestrator.routes.js`](https://github.com/jorgesancere/orchestrator-service/blob/main/src/routes/orchestrator.routes.js) (API routes), [`src/app.js`](https://github.com/jorgesancere/orchestrator-service/blob/main/src/app.js) (App dispatcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["HTTP runtime"]
  node_server["HTTP server<br/>[server.js]"]
  node_app["App dispatcher<br/>[app.js]"]
end

subgraph group_api["API handling"]
  node_routes["API routes"]
  node_controller["Orchestrator controller"]
end

subgraph group_flow["Execution flow"]
  node_service["Execution service"]
end

subgraph group_integrations["External services"]
  node_acquisition["Acquisition service"]
  node_prediction["Prediction service"]
end

node_client(("HTTP client"))

node_server -->|"serves requests"| node_app
node_app -->|"dispatches"| node_routes
node_client -->|"requests API"| node_routes
node_routes -->|"routes health and execution"| node_controller
node_controller -->|"executes flow"| node_service
node_service -->|"requests sample"| node_acquisition
node_acquisition -->|"returns sample"| node_service
node_service -->|"submits features"| node_prediction
node_prediction -->|"returns prediction"| node_service
node_controller -->|"returns JSON"| node_client

click node_server "https://github.com/jorgesancere/orchestrator-service/blob/main/server.js"
click node_app "https://github.com/jorgesancere/orchestrator-service/blob/main/src/app.js"
click node_routes "https://github.com/jorgesancere/orchestrator-service/blob/main/src/routes/orchestrator.routes.js"
click node_controller "https://github.com/jorgesancere/orchestrator-service/blob/main/src/controllers/orchestrator.controller.js"
click node_service "https://github.com/jorgesancere/orchestrator-service/blob/main/src/services/orchestrator.service.js"

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_server,node_app,node_client toneBlue
class node_routes,node_controller toneAmber
class node_service toneMint
class node_acquisition,node_prediction toneRose
```

## Components

### HTTP runtime

- [HTTP server](https://github.com/jorgesancere/orchestrator-service/blob/main/server.js): `server.js`
- [App dispatcher](https://github.com/jorgesancere/orchestrator-service/blob/main/src/app.js): `src/app.js`

### API handling

- [API routes](https://github.com/jorgesancere/orchestrator-service/blob/main/src/routes/orchestrator.routes.js): `src/routes/orchestrator.routes.js`
- [Orchestrator controller](https://github.com/jorgesancere/orchestrator-service/blob/main/src/controllers/orchestrator.controller.js): `src/controllers/orchestrator.controller.js`

### Execution flow

- [Execution service](https://github.com/jorgesancere/orchestrator-service/blob/main/src/services/orchestrator.service.js): `src/services/orchestrator.service.js`

### External services

- **Acquisition service**
- **Prediction service**

### Other components

- **HTTP client**

## Connections

- HTTP server → App dispatcher: serves requests (evidence: `server.js`)
- App dispatcher → API routes: dispatches (evidence: `src/app.js`)
- HTTP client → API routes: requests API (evidence: `src/routes/orchestrator.routes.js`)
- API routes → Orchestrator controller: routes health and execution (evidence: `src/routes/orchestrator.routes.js`)
- Orchestrator controller → Execution service: executes flow (evidence: `src/controllers/orchestrator.controller.js`)
- Execution service → Acquisition service: requests sample (evidence: `src/services/orchestrator.service.js`)
- Acquisition service → Execution service: returns sample (evidence: `src/services/orchestrator.service.js`)
- Execution service → Prediction service: submits features (evidence: `src/services/orchestrator.service.js`)
- Prediction service → Execution service: returns prediction (evidence: `src/services/orchestrator.service.js`)
- Orchestrator controller → HTTP client: returns JSON (evidence: `src/controllers/orchestrator.controller.js`)
