# jaiswaladi246/proxy-demo-repo architecture

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

- Interactive diagram: https://gitdiagram.com/jaiswaladi246/proxy-demo-repo
- Repository: https://github.com/jaiswaladi246/proxy-demo-repo

## Overview

This is a hands-on reverse-proxy demo: a browser uses the DevOps Shack page to request backend information or health, while a public Nginx proxy forwards requests to the private Express service. The README documents the AWS public/private EC2 and security-group boundary, proxy headers, logging, and basic load-balancing concepts; those deployment elements are not represented by source files in the supplied tree. Runtime links follow the documented proxy flow and sampled browser/server behavior.

Main entry points: [`server.js`](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/server.js) (Express service), [`public/index.html`](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/public/index.html) (Demo page), [`public/app.js`](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/public/app.js) (Interactive demo), [`public/style.css`](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/public/style.css) (Presentation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_page["Demo page<br/>[index.html]"]
  node_client_logic["Interactive demo<br/>[app.js]"]
  node_styles["Presentation<br/>[style.css]"]
  node_concepts["Proxy learning topics<br/>[README.md]"]
end

subgraph group_backend["Private application"]
  node_express["Express service<br/>[server.js]"]
  node_static_files["Static assets"]
  node_info_api["Info endpoint<br/>[server.js]"]
  node_health_api["Health endpoint<br/>[server.js]"]
end

subgraph group_deployment["Proxy deployment"]
  node_proxy["Nginx reverse proxy"]
  node_proxy_host["Public EC2"]
  node_network["VPC and security groups"]
  node_backend_host["Private EC2"]
  node_logging["Nginx access logs"]
  node_load_balancing["Basic load balancing"]
end

node_browser(("Visitor"))

node_browser -->|"opens"| node_page
node_page -->|"loads"| node_styles
node_page -->|"loads"| node_client_logic
node_client_logic -->|"requests"| node_proxy
node_proxy -->|"runs on"| node_proxy_host
node_proxy_host -->|"attached to"| node_network
node_network -->|"permits proxy traffic"| node_backend_host
node_proxy -->|"forwards HTTP"| node_express
node_backend_host -->|"runs on"| node_express
node_express -->|"serves"| node_static_files
node_express -->|"dispatches"| node_info_api
node_express -->|"dispatches"| node_health_api
node_client_logic -->|"fetches via proxy"| node_info_api
node_client_logic -->|"fetches via proxy"| node_health_api
node_proxy -->|"records requests"| node_logging
node_proxy -.->|"can provide"| node_load_balancing
node_page -->|"illustrates"| node_concepts

click node_page "https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/public/index.html"
click node_client_logic "https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/public/app.js"
click node_styles "https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/public/style.css"
click node_express "https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/server.js"
click node_static_files "https://github.com/jaiswaladi246/proxy-demo-repo/tree/main/public"
click node_info_api "https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/server.js"
click node_health_api "https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/server.js"
click node_concepts "https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/README.md"

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_page,node_client_logic,node_styles,node_concepts toneBlue
class node_express,node_static_files,node_info_api,node_health_api toneAmber
class node_proxy,node_proxy_host,node_network,node_backend_host,node_logging,node_load_balancing toneMint
class node_browser toneIndigo
```

## Components

### Browser experience

- [Demo page](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/public/index.html): `public/index.html`
- [Interactive demo](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/public/app.js): `public/app.js`
- [Presentation](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/public/style.css): `public/style.css`
- [Proxy learning topics](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/README.md): `README.md`

### Private application

- [Express service](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/server.js): `server.js`
- [Static assets](https://github.com/jaiswaladi246/proxy-demo-repo/tree/main/public): `public`
- [Info endpoint](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/server.js): `server.js`
- [Health endpoint](https://github.com/jaiswaladi246/proxy-demo-repo/blob/main/server.js): `server.js`

### Proxy deployment

- **Nginx reverse proxy**
- **Public EC2**
- **VPC and security groups**
- **Private EC2**
- **Nginx access logs**
- **Basic load balancing**

### Other components

- **Visitor**

## Connections

- Visitor → Demo page: opens
- Demo page → Presentation: loads
- Demo page → Interactive demo: loads
- Interactive demo → Nginx reverse proxy: requests
- Nginx reverse proxy → Public EC2: runs on
- Public EC2 → VPC and security groups: attached to
- VPC and security groups → Private EC2: permits proxy traffic
- Nginx reverse proxy → Express service: forwards HTTP
- Private EC2 → Express service: runs on
- Express service → Static assets: serves
- Express service → Info endpoint: dispatches
- Express service → Health endpoint: dispatches
- Interactive demo → Info endpoint: fetches via proxy
- Interactive demo → Health endpoint: fetches via proxy
- Nginx reverse proxy → Nginx access logs: records requests
- Nginx reverse proxy → Basic load balancing: can provide
- Demo page → Proxy learning topics: illustrates
