# amanzeht/simba-demo-api architecture

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

- Interactive diagram: https://gitdiagram.com/amanzeht/simba-demo-api
- Repository: https://github.com/amanzeht/simba-demo-api

## Overview

Project Simba demonstrates a PR-gated promotion pipeline alongside a small Express API. The API serves environment-specific status, health, and version responses; the documented promotion flow builds once for dev and reuses that image digest through test, UAT, and prod. Workflow and AWS wiring are represented only as documented; their source was not sampled.

Main entry points: [`.github/workflows/deploy.yml`](https://github.com/amanzeht/simba-demo-api/blob/dev/.github/workflows/deploy.yml) (GitHub Actions), [`src/index.js`](https://github.com/amanzeht/simba-demo-api/blob/dev/src/index.js) (Express API), [`ecs-task-definition.json`](https://github.com/amanzeht/simba-demo-api/blob/dev/ecs-task-definition.json) (ECS services), [`Dockerfile`](https://github.com/amanzeht/simba-demo-api/blob/dev/Dockerfile) (Container image)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Demo API"]
  node_api["Express API<br/>[index.js]"]
  node_root_response["Catalog response<br/>[index.js]"]
  node_health["Health route<br/>[index.js]"]
  node_version["Version route<br/>[index.js]"]
end

subgraph group_promotion["Promotion pipeline"]
  node_actions["GitHub Actions<br/>[deploy.yml]"]
  node_image["Container image"]
end

subgraph group_hosting["AWS environments"]
  node_registry[("Image registry")]
  node_ecs["ECS services"]
  node_environments["Dev / test / UAT / prod"]
end

node_engineer(("Engineer"))
node_pull_request(("Promotion PR"))
node_visitor(("API visitor"))

node_engineer -->|"opens PR"| node_pull_request
node_pull_request -->|"triggers checks"| node_actions
node_actions -->|"builds on dev"| node_image
node_actions -->|"pushes image"| node_registry
node_actions -->|"retags digest"| node_registry
node_actions -->|"updates service"| node_ecs
node_ecs -->|"runs tasks"| node_environments
node_visitor -->|"requests URL"| node_environments
node_environments -->|"routes request"| node_api
node_api -->|"serves root"| node_root_response
node_api -->|"serves health"| node_health
node_api -->|"serves version"| node_version

click node_api "https://github.com/amanzeht/simba-demo-api/blob/dev/src/index.js"
click node_root_response "https://github.com/amanzeht/simba-demo-api/blob/dev/src/index.js"
click node_health "https://github.com/amanzeht/simba-demo-api/blob/dev/src/index.js"
click node_version "https://github.com/amanzeht/simba-demo-api/blob/dev/src/index.js"
click node_actions "https://github.com/amanzeht/simba-demo-api/blob/dev/.github/workflows/deploy.yml"
click node_image "https://github.com/amanzeht/simba-demo-api/blob/dev/Dockerfile"
click node_ecs "https://github.com/amanzeht/simba-demo-api/blob/dev/ecs-task-definition.json"

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_api,node_root_response,node_health,node_version toneBlue
class node_actions,node_image toneAmber
class node_registry,node_ecs,node_environments,node_visitor toneMint
class node_engineer,node_pull_request toneIndigo
```

## Components

### Demo API

- [Express API](https://github.com/amanzeht/simba-demo-api/blob/dev/src/index.js): `src/index.js`
- [Catalog response](https://github.com/amanzeht/simba-demo-api/blob/dev/src/index.js): `src/index.js`
- [Health route](https://github.com/amanzeht/simba-demo-api/blob/dev/src/index.js): `src/index.js`
- [Version route](https://github.com/amanzeht/simba-demo-api/blob/dev/src/index.js): `src/index.js`

### Promotion pipeline

- [GitHub Actions](https://github.com/amanzeht/simba-demo-api/blob/dev/.github/workflows/deploy.yml): `.github/workflows/deploy.yml`
- [Container image](https://github.com/amanzeht/simba-demo-api/blob/dev/Dockerfile): `Dockerfile`

### AWS environments

- **Image registry**
- [ECS services](https://github.com/amanzeht/simba-demo-api/blob/dev/ecs-task-definition.json): `ecs-task-definition.json`
- **Dev / test / UAT / prod**

### Other components

- **Engineer**
- **Promotion PR**
- **API visitor**

## Connections

- Engineer → Promotion PR: opens PR
- Promotion PR → GitHub Actions: triggers checks
- GitHub Actions → Container image: builds on dev
- GitHub Actions → Image registry: pushes image
- GitHub Actions → Image registry: retags digest
- GitHub Actions → ECS services: updates service
- ECS services → Dev / test / UAT / prod: runs tasks
- API visitor → Dev / test / UAT / prod: requests URL
- Dev / test / UAT / prod → Express API: routes request
- Express API → Catalog response: serves root
- Express API → Health route: serves health
- Express API → Version route: serves version
