# angreenpro/zero-trust-microsegmentation-ecomweb architecture

> Architecture diagram of the GitHub repository angreenpro/zero-trust-microsegmentation-ecomweb, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/angreenpro/zero-trust-microsegmentation-ecomweb
- Repository: https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb

## Overview

This is a Zero Trust micro-segmentation demo built around an online-store workflow: customers browse products, authenticate for a JWT, and submit orders with wallet-based payment; they can also view orders and payment receipts. The principal services and their database operations are visible in the sampled source. The README documents an Nginx PEP gateway and network isolation, but its configuration and the frontend interactions were not sampled, so those links are shown only where documented or left unverified.

Main entry points: [`nginx-gateway/nginx.conf`](https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/nginx-gateway/nginx.conf) (PEP gateway), [`mysql-db/init.sql`](https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/mysql-db/init.sql) (MySQL data), [`auth-service/main.py`](https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/auth-service/main.py) (Identity and JWT), [`catalog-service/main.py`](https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/catalog-service/main.py) (Product catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_edge["User interface"]
  node_gateway["PEP gateway<br/>[nginx.conf]"]
  node_web["Store website<br/>[index.html]"]
end

subgraph group_services["Application services"]
  node_auth["Identity and JWT<br/>[main.py]"]
  node_catalog["Product catalog<br/>[main.py]"]
  node_orders["Orders and payments<br/>[main.py]"]
end

subgraph group_state["Persistent data"]
  node_mysql[("MySQL data<br/>[init.sql]")]
end

node_customer(("Customer"))

node_customer -->|"visits store"| node_gateway
node_gateway -.->|"serves UI"| node_web
node_gateway -.->|"routes requests"| node_auth
node_gateway -.->|"routes requests"| node_catalog
node_gateway -.->|"routes requests"| node_orders
node_auth -->|"reads users"| node_mysql
node_catalog -->|"reads products"| node_mysql
node_orders -->|"reads and writes"| node_mysql

click node_gateway "https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/nginx-gateway/nginx.conf"
click node_web "https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/web/index.html"
click node_auth "https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/auth-service/main.py"
click node_catalog "https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/catalog-service/main.py"
click node_orders "https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/order-service/main.py"
click node_mysql "https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/mysql-db/init.sql"

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_gateway,node_web toneBlue
class node_auth,node_catalog,node_orders toneAmber
class node_mysql toneMint
class node_customer toneIndigo
```

## Components

### User interface

- [PEP gateway](https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/nginx-gateway/nginx.conf): `nginx-gateway/nginx.conf`
- [Store website](https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/web/index.html): `web/index.html`

### Application services

- [Identity and JWT](https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/auth-service/main.py): `auth-service/main.py`
- [Product catalog](https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/catalog-service/main.py): `catalog-service/main.py`
- [Orders and payments](https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/order-service/main.py): `order-service/main.py`

### Persistent data

- [MySQL data](https://github.com/angreenpro/zero-trust-microsegmentation-ecomweb/blob/main/mysql-db/init.sql): `mysql-db/init.sql`

### Other components

- **Customer**

## Connections

- Customer → PEP gateway: visits store (evidence: `README.md`)
- PEP gateway → Store website: serves UI
- PEP gateway → Identity and JWT: routes requests
- PEP gateway → Product catalog: routes requests
- PEP gateway → Orders and payments: routes requests
- Identity and JWT → MySQL data: reads users (evidence: `auth-service/main.py`)
- Product catalog → MySQL data: reads products (evidence: `catalog-service/main.py`)
- Orders and payments → MySQL data: reads and writes (evidence: `order-service/main.py`)
