# thesandeepkonda/aws-serverless-ecommerce-platform architecture

> Architecture diagram of the GitHub repository thesandeepkonda/aws-serverless-ecommerce-platform, 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/thesandeepkonda/aws-serverless-ecommerce-platform
- Repository: https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform

## Overview

This is a serverless e-commerce backend: users and administrators call API Gateway routes handled by domain-specific Lambda functions for accounts, catalog, carts, orders, tracking, files, banners, and email. A typical purchase moves from cart management through checkout and payment verification to order persistence; the Orders service emits an OrderPlaced event that the Products handler consumes to decrement stock. The README is generic SAM setup guidance rather than product documentation, so capabilities and wiring here are based on the sampled handlers/services; unsampled subsystems are represented only where the tree supports them.

Main entry points: [`services/Orders/service.py`](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Orders/service.py) (Checkout and Orders), [`services/Products/lambda_handler.py`](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Products/lambda_handler.py) (Catalog API), [`services/Auth/lambda_handler.py`](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Auth/lambda_handler.py) (Identity API), [`services/Auth/service.py`](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Auth/service.py) (Account and Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commerce["Commerce"]
  node_cart_handler["Cart API<br/>[lambda_handler.py]"]
  node_cart_service["Cart Operations<br/>[service.py]"]
  node_orders_handler["Orders API<br/>[lambda_handler.py]"]
  node_orders_service["Checkout and Orders<br/>[service.py]"]
  node_products_handler["Catalog API<br/>[lambda_handler.py]"]
  node_products_service["Product Catalog"]
  node_product_features["Catalog Features"]
end

subgraph group_identity["Identity"]
  node_auth_handler["Identity API<br/>[lambda_handler.py]"]
  node_auth_service["Account and Login<br/>[service.py]"]
  node_address_service["Address Book<br/>[address.py]"]
  node_admin_handler["Admin Validation<br/>[lambda_handler.py]"]
end

subgraph group_operations["Operations"]
  node_history_handler["Tracking API<br/>[lambda_handler.py]"]
  node_history_service["Order Tracking<br/>[service.py]"]
end

subgraph group_experience["Customer Experience"]
  node_files_handler["Files and Banners API<br/>[lambda_handler.py]"]
  node_files_service["File Operations<br/>[service.py]"]
  node_banner_service["Banner Management<br/>[banners.py]"]
  node_email_handler["Email API<br/>[lambda_handler.py]"]
  node_email_service["Email Templates and Delivery<br/>[service.py]"]
end

subgraph group_integrations["External Services"]
  node_db[("DynamoDB")]
  node_eventbridge["EventBridge"]
  node_razorpay["Razorpay"]
  node_smtp["SMTP Server"]
  node_google["Google OAuth"]
  node_s3[("Object Storage")]
end

node_shopper(("Shopper"))
node_admin_user(("Administrator"))
node_api{{"API Gateway"}}

node_shopper -->|"sends requests"| node_api
node_admin_user -->|"sends requests"| node_api
node_api -->|"routes cart calls"| node_cart_handler
node_cart_handler -->|"dispatches operations"| node_cart_service
node_cart_service -->|"reads and writes"| node_db
node_api -->|"routes order calls"| node_orders_handler
node_orders_handler -->|"dispatches operations"| node_orders_service
node_orders_service -->|"reads and writes"| node_db
node_orders_service -.->|"creates and verifies payments"| node_razorpay
node_orders_service -->|"publishes OrderPlaced"| node_eventbridge
node_eventbridge -->|"dispatches OrderPlaced"| node_products_handler
node_api -->|"routes catalog calls"| node_products_handler
node_products_handler -->|"dispatches catalog calls"| node_products_service
node_products_handler -->|"dispatches features"| node_product_features
node_products_service -->|"reads and writes"| node_db
node_product_features -->|"catalog data access"| node_db
node_api -->|"routes account calls"| node_auth_handler
node_auth_handler -->|"dispatches account calls"| node_auth_service
node_auth_handler -->|"dispatches address calls"| node_address_service
node_auth_service -->|"reads and writes"| node_db
node_address_service -->|"reads and writes"| node_db
node_auth_service -.->|"validates Google tokens"| node_google
node_api -->|"routes admin checks"| node_admin_handler
node_api -->|"routes tracking calls"| node_history_handler
node_history_handler -->|"dispatches tracking calls"| node_history_service
node_history_service -->|"reads and writes"| node_db
node_api -->|"routes file calls"| node_files_handler
node_files_handler -->|"dispatches file calls"| node_files_service
node_files_handler -->|"dispatches banner calls"| node_banner_service
node_files_service -.->|"manages file objects"| node_s3
node_banner_service -.->|"banner data access"| node_db
node_api -->|"routes email calls"| node_email_handler
node_email_handler -->|"dispatches email calls"| node_email_service
node_email_service -->|"sends mail"| node_smtp

click node_cart_handler "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Cart/lambda_handler.py"
click node_cart_service "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Cart/service.py"
click node_orders_handler "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Orders/lambda_handler.py"
click node_orders_service "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Orders/service.py"
click node_products_handler "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Products/lambda_handler.py"
click node_products_service "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Products/products_service.py"
click node_product_features "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/tree/main/services/Products"
click node_auth_handler "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Auth/lambda_handler.py"
click node_auth_service "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Auth/service.py"
click node_address_service "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Auth/address.py"
click node_admin_handler "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Admin/lambda_handler.py"
click node_history_handler "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/History/lambda_handler.py"
click node_history_service "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/History/service.py"
click node_files_handler "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Files/lambda_handler.py"
click node_files_service "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Files/service.py"
click node_banner_service "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Files/banners.py"
click node_email_handler "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Email/lambda_handler.py"
click node_email_service "https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Email/service.py"

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_cart_handler,node_cart_service,node_orders_handler,node_orders_service,node_products_handler,node_products_service,node_product_features toneBlue
class node_auth_handler,node_auth_service,node_address_service,node_admin_handler toneAmber
class node_history_handler,node_history_service,node_api toneMint
class node_files_handler,node_files_service,node_banner_service,node_email_handler,node_email_service toneRose
class node_db,node_eventbridge,node_razorpay,node_smtp,node_google,node_s3,node_shopper,node_admin_user toneIndigo
```

## Components

### Commerce

- [Cart API](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Cart/lambda_handler.py): `services/Cart/lambda_handler.py`
- [Cart Operations](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Cart/service.py): `services/Cart/service.py`
- [Orders API](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Orders/lambda_handler.py): `services/Orders/lambda_handler.py`
- [Checkout and Orders](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Orders/service.py): `services/Orders/service.py`
- [Catalog API](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Products/lambda_handler.py): `services/Products/lambda_handler.py`
- [Product Catalog](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Products/products_service.py): `services/Products/products_service.py`
- [Catalog Features](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/tree/main/services/Products): `services/Products`

### Identity

- [Identity API](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Auth/lambda_handler.py): `services/Auth/lambda_handler.py`
- [Account and Login](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Auth/service.py): `services/Auth/service.py`
- [Address Book](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Auth/address.py): `services/Auth/address.py`
- [Admin Validation](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Admin/lambda_handler.py): `services/Admin/lambda_handler.py`

### Operations

- [Tracking API](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/History/lambda_handler.py): `services/History/lambda_handler.py`
- [Order Tracking](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/History/service.py): `services/History/service.py`

### Customer Experience

- [Files and Banners API](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Files/lambda_handler.py): `services/Files/lambda_handler.py`
- [File Operations](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Files/service.py): `services/Files/service.py`
- [Banner Management](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Files/banners.py): `services/Files/banners.py`
- [Email API](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Email/lambda_handler.py): `services/Email/lambda_handler.py`
- [Email Templates and Delivery](https://github.com/thesandeepkonda/aws-serverless-ecommerce-platform/blob/main/services/Email/service.py): `services/Email/service.py`

### External Services

- **DynamoDB**
- **EventBridge**
- **Razorpay**
- **SMTP Server**
- **Google OAuth**
- **Object Storage**

### Other components

- **Shopper**
- **Administrator**
- **API Gateway**

## Connections

- Shopper → API Gateway: sends requests
- Administrator → API Gateway: sends requests
- API Gateway → Cart API: routes cart calls
- Cart API → Cart Operations: dispatches operations
- Cart Operations → DynamoDB: reads and writes
- API Gateway → Orders API: routes order calls
- Orders API → Checkout and Orders: dispatches operations
- Checkout and Orders → DynamoDB: reads and writes
- Checkout and Orders → Razorpay: creates and verifies payments
- Checkout and Orders → EventBridge: publishes OrderPlaced
- EventBridge → Catalog API: dispatches OrderPlaced
- API Gateway → Catalog API: routes catalog calls
- Catalog API → Product Catalog: dispatches catalog calls
- Catalog API → Catalog Features: dispatches features
- Product Catalog → DynamoDB: reads and writes
- Catalog Features → DynamoDB: catalog data access
- API Gateway → Identity API: routes account calls
- Identity API → Account and Login: dispatches account calls
- Identity API → Address Book: dispatches address calls
- Account and Login → DynamoDB: reads and writes
- Address Book → DynamoDB: reads and writes
- Account and Login → Google OAuth: validates Google tokens
- API Gateway → Admin Validation: routes admin checks
- API Gateway → Tracking API: routes tracking calls
- Tracking API → Order Tracking: dispatches tracking calls
- Order Tracking → DynamoDB: reads and writes
- API Gateway → Files and Banners API: routes file calls
- Files and Banners API → File Operations: dispatches file calls
- Files and Banners API → Banner Management: dispatches banner calls
- File Operations → Object Storage: manages file objects
- Banner Management → DynamoDB: banner data access
- API Gateway → Email API: routes email calls
- Email API → Email Templates and Delivery: dispatches email calls
- Email Templates and Delivery → SMTP Server: sends mail
