# rodmarapeta/e-commerce-platform architecture

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

- Interactive diagram: https://gitdiagram.com/rodmarapeta/e-commerce-platform
- Repository: https://github.com/rodmarapeta/e-commerce-platform

## Overview

The tree contains two distinct Java desktop-commerce implementations. The legacy `e_commerce_platform` branch covers storefront, account, inventory, reviews, and order management, using MySQL DAOs. The newer `ecommerce` branch has a multi-step checkout, simulated card/COD payments, and flat-file order history. The newer checkout service explicitly coordinates payment, order persistence, user history, and cart clearing; the launcher and other legacy UI wiring are only partly evidenced by the index. The README gives no further capability detail, and unsampled behavior is represented conservatively.

Main entry points: [`E-Commerce-Platform/src/ecommerce/service/CheckoutService.java`](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/service/CheckoutService.java) (Checkout service), [`E-Commerce-Platform/src/e_commerce_platform/ui/homePage.java`](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/homePage.java) (Storefront), [`E-Commerce-Platform/src/e_commerce_platform/CheckoutLauncher.java`](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/CheckoutLauncher.java) (Checkout launcher), [`E-Commerce-Platform/src/ecommerce/ui/CheckoutDialog.java`](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/ui/CheckoutDialog.java) (Checkout dialog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_legacy["Legacy storefront"]
  node_store_ui["Storefront<br/>[homePage.java]"]
  node_cart_ui["Shopping cart"]
  node_legacy_cart["Legacy cart<br/>[Cart.java]"]
  node_legacy_checkout["Legacy checkout<br/>[CheckoutPage.java]"]
  node_payment_ui["Payment page<br/>[PaymentPage.java]"]
  node_order_history["Order history<br/>[MyOrderPage.java]"]
  node_reviews_support["Reviews and support<br/>[MyReviewsPage.java]"]
  node_account_ui["Account access<br/>[loginPage.java]"]
end

subgraph group_legacy_admin["Legacy operations"]
  node_legacy_orders["Order management"]
  node_inventory_ui["Inventory tools<br/>[inventory.java]"]
  node_reports["Store reports"]
end

subgraph group_checkout["Checkout application"]
  node_launcher["Checkout launcher"]
  node_checkout_dialog["Checkout dialog"]
  node_checkout_service["Checkout service"]
  node_payment_service["Simulated payments"]
  node_order_model["Order data<br/>[Order.java]"]
  node_receipt["Receipt<br/>[ReceiptDialog.java]"]
  node_history_dialog["Order history dialog"]
end

subgraph group_storage["Persistence"]
  node_product_dao["Product DAO<br/>[ProductDao.java]"]
  node_order_dao["Order DAO<br/>[OrderDao.java]"]
  node_mysql[("MySQL access<br/>[DBConnection.java]")]
  node_order_repository[("Order repository")]
end

node_shopper(("Shopper"))

node_shopper -->|"browses"| node_store_ui
node_store_ui -->|"loads products"| node_product_dao
node_store_ui -->|"opens cart"| node_cart_ui
node_store_ui -->|"opens payment"| node_payment_ui
node_cart_ui -->|"uses cart"| node_legacy_cart
node_cart_ui -->|"opens checkout"| node_legacy_checkout
node_legacy_checkout -->|"submits order"| node_order_dao
node_payment_ui -->|"starts checkout"| node_launcher
node_launcher -->|"opens dialog"| node_checkout_dialog
node_launcher -->|"configures service"| node_checkout_service
node_launcher -->|"configures payments"| node_payment_service
node_checkout_dialog -->|"places order"| node_checkout_service
node_checkout_dialog -->|"shows receipt"| node_receipt
node_checkout_dialog -->|"displays order"| node_order_model
node_checkout_service -->|"charges payment"| node_payment_service
node_checkout_service -->|"saves order"| node_order_repository
node_checkout_service -->|"builds order"| node_order_model
node_history_dialog -->|"displays history"| node_order_model
node_inventory_ui -->|"manages products"| node_product_dao
node_product_dao -->|"queries products"| node_mysql
node_order_dao -->|"queries orders"| node_mysql
node_order_repository -->|"loads and stores"| node_order_model
node_legacy_orders -.->|"manages orders"| node_order_dao
node_order_history -.->|"loads history"| node_order_dao
node_reports -.->|"uses product data"| node_product_dao

click node_store_ui "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/homePage.java"
click node_cart_ui "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/ShoppingCartPage.java"
click node_legacy_cart "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/Cart.java"
click node_legacy_checkout "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/CheckoutPage.java"
click node_payment_ui "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/PaymentPage.java"
click node_legacy_orders "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/ManageOrdersPage.java"
click node_order_history "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/MyOrderPage.java"
click node_reviews_support "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/MyReviewsPage.java"
click node_account_ui "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/loginPage.java"
click node_inventory_ui "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/inventory.java"
click node_reports "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/inventoryReport.java"
click node_product_dao "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/dao/ProductDao.java"
click node_order_dao "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/dao/OrderDao.java"
click node_mysql "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/DBConnection.java"
click node_launcher "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/CheckoutLauncher.java"
click node_checkout_dialog "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/ui/CheckoutDialog.java"
click node_checkout_service "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/service/CheckoutService.java"
click node_payment_service "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/service/PaymentService.java"
click node_order_model "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/model/Order.java"
click node_order_repository "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/repository/OrderRepository.java"
click node_receipt "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/ui/ReceiptDialog.java"
click node_history_dialog "https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/ui/OrderHistoryDialog.java"

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_store_ui,node_cart_ui,node_legacy_cart,node_legacy_checkout,node_payment_ui,node_order_history,node_reviews_support,node_account_ui toneBlue
class node_legacy_orders,node_inventory_ui,node_reports toneAmber
class node_launcher,node_checkout_dialog,node_checkout_service,node_payment_service,node_order_model,node_receipt,node_history_dialog toneMint
class node_product_dao,node_order_dao,node_mysql,node_order_repository toneRose
class node_shopper toneIndigo
```

## Components

### Legacy storefront

- [Storefront](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/homePage.java): `E-Commerce-Platform/src/e_commerce_platform/ui/homePage.java`
- [Shopping cart](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/ShoppingCartPage.java): `E-Commerce-Platform/src/e_commerce_platform/ui/ShoppingCartPage.java`
- [Legacy cart](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/Cart.java): `E-Commerce-Platform/src/e_commerce_platform/Cart.java`
- [Legacy checkout](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/CheckoutPage.java): `E-Commerce-Platform/src/e_commerce_platform/ui/CheckoutPage.java`
- [Payment page](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/PaymentPage.java): `E-Commerce-Platform/src/e_commerce_platform/ui/PaymentPage.java`
- [Order history](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/MyOrderPage.java): `E-Commerce-Platform/src/e_commerce_platform/ui/MyOrderPage.java`
- [Reviews and support](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/MyReviewsPage.java): `E-Commerce-Platform/src/e_commerce_platform/ui/MyReviewsPage.java`
- [Account access](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/loginPage.java): `E-Commerce-Platform/src/e_commerce_platform/ui/loginPage.java`

### Legacy operations

- [Order management](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/ManageOrdersPage.java): `E-Commerce-Platform/src/e_commerce_platform/ui/ManageOrdersPage.java`
- [Inventory tools](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/inventory.java): `E-Commerce-Platform/src/e_commerce_platform/ui/inventory.java`
- [Store reports](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/ui/inventoryReport.java): `E-Commerce-Platform/src/e_commerce_platform/ui/inventoryReport.java`

### Checkout application

- [Checkout launcher](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/CheckoutLauncher.java): `E-Commerce-Platform/src/e_commerce_platform/CheckoutLauncher.java`
- [Checkout dialog](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/ui/CheckoutDialog.java): `E-Commerce-Platform/src/ecommerce/ui/CheckoutDialog.java`
- [Checkout service](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/service/CheckoutService.java): `E-Commerce-Platform/src/ecommerce/service/CheckoutService.java`
- [Simulated payments](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/service/PaymentService.java): `E-Commerce-Platform/src/ecommerce/service/PaymentService.java`
- [Order data](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/model/Order.java): `E-Commerce-Platform/src/ecommerce/model/Order.java`
- [Receipt](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/ui/ReceiptDialog.java): `E-Commerce-Platform/src/ecommerce/ui/ReceiptDialog.java`
- [Order history dialog](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/ui/OrderHistoryDialog.java): `E-Commerce-Platform/src/ecommerce/ui/OrderHistoryDialog.java`

### Persistence

- [Product DAO](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/dao/ProductDao.java): `E-Commerce-Platform/src/dao/ProductDao.java`
- [Order DAO](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/dao/OrderDao.java): `E-Commerce-Platform/src/dao/OrderDao.java`
- [MySQL access](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/e_commerce_platform/DBConnection.java): `E-Commerce-Platform/src/e_commerce_platform/DBConnection.java`
- [Order repository](https://github.com/rodmarapeta/e-commerce-platform/blob/main/E-Commerce-Platform/src/ecommerce/repository/OrderRepository.java): `E-Commerce-Platform/src/ecommerce/repository/OrderRepository.java`

### Other components

- **Shopper**

## Connections

- Shopper → Storefront: browses (evidence: `E-Commerce-Platform/src/e_commerce_platform/ui/homePage.java`)
- Storefront → Product DAO: loads products (evidence: `E-Commerce-Platform/src/e_commerce_platform/ui/homePage.java`)
- Storefront → Shopping cart: opens cart (evidence: `E-Commerce-Platform/src/e_commerce_platform/ui/homePage.java`)
- Storefront → Payment page: opens payment (evidence: `E-Commerce-Platform/src/e_commerce_platform/ui/homePage.java`)
- Shopping cart → Legacy cart: uses cart (evidence: `E-Commerce-Platform/src/e_commerce_platform/ui/ShoppingCartPage.java`)
- Shopping cart → Legacy checkout: opens checkout (evidence: `E-Commerce-Platform/src/e_commerce_platform/ui/ShoppingCartPage.java`)
- Legacy checkout → Order DAO: submits order (evidence: `E-Commerce-Platform/src/e_commerce_platform/ui/CheckoutPage.java`)
- Payment page → Checkout launcher: starts checkout (evidence: `E-Commerce-Platform/src/e_commerce_platform/ui/PaymentPage.java`)
- Checkout launcher → Checkout dialog: opens dialog (evidence: `E-Commerce-Platform/src/e_commerce_platform/CheckoutLauncher.java`)
- Checkout launcher → Checkout service: configures service (evidence: `E-Commerce-Platform/src/e_commerce_platform/CheckoutLauncher.java`)
- Checkout launcher → Simulated payments: configures payments (evidence: `E-Commerce-Platform/src/e_commerce_platform/CheckoutLauncher.java`)
- Checkout dialog → Checkout service: places order (evidence: `E-Commerce-Platform/src/ecommerce/ui/CheckoutDialog.java`)
- Checkout dialog → Receipt: shows receipt (evidence: `E-Commerce-Platform/src/ecommerce/ui/CheckoutDialog.java`)
- Checkout dialog → Order data: displays order (evidence: `E-Commerce-Platform/src/ecommerce/ui/CheckoutDialog.java`)
- Checkout service → Simulated payments: charges payment (evidence: `E-Commerce-Platform/src/ecommerce/service/CheckoutService.java`)
- Checkout service → Order repository: saves order (evidence: `E-Commerce-Platform/src/ecommerce/service/CheckoutService.java`)
- Checkout service → Order data: builds order (evidence: `E-Commerce-Platform/src/ecommerce/service/CheckoutService.java`)
- Order history dialog → Order data: displays history (evidence: `E-Commerce-Platform/src/ecommerce/ui/OrderHistoryDialog.java`)
- Inventory tools → Product DAO: manages products (evidence: `E-Commerce-Platform/src/e_commerce_platform/ui/inventory.java`)
- Product DAO → MySQL access: queries products (evidence: `E-Commerce-Platform/src/dao/ProductDao.java`)
- Order DAO → MySQL access: queries orders (evidence: `E-Commerce-Platform/src/dao/OrderDao.java`)
- Order repository → Order data: loads and stores (evidence: `E-Commerce-Platform/src/ecommerce/repository/OrderRepository.java`)
- Order management → Order DAO: manages orders
- Order history → Order DAO: loads history
- Store reports → Product DAO: uses product data
