# nicolascosta-dev/labs-gitops architecture

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

- Interactive diagram: https://gitdiagram.com/nicolascosta-dev/labs-gitops
- Repository: https://github.com/nicolascosta-dev/labs-gitops

## Overview

This repository combines a small Flask HTTP service with Kubernetes and Argo CD configuration for a GitOps lab. The user-facing flow serves a greeting or JSON response, and one route calls a separate .NET Todo API and returns its response. The app also emits structured logs. The tree and README title identify deployment and notification configuration, but their contents were not sampled, so their wiring and the ECR image flow cannot be verified here.

Main entry points: [`python/src/app.py`](https://github.com/nicolascosta-dev/labs-gitops/blob/main/python/src/app.py) (HTTP routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_service["Flask service"]
  node_flask["Flask app<br/>[app.py]"]
  node_routes["HTTP routes<br/>[app.py]"]
  node_logger["Structured logger<br/>[app.py]"]
end

subgraph group_gitops["GitOps configuration"]
  node_appconfig["Argo CD app config<br/>[argocd-app.yaml]"]
  node_notifications["Argo CD notifications"]
  node_workload["Flask workload config<br/>[python-flask.yaml]"]
end

node_user(("HTTP client"))
node_todoapi[".NET Todo API"]
node_argocd["Argo CD"]

node_user -->|"sends requests"| node_flask
node_flask -->|"dispatches"| node_routes
node_routes -->|"returns responses"| node_user
node_routes -->|"writes logs"| node_logger
node_routes -->|"requests items"| node_todoapi
node_todoapi -->|"returns text"| node_routes

click node_flask "https://github.com/nicolascosta-dev/labs-gitops/blob/main/python/src/app.py"
click node_routes "https://github.com/nicolascosta-dev/labs-gitops/blob/main/python/src/app.py"
click node_logger "https://github.com/nicolascosta-dev/labs-gitops/blob/main/python/src/app.py"
click node_appconfig "https://github.com/nicolascosta-dev/labs-gitops/blob/main/argocd-app.yaml"
click node_notifications "https://github.com/nicolascosta-dev/labs-gitops/blob/main/argocd-notifications-cm.yaml"
click node_workload "https://github.com/nicolascosta-dev/labs-gitops/blob/main/k8s/python-flask.yaml"

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_flask,node_routes,node_logger,node_user toneBlue
class node_appconfig,node_notifications,node_workload toneAmber
class node_todoapi toneMint
class node_argocd toneIndigo
```

## Components

### Flask service

- [Flask app](https://github.com/nicolascosta-dev/labs-gitops/blob/main/python/src/app.py): `python/src/app.py`
- [HTTP routes](https://github.com/nicolascosta-dev/labs-gitops/blob/main/python/src/app.py): `python/src/app.py`
- [Structured logger](https://github.com/nicolascosta-dev/labs-gitops/blob/main/python/src/app.py): `python/src/app.py`

### GitOps configuration

- [Argo CD app config](https://github.com/nicolascosta-dev/labs-gitops/blob/main/argocd-app.yaml): `argocd-app.yaml`
- [Argo CD notifications](https://github.com/nicolascosta-dev/labs-gitops/blob/main/argocd-notifications-cm.yaml): `argocd-notifications-cm.yaml`
- [Flask workload config](https://github.com/nicolascosta-dev/labs-gitops/blob/main/k8s/python-flask.yaml): `k8s/python-flask.yaml`

### Other components

- **HTTP client**
- **.NET Todo API**
- **Argo CD**

## Connections

- HTTP client → Flask app: sends requests
- Flask app → HTTP routes: dispatches
- HTTP routes → HTTP client: returns responses
- HTTP routes → Structured logger: writes logs
- HTTP routes → .NET Todo API: requests items
- .NET Todo API → HTTP routes: returns text
