# kranthi1382/devops-project12 architecture

> Architecture diagram of the GitHub repository kranthi1382/devops-project12, 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/kranthi1382/devops-project12
- Repository: https://github.com/kranthi1382/devops-project12

## Overview

This repository pairs a small Flask task manager with a CI/CD workflow documented for Jenkins, Docker, and AWS EC2. The main user workflow is viewing tasks, adding one, and seeing the updated list; a separate developer workflow pushes code to GitHub, triggering checkout, image build, and container replacement. The Jenkins pipeline is configured outside the repository, so its stages are documented capabilities rather than source modules. The app excerpt shows in-memory task handling and the health endpoint; deployment relationships come from the README.

Main entry points: [`app.py`](https://github.com/kranthi1382/devops-project12/blob/main/app.py) (Flask application), [`Dockerfile`](https://github.com/kranthi1382/devops-project12/blob/main/Dockerfile) (Image build)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Flask application"]
  node_flask["Flask application<br/>[app.py]"]
  node_task_state["In-memory tasks<br/>[app.py]"]
  node_home["Task list page<br/>[app.py]"]
  node_add_task["Add-task handler<br/>[app.py]"]
  node_health["Health endpoint<br/>[app.py]"]
end

subgraph group_delivery["CI/CD delivery"]
  node_jenkins["Jenkins pipeline"]
  node_checkout["Source checkout"]
  node_image_build["Image build"]
  node_deployment["Container deployment"]
end

subgraph group_runtime["Container runtime"]
  node_image["practice:latest image"]
  node_container["Application container"]
end

subgraph group_infrastructure["External infrastructure"]
  node_github["GitHub"]
  node_ec2["AWS EC2 host"]
end

node_developer(("Developer"))
node_browser(("Web browser"))

node_developer -->|"pushes code"| node_github
node_github -->|"triggers webhook"| node_jenkins
node_jenkins -->|"runs checkout"| node_checkout
node_checkout -->|"provides source"| node_image_build
node_jenkins -->|"runs build"| node_image_build
node_image_build -->|"builds image"| node_image
node_jenkins -->|"runs deploy"| node_deployment
node_deployment -->|"replaces container"| node_container
node_image -->|"starts from"| node_container
node_ec2 -->|"hosts"| node_jenkins
node_ec2 -->|"hosts"| node_container
node_browser -->|"requests application"| node_flask
node_flask -->|"routes GET /"| node_home
node_flask -->|"routes POST /add"| node_add_task
node_flask -->|"routes GET /health"| node_health
node_home -->|"reads tasks"| node_task_state
node_add_task -->|"appends task"| node_task_state
node_home -->|"returns HTML"| node_browser
node_add_task -->|"redirects to"| node_home
node_health -->|"returns status"| node_browser

click node_image_build "https://github.com/kranthi1382/devops-project12/blob/main/Dockerfile"
click node_image "https://github.com/kranthi1382/devops-project12/blob/main/Dockerfile"
click node_container "https://github.com/kranthi1382/devops-project12/blob/main/Dockerfile"
click node_flask "https://github.com/kranthi1382/devops-project12/blob/main/app.py"
click node_task_state "https://github.com/kranthi1382/devops-project12/blob/main/app.py"
click node_home "https://github.com/kranthi1382/devops-project12/blob/main/app.py"
click node_add_task "https://github.com/kranthi1382/devops-project12/blob/main/app.py"
click node_health "https://github.com/kranthi1382/devops-project12/blob/main/app.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_flask,node_task_state,node_home,node_add_task,node_health,node_browser toneBlue
class node_jenkins,node_checkout,node_image_build,node_deployment toneAmber
class node_image,node_container toneMint
class node_github,node_ec2 toneRose
class node_developer toneIndigo
```

## Components

### Flask application

- [Flask application](https://github.com/kranthi1382/devops-project12/blob/main/app.py): `app.py`
- [In-memory tasks](https://github.com/kranthi1382/devops-project12/blob/main/app.py): `app.py`
- [Task list page](https://github.com/kranthi1382/devops-project12/blob/main/app.py): `app.py`
- [Add-task handler](https://github.com/kranthi1382/devops-project12/blob/main/app.py): `app.py`
- [Health endpoint](https://github.com/kranthi1382/devops-project12/blob/main/app.py): `app.py`

### CI/CD delivery

- **Jenkins pipeline**
- **Source checkout**
- [Image build](https://github.com/kranthi1382/devops-project12/blob/main/Dockerfile): `Dockerfile`
- **Container deployment**

### Container runtime

- [practice:latest image](https://github.com/kranthi1382/devops-project12/blob/main/Dockerfile): `Dockerfile`
- [Application container](https://github.com/kranthi1382/devops-project12/blob/main/Dockerfile): `Dockerfile`

### External infrastructure

- **GitHub**
- **AWS EC2 host**

### Other components

- **Developer**
- **Web browser**

## Connections

- Developer → GitHub: pushes code (evidence: `README.md`)
- GitHub → Jenkins pipeline: triggers webhook (evidence: `README.md`)
- Jenkins pipeline → Source checkout: runs checkout (evidence: `README.md`)
- Source checkout → Image build: provides source (evidence: `README.md`)
- Jenkins pipeline → Image build: runs build (evidence: `README.md`)
- Image build → practice:latest image: builds image (evidence: `README.md`)
- Jenkins pipeline → Container deployment: runs deploy (evidence: `README.md`)
- Container deployment → Application container: replaces container (evidence: `README.md`)
- practice:latest image → Application container: starts from (evidence: `README.md`)
- AWS EC2 host → Jenkins pipeline: hosts (evidence: `README.md`)
- AWS EC2 host → Application container: hosts (evidence: `README.md`)
- Web browser → Flask application: requests application (evidence: `README.md`)
- Flask application → Task list page: routes GET / (evidence: `app.py`)
- Flask application → Add-task handler: routes POST /add (evidence: `app.py`)
- Flask application → Health endpoint: routes GET /health (evidence: `app.py`)
- Task list page → In-memory tasks: reads tasks (evidence: `app.py`)
- Add-task handler → In-memory tasks: appends task (evidence: `app.py`)
- Task list page → Web browser: returns HTML (evidence: `app.py`)
- Add-task handler → Task list page: redirects to (evidence: `app.py`)
- Health endpoint → Web browser: returns status (evidence: `app.py`)
