# rahulp-ht/multi-tier-devops-poc architecture

> Architecture diagram of the GitHub repository rahulp-ht/multi-tier-devops-poc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rahulp-ht/multi-tier-devops-poc
- Repository: https://github.com/rahulp-ht/multi-tier-devops-poc

## Overview

This is a books-and-authors management application and an AWS deployment POC. Users view dashboard charts or manage books and authors through the React UI; the Express API handles CRUD requests and persists records in MySQL. The repository also describes Jenkins CI/CD and Terraform-managed ECS infrastructure as product capabilities. Application call paths are supported by sampled source; deployment relationships are documented in the README, while several infrastructure and pipeline files were not sampled.

Main entry points: [`backend/app.js`](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/app.js) (Express app), [`terraform`](https://github.com/rahulp-ht/multi-tier-devops-poc/tree/main/terraform) (Infrastructure provisioning), [`frontend/src/main.tsx`](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/main.tsx) (Page router), [`frontend/src/BooksPage.tsx`](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/BooksPage.tsx) (Books management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_router["Page router<br/>[main.tsx]"]
  node_dashboard["Dashboard charts<br/>[App.tsx]"]
  node_books_ui["Books management<br/>[BooksPage.tsx]"]
  node_authors_ui["Authors management<br/>[AuthorsPage.tsx]"]
  node_book_dialogs["Book dialogs"]
  node_author_dialogs["Author dialogs"]
  node_book_types["Book data types<br/>[Books.ts]"]
  node_author_types["Author data type<br/>[Author.ts]"]
end

subgraph group_api["Application API"]
  node_api_app["Express app<br/>[app.js]"]
  node_api_routes["API routes<br/>[index.js]"]
  node_book_controller["Book CRUD<br/>[BooksController.js]"]
  node_author_controller["Author CRUD"]
end

subgraph group_data["Persistence"]
  node_db_pool["MySQL pool<br/>[db.js]"]
  node_mysql[("MySQL database")]
end

subgraph group_delivery["CI/CD"]
  node_ci["Jenkins CI"]
  node_cd["Jenkins CD<br/>[Jenkinsfile.cd]"]
  node_sonar{{"SonarQube"}}
  node_trivy{{"Trivy scans"}}
end

subgraph group_platform["AWS platform"]
  node_ecr[("Amazon ECR")]
  node_terraform["Infrastructure provisioning"]
  node_alb{{"Load balancer"}}
  node_ecs["ECS services"]
  node_rds[("Amazon RDS")]
  node_secrets[("Secrets Manager")]
  node_cloudwatch["CloudWatch"]
end

node_user(("User"))

node_user -->|"opens"| node_router
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_books_ui
node_router -->|"routes to"| node_authors_ui
node_dashboard -->|"fetches books"| node_api_app
node_books_ui -->|"CRUD requests"| node_api_app
node_authors_ui -->|"CRUD requests"| node_api_app
node_books_ui -->|"opens dialogs"| node_book_dialogs
node_authors_ui -->|"opens dialogs"| node_author_dialogs
node_books_ui -->|"uses types"| node_book_types
node_authors_ui -->|"uses type"| node_author_types
node_api_app -->|"mounts"| node_api_routes
node_api_routes -->|"dispatches"| node_book_controller
node_api_routes -->|"dispatches"| node_author_controller
node_book_controller -->|"queries"| node_db_pool
node_author_controller -->|"queries"| node_db_pool
node_api_app -->|"checks connection"| node_db_pool
node_db_pool -.->|"connects to"| node_mysql
node_ci -->|"runs analysis"| node_sonar
node_ci -->|"scans images"| node_trivy
node_ci -->|"triggers"| node_cd
node_cd -->|"pushes images"| node_ecr
node_cd -->|"deploys digests"| node_ecs
node_terraform -->|"provisions"| node_ecs
node_terraform -->|"provisions"| node_alb
node_terraform -->|"provisions"| node_rds
node_terraform -->|"provisions"| node_ecr
node_alb -->|"routes /api"| node_api_app
node_alb -->|"routes traffic"| node_ecs
node_api_app -->|"persists data"| node_rds
node_api_app -->|"loads credentials"| node_secrets
node_cloudwatch -->|"monitors"| node_ecs
node_cloudwatch -->|"monitors"| node_alb
node_cloudwatch -->|"monitors"| node_rds

click node_router "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/main.tsx"
click node_dashboard "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/App.tsx"
click node_books_ui "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/BooksPage.tsx"
click node_authors_ui "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/AuthorsPage.tsx"
click node_book_dialogs "https://github.com/rahulp-ht/multi-tier-devops-poc/tree/main/frontend/src/components"
click node_author_dialogs "https://github.com/rahulp-ht/multi-tier-devops-poc/tree/main/frontend/src/components"
click node_book_types "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/models/Books.ts"
click node_author_types "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/models/Author.ts"
click node_api_app "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/app.js"
click node_api_routes "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/routes/index.js"
click node_book_controller "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/controllers/BooksController.js"
click node_author_controller "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/controllers/AuthorsController.js"
click node_db_pool "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/configs/db.js"
click node_ci "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/Jenkinsfile"
click node_cd "https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/Jenkinsfile.cd"
click node_terraform "https://github.com/rahulp-ht/multi-tier-devops-poc/tree/main/terraform"
click node_cloudwatch "https://github.com/rahulp-ht/multi-tier-devops-poc/tree/main/monitoring"

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_router,node_dashboard,node_books_ui,node_authors_ui,node_book_dialogs,node_author_dialogs,node_book_types,node_author_types,node_user toneBlue
class node_api_app,node_api_routes,node_book_controller,node_author_controller toneAmber
class node_db_pool,node_mysql toneMint
class node_ci,node_cd,node_sonar,node_trivy toneRose
class node_ecr,node_terraform,node_alb,node_ecs,node_rds,node_secrets,node_cloudwatch toneIndigo
```

## Components

### Web application

- [Page router](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`
- [Dashboard charts](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Books management](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/BooksPage.tsx): `frontend/src/BooksPage.tsx`
- [Authors management](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/AuthorsPage.tsx): `frontend/src/AuthorsPage.tsx`
- [Book dialogs](https://github.com/rahulp-ht/multi-tier-devops-poc/tree/main/frontend/src/components): `frontend/src/components`
- [Author dialogs](https://github.com/rahulp-ht/multi-tier-devops-poc/tree/main/frontend/src/components): `frontend/src/components`
- [Book data types](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/models/Books.ts): `frontend/src/models/Books.ts`
- [Author data type](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/frontend/src/models/Author.ts): `frontend/src/models/Author.ts`

### Application API

- [Express app](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/app.js): `backend/app.js`
- [API routes](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/routes/index.js): `backend/routes/index.js`
- [Book CRUD](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/controllers/BooksController.js): `backend/controllers/BooksController.js`
- [Author CRUD](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/controllers/AuthorsController.js): `backend/controllers/AuthorsController.js`

### Persistence

- [MySQL pool](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/backend/configs/db.js): `backend/configs/db.js`
- **MySQL database**

### CI/CD

- [Jenkins CI](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/Jenkinsfile): `Jenkinsfile`
- [Jenkins CD](https://github.com/rahulp-ht/multi-tier-devops-poc/blob/main/Jenkinsfile.cd): `Jenkinsfile.cd`
- **SonarQube**
- **Trivy scans**

### AWS platform

- **Amazon ECR**
- [Infrastructure provisioning](https://github.com/rahulp-ht/multi-tier-devops-poc/tree/main/terraform): `terraform`
- **Load balancer**
- **ECS services**
- **Amazon RDS**
- **Secrets Manager**
- [CloudWatch](https://github.com/rahulp-ht/multi-tier-devops-poc/tree/main/monitoring): `monitoring`

### Other components

- **User**

## Connections

- User → Page router: opens (evidence: `README.md`)
- Page router → Dashboard charts: routes to (evidence: `frontend/src/main.tsx`)
- Page router → Books management: routes to (evidence: `frontend/src/main.tsx`)
- Page router → Authors management: routes to (evidence: `frontend/src/main.tsx`)
- Dashboard charts → Express app: fetches books (evidence: `frontend/src/App.tsx`)
- Books management → Express app: CRUD requests (evidence: `frontend/src/BooksPage.tsx`)
- Authors management → Express app: CRUD requests (evidence: `frontend/src/AuthorsPage.tsx`)
- Books management → Book dialogs: opens dialogs (evidence: `frontend/src/BooksPage.tsx`)
- Authors management → Author dialogs: opens dialogs (evidence: `frontend/src/AuthorsPage.tsx`)
- Books management → Book data types: uses types (evidence: `frontend/src/BooksPage.tsx`)
- Authors management → Author data type: uses type (evidence: `frontend/src/AuthorsPage.tsx`)
- Express app → API routes: mounts (evidence: `backend/app.js`)
- API routes → Book CRUD: dispatches (evidence: `backend/routes/index.js`)
- API routes → Author CRUD: dispatches (evidence: `backend/routes/index.js`)
- Book CRUD → MySQL pool: queries (evidence: `backend/controllers/BooksController.js`)
- Author CRUD → MySQL pool: queries (evidence: `backend/controllers/AuthorsController.js`)
- Express app → MySQL pool: checks connection (evidence: `backend/app.js`)
- MySQL pool → MySQL database: connects to
- Jenkins CI → SonarQube: runs analysis (evidence: `README.md`)
- Jenkins CI → Trivy scans: scans images (evidence: `README.md`)
- Jenkins CI → Jenkins CD: triggers (evidence: `README.md`)
- Jenkins CD → Amazon ECR: pushes images (evidence: `README.md`)
- Jenkins CD → ECS services: deploys digests (evidence: `README.md`)
- Infrastructure provisioning → ECS services: provisions (evidence: `README.md`)
- Infrastructure provisioning → Load balancer: provisions (evidence: `README.md`)
- Infrastructure provisioning → Amazon RDS: provisions (evidence: `README.md`)
- Infrastructure provisioning → Amazon ECR: provisions (evidence: `README.md`)
- Load balancer → Express app: routes /api (evidence: `README.md`)
- Load balancer → ECS services: routes traffic (evidence: `README.md`)
- Express app → Amazon RDS: persists data (evidence: `README.md`)
- Express app → Secrets Manager: loads credentials (evidence: `README.md`)
- CloudWatch → ECS services: monitors (evidence: `README.md`)
- CloudWatch → Load balancer: monitors (evidence: `README.md`)
- CloudWatch → Amazon RDS: monitors (evidence: `README.md`)
