# owasp/dvsa architecture

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

- Interactive diagram: https://gitdiagram.com/owasp/dvsa
- Repository: https://github.com/owasp/dvsa

## Overview

DVSA is a deliberately vulnerable serverless e-commerce application for security practice. A user browses products, adds them to a cart, supplies shipping and billing details, and reaches order confirmation; the client routes these screens and sends API requests to the backend. Separate capabilities cover account/profile and inbox access, administration, scheduled processing, and receipt email. The README documents these capabilities, but the excerpts do not show backend event or API routing, so those connections are left unasserted.

Main entry points: [`client/src/routers/AppRouter.js`](https://github.com/owasp/dvsa/blob/master/client/src/routers/AppRouter.js) (Page router), [`client/src/utils/apiCaller.js`](https://github.com/owasp/dvsa/blob/master/client/src/utils/apiCaller.js) (API caller), [`client/src/components/CartPage.js`](https://github.com/owasp/dvsa/blob/master/client/src/components/CartPage.js) (Shopping cart), [`client/src/components/InboxPage.js`](https://github.com/owasp/dvsa/blob/master/client/src/components/InboxPage.js) (Inbox and messages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Storefront client"]
  node_router["Page router<br/>[AppRouter.js]"]
  node_catalog["Product catalog<br/>[StorePage.js]"]
  node_product["Product details<br/>[ProductView.js]"]
  node_cart["Shopping cart<br/>[CartPage.js]"]
  node_shipping["Shipping details<br/>[ShippingPage.js]"]
  node_billing["Billing<br/>[BillingPage.js]"]
  node_confirmation["Order confirmation"]
  node_client_api["API caller<br/>[apiCaller.js]"]
  node_admin_ui["Admin screen<br/>[AdminPage.js]"]
end

subgraph group_commerce["Commerce backend"]
  node_store["Order functions"]
  node_processing["Order processing"]
  node_order_manager["Order manager<br/>[order-manager.js]"]
end

subgraph group_accounts["Accounts and messaging"]
  node_profile["Profile and accounts<br/>[ProfilePage.js]"]
  node_account_functions["User functions"]
  node_inbox["Inbox and messages<br/>[InboxPage.js]"]
  node_email["Receipt email"]
end

subgraph group_operations["Administration and jobs"]
  node_admin["Admin tools"]
  node_scheduled["Scheduled jobs"]
end

subgraph group_cloud["Cloud services"]
  node_identity["AWS identity<br/>[aws-exports.js]"]
  node_api{{"API endpoint"}}
end

node_shopper(("Shopper"))

node_shopper -->|"browses"| node_router
node_router -->|"routes to"| node_catalog
node_router -->|"routes to"| node_product
node_router -->|"routes to"| node_cart
node_router -->|"routes to"| node_shipping
node_router -->|"routes to"| node_billing
node_router -->|"routes to"| node_confirmation
node_shopper -.->|"manages"| node_cart
node_billing -->|"submits request"| node_client_api
node_cart -->|"calls"| node_client_api
node_confirmation -->|"calls"| node_client_api
node_client_api -->|"POST /order"| node_api
node_api -.->|"dispatches"| node_store
node_shopper -.->|"uses"| node_admin_ui
node_admin_ui -->|"calls"| node_client_api
node_shopper -.->|"manages account"| node_profile
node_profile -->|"calls"| node_client_api
node_shopper -.->|"checks messages"| node_inbox
node_inbox -->|"calls"| node_client_api
node_processing -.->|"sends receipts"| node_email
node_email -.->|"delivers messages"| node_inbox
node_identity -->|"configures endpoint"| node_api

click node_router "https://github.com/owasp/dvsa/blob/master/client/src/routers/AppRouter.js"
click node_catalog "https://github.com/owasp/dvsa/blob/master/client/src/components/StorePage.js"
click node_product "https://github.com/owasp/dvsa/blob/master/client/src/components/ProductView.js"
click node_cart "https://github.com/owasp/dvsa/blob/master/client/src/components/CartPage.js"
click node_shipping "https://github.com/owasp/dvsa/blob/master/client/src/components/ShippingPage.js"
click node_billing "https://github.com/owasp/dvsa/blob/master/client/src/components/BillingPage.js"
click node_confirmation "https://github.com/owasp/dvsa/blob/master/client/src/components/ConfirmationPage.js"
click node_client_api "https://github.com/owasp/dvsa/blob/master/client/src/utils/apiCaller.js"
click node_store "https://github.com/owasp/dvsa/tree/master/backend/functions/order"
click node_processing "https://github.com/owasp/dvsa/tree/master/backend/functions/processing"
click node_order_manager "https://github.com/owasp/dvsa/blob/master/backend/functions/order-manager/order-manager.js"
click node_admin "https://github.com/owasp/dvsa/tree/master/backend/functions/admin"
click node_admin_ui "https://github.com/owasp/dvsa/blob/master/client/src/components/AdminPage.js"
click node_scheduled "https://github.com/owasp/dvsa/tree/master/backend/functions/cronjobs"
click node_profile "https://github.com/owasp/dvsa/blob/master/client/src/components/ProfilePage.js"
click node_account_functions "https://github.com/owasp/dvsa/tree/master/backend/functions/user"
click node_inbox "https://github.com/owasp/dvsa/blob/master/client/src/components/InboxPage.js"
click node_email "https://github.com/owasp/dvsa/blob/master/backend/functions/processing/send_receipt_email.py"
click node_identity "https://github.com/owasp/dvsa/blob/master/client/src/aws-exports.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_router,node_catalog,node_product,node_cart,node_shipping,node_billing,node_confirmation,node_client_api,node_admin_ui toneBlue
class node_store,node_processing,node_order_manager toneAmber
class node_profile,node_account_functions,node_inbox,node_email toneMint
class node_admin,node_scheduled toneRose
class node_identity,node_api,node_shopper toneIndigo
```

## Components

### Storefront client

- [Page router](https://github.com/owasp/dvsa/blob/master/client/src/routers/AppRouter.js): `client/src/routers/AppRouter.js`
- [Product catalog](https://github.com/owasp/dvsa/blob/master/client/src/components/StorePage.js): `client/src/components/StorePage.js`
- [Product details](https://github.com/owasp/dvsa/blob/master/client/src/components/ProductView.js): `client/src/components/ProductView.js`
- [Shopping cart](https://github.com/owasp/dvsa/blob/master/client/src/components/CartPage.js): `client/src/components/CartPage.js`
- [Shipping details](https://github.com/owasp/dvsa/blob/master/client/src/components/ShippingPage.js): `client/src/components/ShippingPage.js`
- [Billing](https://github.com/owasp/dvsa/blob/master/client/src/components/BillingPage.js): `client/src/components/BillingPage.js`
- [Order confirmation](https://github.com/owasp/dvsa/blob/master/client/src/components/ConfirmationPage.js): `client/src/components/ConfirmationPage.js`
- [API caller](https://github.com/owasp/dvsa/blob/master/client/src/utils/apiCaller.js): `client/src/utils/apiCaller.js`
- [Admin screen](https://github.com/owasp/dvsa/blob/master/client/src/components/AdminPage.js): `client/src/components/AdminPage.js`

### Commerce backend

- [Order functions](https://github.com/owasp/dvsa/tree/master/backend/functions/order): `backend/functions/order`
- [Order processing](https://github.com/owasp/dvsa/tree/master/backend/functions/processing): `backend/functions/processing`
- [Order manager](https://github.com/owasp/dvsa/blob/master/backend/functions/order-manager/order-manager.js): `backend/functions/order-manager/order-manager.js`

### Accounts and messaging

- [Profile and accounts](https://github.com/owasp/dvsa/blob/master/client/src/components/ProfilePage.js): `client/src/components/ProfilePage.js`
- [User functions](https://github.com/owasp/dvsa/tree/master/backend/functions/user): `backend/functions/user`
- [Inbox and messages](https://github.com/owasp/dvsa/blob/master/client/src/components/InboxPage.js): `client/src/components/InboxPage.js`
- [Receipt email](https://github.com/owasp/dvsa/blob/master/backend/functions/processing/send_receipt_email.py): `backend/functions/processing/send_receipt_email.py`

### Administration and jobs

- [Admin tools](https://github.com/owasp/dvsa/tree/master/backend/functions/admin): `backend/functions/admin`
- [Scheduled jobs](https://github.com/owasp/dvsa/tree/master/backend/functions/cronjobs): `backend/functions/cronjobs`

### Cloud services

- [AWS identity](https://github.com/owasp/dvsa/blob/master/client/src/aws-exports.js): `client/src/aws-exports.js`
- **API endpoint**

### Other components

- **Shopper**

## Connections

- Shopper → Page router: browses (evidence: `client/src/routers/AppRouter.js`)
- Page router → Product catalog: routes to (evidence: `client/src/routers/AppRouter.js`)
- Page router → Product details: routes to (evidence: `client/src/routers/AppRouter.js`)
- Page router → Shopping cart: routes to (evidence: `client/src/routers/AppRouter.js`)
- Page router → Shipping details: routes to (evidence: `client/src/routers/AppRouter.js`)
- Page router → Billing: routes to (evidence: `client/src/routers/AppRouter.js`)
- Page router → Order confirmation: routes to (evidence: `client/src/routers/AppRouter.js`)
- Shopper → Shopping cart: manages
- Billing → API caller: submits request (evidence: `client/src/components/BillingPage.js`)
- Shopping cart → API caller: calls (evidence: `client/src/components/CartPage.js`)
- Order confirmation → API caller: calls (evidence: `client/src/components/ConfirmationPage.js`)
- API caller → API endpoint: POST /order (evidence: `client/src/utils/apiCaller.js`)
- API endpoint → Order functions: dispatches
- Shopper → Admin screen: uses
- Admin screen → API caller: calls (evidence: `client/src/components/AdminPage.js`)
- Shopper → Profile and accounts: manages account
- Profile and accounts → API caller: calls (evidence: `client/src/components/ProfilePage.js`)
- Shopper → Inbox and messages: checks messages
- Inbox and messages → API caller: calls (evidence: `client/src/components/InboxPage.js`)
- Order processing → Receipt email: sends receipts
- Receipt email → Inbox and messages: delivers messages
- AWS identity → API endpoint: configures endpoint (evidence: `client/src/aws-exports.js`)
