# londheshubham153/two-tier-flask-app architecture

> Architecture diagram of the GitHub repository londheshubham153/two-tier-flask-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/londheshubham153/two-tier-flask-app
- Repository: https://github.com/londheshubham153/two-tier-flask-app

## Overview

This is a small Flask two-tier message app: users submit messages, the app stores them in MySQL, and the home page reads and renders them. The runtime excerpt shows the route-to-database and template flow; the README documents health checks and several ways to deploy the app. Deployment nodes represent those documented runtime options, not CI or build machinery. The deployment relationships are documented at a high level; their manifests and configuration were not sampled.

Main entry points: [`app.py`](https://github.com/londheshubham153/two-tier-flask-app/blob/master/app.py) (Flask routes), [`docker-compose.yml`](https://github.com/londheshubham153/two-tier-flask-app/blob/master/docker-compose.yml) (Docker Compose), [`k8s`](https://github.com/londheshubham153/two-tier-flask-app/tree/master/k8s) (Kubernetes setup), [`eks-manifests`](https://github.com/londheshubham153/two-tier-flask-app/tree/master/eks-manifests) (EKS manifests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Web application"]
  node_flask["Flask routes<br/>[app.py]"]
  node_template["Message page<br/>[index.html]"]
end

subgraph group_data["Message storage"]
  node_mysql[("MySQL messages")]
end

subgraph group_deploy["Deployment options"]
  node_compose["Docker Compose<br/>[docker-compose.yml]"]
  node_docker["Container image"]
  node_k8s["Kubernetes setup"]
  node_eks["EKS manifests"]
end

subgraph group_hosting["Cloud hosting"]
  node_beanstalk["Elastic Beanstalk"]
  node_aws["AWS deployment guide"]
end

node_user(("Web user"))
node_healthcheck(("Health checker"))

node_user -->|"submits or views"| node_flask
node_flask -->|"creates, reads, writes"| node_mysql
node_flask -->|"renders"| node_template
node_flask -->|"returns JSON or page"| node_user
node_healthcheck -->|"checks /health"| node_flask
node_compose -->|"runs app"| node_flask
node_compose -->|"runs database"| node_mysql
node_docker -->|"packages app"| node_flask
node_k8s -->|"deploys app"| node_flask
node_k8s -->|"deploys database"| node_mysql
node_eks -->|"deploys app"| node_flask
node_eks -->|"deploys database"| node_mysql
node_beanstalk -->|"hosts app"| node_flask
node_aws -->|"documents hosting"| node_flask
node_aws -->|"documents RDS"| node_mysql

click node_flask "https://github.com/londheshubham153/two-tier-flask-app/blob/master/app.py"
click node_template "https://github.com/londheshubham153/two-tier-flask-app/blob/master/templates/index.html"
click node_compose "https://github.com/londheshubham153/two-tier-flask-app/blob/master/docker-compose.yml"
click node_docker "https://github.com/londheshubham153/two-tier-flask-app/blob/master/Dockerfile"
click node_k8s "https://github.com/londheshubham153/two-tier-flask-app/tree/master/k8s"
click node_eks "https://github.com/londheshubham153/two-tier-flask-app/tree/master/eks-manifests"
click node_beanstalk "https://github.com/londheshubham153/two-tier-flask-app/tree/master/beanstalk"
click node_aws "https://github.com/londheshubham153/two-tier-flask-app/tree/master/aws"

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_template,node_user toneBlue
class node_mysql toneAmber
class node_compose,node_docker,node_k8s,node_eks toneMint
class node_beanstalk,node_aws toneRose
class node_healthcheck toneIndigo
```

## Components

### Web application

- [Flask routes](https://github.com/londheshubham153/two-tier-flask-app/blob/master/app.py): `app.py`
- [Message page](https://github.com/londheshubham153/two-tier-flask-app/blob/master/templates/index.html): `templates/index.html`

### Message storage

- **MySQL messages**

### Deployment options

- [Docker Compose](https://github.com/londheshubham153/two-tier-flask-app/blob/master/docker-compose.yml): `docker-compose.yml`
- [Container image](https://github.com/londheshubham153/two-tier-flask-app/blob/master/Dockerfile): `Dockerfile`
- [Kubernetes setup](https://github.com/londheshubham153/two-tier-flask-app/tree/master/k8s): `k8s`
- [EKS manifests](https://github.com/londheshubham153/two-tier-flask-app/tree/master/eks-manifests): `eks-manifests`

### Cloud hosting

- [Elastic Beanstalk](https://github.com/londheshubham153/two-tier-flask-app/tree/master/beanstalk): `beanstalk`
- [AWS deployment guide](https://github.com/londheshubham153/two-tier-flask-app/tree/master/aws): `aws`

### Other components

- **Web user**
- **Health checker**

## Connections

- Web user → Flask routes: submits or views (evidence: `README.md`)
- Flask routes → MySQL messages: creates, reads, writes (evidence: `app.py`)
- Flask routes → Message page: renders (evidence: `app.py`)
- Flask routes → Web user: returns JSON or page (evidence: `app.py`)
- Health checker → Flask routes: checks /health (evidence: `README.md`)
- Docker Compose → Flask routes: runs app (evidence: `README.md`)
- Docker Compose → MySQL messages: runs database (evidence: `README.md`)
- Container image → Flask routes: packages app (evidence: `README.md`)
- Kubernetes setup → Flask routes: deploys app (evidence: `README.md`)
- Kubernetes setup → MySQL messages: deploys database (evidence: `README.md`)
- EKS manifests → Flask routes: deploys app (evidence: `README.md`)
- EKS manifests → MySQL messages: deploys database (evidence: `README.md`)
- Elastic Beanstalk → Flask routes: hosts app (evidence: `README.md`)
- AWS deployment guide → Flask routes: documents hosting (evidence: `README.md`)
- AWS deployment guide → MySQL messages: documents RDS (evidence: `README.md`)
