# iamtejasmane/aws-three-tier-web-app architecture

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

- Interactive diagram: https://gitdiagram.com/iamtejasmane/aws-three-tier-web-app
- Repository: https://github.com/iamtejasmane/aws-three-tier-web-app

## Overview

This repository is a hands-on AWS three-tier web app demo: a React transaction page calls a Node API that reads and mutates Aurora data. The README also documents the manually configured network, load balancers, security groups, health checks, and autoscaling. The runtime excerpts show the React routing and transaction API/database path; AWS infrastructure links are based on the README, not deployment code, and the `/api` proxy is documented but not implemented in the sampled sources.

Main entry points: [`application-code/web-tier/src/App.js`](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/App.js) (React app and routes), [`application-code/app-tier/index.js`](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/app-tier/index.js) (Node API routes), [`application-code/web-tier`](https://github.com/iamtejasmane/aws-three-tier-web-app/tree/main/application-code/web-tier) (Nginx and React web tier), [`application-code/app-tier/TransactionService.js`](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/app-tier/TransactionService.js) (Transaction operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["React app and routes<br/>[App.js]"]
  node_home["Home page<br/>[Home.js]"]
  node_database_demo["Transaction demo UI<br/>[DatabaseDemo.js]"]
  node_menu["Navigation menu<br/>[Menu.js]"]
  node_menu_style["Menu styling<br/>[Menu.styled.js]"]
  node_burger["Menu toggle<br/>[Burger.js]"]
  node_burger_style["Toggle styling<br/>[Burger.styled.js]"]
  node_hooks["Click-outside hook<br/>[hooks.js]"]
  node_global_styles["Global styles<br/>[global.js]"]
  node_theme["UI theme<br/>[theme.js]"]
  node_web_metrics["Web vitals reporting<br/>[reportWebVitals.js]"]
end

subgraph group_api["Transaction API"]
  node_api_tier["Node API routes<br/>[index.js]"]
  node_transaction_service["Transaction operations"]
end

subgraph group_data["Database"]
  node_db_config["Database credentials<br/>[DbConfig.js]"]
  node_aurora[("Aurora MySQL")]
end

subgraph group_aws["AWS infrastructure"]
  node_public_lb{{"Public load balancer"}}
  node_web_tier["Nginx and React web tier"]
  node_internal_lb{{"Internal load balancer"}}
  node_network{{"VPC and security groups"}}
  node_availability{{"Health checks and scaling"}}
end

node_visitor(("Web visitor"))

node_visitor -->|"sends traffic"| node_public_lb
node_public_lb -->|"forwards traffic"| node_web_tier
node_web_tier -->|"proxies API calls"| node_internal_lb
node_internal_lb -->|"forwards traffic"| node_api_tier
node_app -->|"routes /db"| node_database_demo
node_app -->|"routes /"| node_home
node_app -->|"renders"| node_menu
node_app -->|"renders"| node_burger
node_app -->|"uses"| node_hooks
node_app -->|"applies"| node_global_styles
node_app -->|"provides"| node_theme
node_burger -->|"renders"| node_burger_style
node_menu -->|"renders"| node_menu_style
node_database_demo -->|"calls transaction API"| node_api_tier
node_api_tier -->|"dispatches operations"| node_transaction_service
node_transaction_service -->|"loads credentials"| node_db_config
node_transaction_service -->|"queries transactions"| node_aurora
node_web_tier -->|"runs within"| node_network
node_api_tier -->|"runs within"| node_network
node_aurora -->|"runs within"| node_network
node_public_lb -->|"uses health checks"| node_availability
node_internal_lb -->|"uses health checks"| node_availability
node_web_tier -->|"uses autoscaling"| node_availability
node_api_tier -->|"uses autoscaling"| node_availability

click node_web_tier "https://github.com/iamtejasmane/aws-three-tier-web-app/tree/main/application-code/web-tier"
click node_app "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/App.js"
click node_home "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/Home/Home.js"
click node_database_demo "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/DatabaseDemo/DatabaseDemo.js"
click node_menu "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/Menu/Menu.js"
click node_menu_style "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/Menu/Menu.styled.js"
click node_burger "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/Burger/Burger.js"
click node_burger_style "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/Burger/Burger.styled.js"
click node_hooks "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/hooks.js"
click node_global_styles "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/global.js"
click node_theme "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/theme.js"
click node_web_metrics "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/reportWebVitals.js"
click node_api_tier "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/app-tier/index.js"
click node_transaction_service "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/app-tier/TransactionService.js"
click node_db_config "https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/app-tier/DbConfig.js"

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_app,node_home,node_database_demo,node_menu,node_menu_style,node_burger,node_burger_style,node_hooks,node_global_styles,node_theme,node_web_metrics toneBlue
class node_api_tier,node_transaction_service toneAmber
class node_db_config,node_aurora toneMint
class node_public_lb,node_web_tier,node_internal_lb,node_network,node_availability toneRose
class node_visitor toneIndigo
```

## Components

### Web experience

- [React app and routes](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/App.js): `application-code/web-tier/src/App.js`
- [Home page](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/Home/Home.js): `application-code/web-tier/src/components/Home/Home.js`
- [Transaction demo UI](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/DatabaseDemo/DatabaseDemo.js): `application-code/web-tier/src/components/DatabaseDemo/DatabaseDemo.js`
- [Navigation menu](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/Menu/Menu.js): `application-code/web-tier/src/components/Menu/Menu.js`
- [Menu styling](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/Menu/Menu.styled.js): `application-code/web-tier/src/components/Menu/Menu.styled.js`
- [Menu toggle](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/Burger/Burger.js): `application-code/web-tier/src/components/Burger/Burger.js`
- [Toggle styling](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/components/Burger/Burger.styled.js): `application-code/web-tier/src/components/Burger/Burger.styled.js`
- [Click-outside hook](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/hooks.js): `application-code/web-tier/src/hooks.js`
- [Global styles](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/global.js): `application-code/web-tier/src/global.js`
- [UI theme](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/theme.js): `application-code/web-tier/src/theme.js`
- [Web vitals reporting](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/web-tier/src/reportWebVitals.js): `application-code/web-tier/src/reportWebVitals.js`

### Transaction API

- [Node API routes](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/app-tier/index.js): `application-code/app-tier/index.js`
- [Transaction operations](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/app-tier/TransactionService.js): `application-code/app-tier/TransactionService.js`

### Database

- [Database credentials](https://github.com/iamtejasmane/aws-three-tier-web-app/blob/main/application-code/app-tier/DbConfig.js): `application-code/app-tier/DbConfig.js`
- **Aurora MySQL**

### AWS infrastructure

- **Public load balancer**
- [Nginx and React web tier](https://github.com/iamtejasmane/aws-three-tier-web-app/tree/main/application-code/web-tier): `application-code/web-tier`
- **Internal load balancer**
- **VPC and security groups**
- **Health checks and scaling**

### Other components

- **Web visitor**

## Connections

- Web visitor → Public load balancer: sends traffic (evidence: `README.md`)
- Public load balancer → Nginx and React web tier: forwards traffic (evidence: `README.md`)
- Nginx and React web tier → Internal load balancer: proxies API calls (evidence: `README.md`)
- Internal load balancer → Node API routes: forwards traffic (evidence: `README.md`)
- React app and routes → Transaction demo UI: routes /db (evidence: `application-code/web-tier/src/App.js`)
- React app and routes → Home page: routes / (evidence: `application-code/web-tier/src/App.js`)
- React app and routes → Navigation menu: renders (evidence: `application-code/web-tier/src/App.js`)
- React app and routes → Menu toggle: renders (evidence: `application-code/web-tier/src/App.js`)
- React app and routes → Click-outside hook: uses (evidence: `application-code/web-tier/src/App.js`)
- React app and routes → Global styles: applies (evidence: `application-code/web-tier/src/App.js`)
- React app and routes → UI theme: provides (evidence: `application-code/web-tier/src/App.js`)
- Menu toggle → Toggle styling: renders (evidence: `application-code/web-tier/src/components/Burger/Burger.js`)
- Navigation menu → Menu styling: renders (evidence: `application-code/web-tier/src/components/Menu/Menu.js`)
- Transaction demo UI → Node API routes: calls transaction API (evidence: `application-code/web-tier/src/components/DatabaseDemo/DatabaseDemo.js`)
- Node API routes → Transaction operations: dispatches operations (evidence: `application-code/app-tier/index.js`)
- Transaction operations → Database credentials: loads credentials (evidence: `application-code/app-tier/TransactionService.js`)
- Transaction operations → Aurora MySQL: queries transactions (evidence: `application-code/app-tier/TransactionService.js`)
- Nginx and React web tier → VPC and security groups: runs within (evidence: `README.md`)
- Node API routes → VPC and security groups: runs within (evidence: `README.md`)
- Aurora MySQL → VPC and security groups: runs within (evidence: `README.md`)
- Public load balancer → Health checks and scaling: uses health checks (evidence: `README.md`)
- Internal load balancer → Health checks and scaling: uses health checks (evidence: `README.md`)
- Nginx and React web tier → Health checks and scaling: uses autoscaling (evidence: `README.md`)
- Node API routes → Health checks and scaling: uses autoscaling (evidence: `README.md`)
