# sai-anw/sai architecture

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

- Interactive diagram: https://gitdiagram.com/sai-anw/sai
- Repository: https://github.com/sai-anw/sai

## Overview

This repository presents a personal DevOps profile, but its implemented runtime is a small FastAPI product-catalog API. An HTTP client can list products or fetch one by ID; both endpoints read a hard-coded in-memory catalog and return Product-shaped responses. The catalog is not a persistent database. The README describes other projects and skills, but no implementations for them appear in the supplied source tree, so they are not mapped here.

Main entry points: [`main.py`](https://github.com/sai-anw/sai/blob/master/main.py) (List products)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_client(("HTTP client"))
node_list["List products<br/>[main.py]"]
node_detail["Get product<br/>[main.py]"]
node_catalog["In-memory catalog<br/>[main.py]"]
node_product["Product schema<br/>[main.py]"]

node_client -->|"requests list"| node_list
node_client -->|"requests by ID"| node_detail
node_list -->|"reads all"| node_catalog
node_detail -->|"searches by ID"| node_catalog
node_list -->|"returns schema"| node_product
node_detail -->|"returns schema"| node_product

click node_list "https://github.com/sai-anw/sai/blob/master/main.py"
click node_detail "https://github.com/sai-anw/sai/blob/master/main.py"
click node_catalog "https://github.com/sai-anw/sai/blob/master/main.py"
click node_product "https://github.com/sai-anw/sai/blob/master/main.py"

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_client toneBlue
class node_list,node_detail,node_catalog,node_product toneTeal
```

## Components

### Other components

- **HTTP client**
- [List products](https://github.com/sai-anw/sai/blob/master/main.py): `main.py`
- [Get product](https://github.com/sai-anw/sai/blob/master/main.py): `main.py`
- [In-memory catalog](https://github.com/sai-anw/sai/blob/master/main.py): `main.py`
- [Product schema](https://github.com/sai-anw/sai/blob/master/main.py): `main.py`

## Connections

- HTTP client → List products: requests list (evidence: `main.py`)
- HTTP client → Get product: requests by ID (evidence: `main.py`)
- List products → In-memory catalog: reads all (evidence: `main.py`)
- Get product → In-memory catalog: searches by ID (evidence: `main.py`)
- List products → Product schema: returns schema (evidence: `main.py`)
- Get product → Product schema: returns schema (evidence: `main.py`)
