# embarkxofficial/spring-boot-course architecture

> Architecture diagram of the GitHub repository embarkxofficial/spring-boot-course, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/embarkxofficial/spring-boot-course
- Repository: https://github.com/embarkxofficial/spring-boot-course

## Overview

This repository is a Spring Boot e-commerce application with a React storefront and admin interface, alongside separate Spring teaching examples. The main workflow is a customer browsing products, managing a cart, checking out and placing an order; administrators and sellers also manage catalog items and orders. The graph emphasizes that product workflow and its major auth, category, cart, order, analytics, and payment branches. Some backend implementations and frontend components are unsampled, so only documented or indexed relationships are connected.

Main entry points: [`ecom-frontend/src/App.jsx`](https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/App.jsx) (Route application), [`ecom-frontend/src/api/api.js`](https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/api/api.js) (HTTP client), [`ecom-frontend/src/store/actions/index.js`](https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/store/actions/index.js) (API actions), [`sb-ecom/src/main/java/com/ecommerce/project/controller/OrderController.java`](https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/controller/OrderController.java) (Order endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront UI"]
  node_app["Route application<br/>[App.jsx]"]
  node_customer_views["Customer views"]
  node_admin_views["Admin views"]
  node_checkout_views["Checkout views"]
end

subgraph group_frontend["Frontend data flow"]
  node_state["Redux state<br/>[store.js]"]
  node_actions["API actions<br/>[index.js]"]
  node_http_client["HTTP client<br/>[api.js]"]
end

subgraph group_api["E-commerce API"]
  node_product_api["Product endpoints"]
  node_cart_api["Cart endpoints"]
  node_order_api["Order endpoints"]
  node_other_api["Other endpoints"]
  node_product_service["Product service"]
  node_cart_service["Cart service<br/>[CartService.java]"]
  node_order_service["Order service<br/>[OrderService.java]"]
  node_auth_service["Authentication service<br/>[AuthService.java]"]
  node_auth_util["Current-user lookup<br/>[AuthUtil.java]"]
end

subgraph group_domain["Commerce data"]
  node_repositories["Data repositories"]
  node_models[("Commerce entities")]
end

subgraph group_payments["Payment integration"]
  node_stripe_service["Stripe service<br/>[StripeService.java]"]
end

node_shopper(("Shopper"))
node_admin(("Admin or seller"))
node_stripe["Stripe"]

node_shopper -->|"uses"| node_app
node_admin -->|"uses"| node_app
node_app -->|"routes to"| node_customer_views
node_app -->|"routes to"| node_admin_views
node_app -->|"routes to"| node_checkout_views
node_customer_views -.->|"dispatches"| node_actions
node_admin_views -.->|"dispatches"| node_actions
node_checkout_views -.->|"dispatches"| node_actions
node_app -->|"mounts with"| node_state
node_actions -.->|"updates"| node_state
node_actions -->|"calls"| node_http_client
node_http_client -.->|"requests"| node_product_api
node_http_client -.->|"requests"| node_cart_api
node_http_client -.->|"requests"| node_order_api
node_http_client -.->|"requests"| node_other_api
node_product_api -->|"delegates"| node_product_service
node_cart_api -->|"delegates"| node_cart_service
node_order_api -->|"delegates"| node_order_service
node_order_api -->|"gets user"| node_auth_util
node_order_api -->|"requests intent"| node_stripe_service
node_product_service -.->|"uses"| node_repositories
node_cart_service -.->|"uses"| node_repositories
node_order_service -.->|"uses"| node_repositories
node_repositories -.->|"persists"| node_models
node_stripe_service -.->|"integrates"| node_stripe

click node_app "https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/App.jsx"
click node_customer_views "https://github.com/embarkxofficial/spring-boot-course/tree/main/ecom-frontend/src/components"
click node_admin_views "https://github.com/embarkxofficial/spring-boot-course/tree/main/ecom-frontend/src/components/admin"
click node_checkout_views "https://github.com/embarkxofficial/spring-boot-course/tree/main/ecom-frontend/src/components/checkout"
click node_state "https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/store/reducers/store.js"
click node_actions "https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/store/actions/index.js"
click node_http_client "https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/api/api.js"
click node_product_api "https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/controller/ProductController.java"
click node_cart_api "https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/controller/CartController.java"
click node_order_api "https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/controller/OrderController.java"
click node_other_api "https://github.com/embarkxofficial/spring-boot-course/tree/main/sb-ecom/src/main/java/com/ecommerce/project/controller"
click node_product_service "https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/service/ProductService.java"
click node_cart_service "https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/service/CartService.java"
click node_order_service "https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/service/OrderService.java"
click node_auth_service "https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/service/AuthService.java"
click node_auth_util "https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/util/AuthUtil.java"
click node_repositories "https://github.com/embarkxofficial/spring-boot-course/tree/main/sb-ecom/src/main/java/com/ecommerce/project/repositories"
click node_models "https://github.com/embarkxofficial/spring-boot-course/tree/main/sb-ecom/src/main/java/com/ecommerce/project/model"
click node_stripe_service "https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/service/StripeService.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_app,node_customer_views,node_admin_views,node_checkout_views toneBlue
class node_state,node_actions,node_http_client toneAmber
class node_product_api,node_cart_api,node_order_api,node_other_api,node_product_service,node_cart_service,node_order_service,node_auth_service,node_auth_util toneMint
class node_repositories,node_models toneRose
class node_stripe_service,node_shopper,node_admin,node_stripe toneIndigo
```

## Components

### Storefront UI

- [Route application](https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/App.jsx): `ecom-frontend/src/App.jsx`
- [Customer views](https://github.com/embarkxofficial/spring-boot-course/tree/main/ecom-frontend/src/components): `ecom-frontend/src/components`
- [Admin views](https://github.com/embarkxofficial/spring-boot-course/tree/main/ecom-frontend/src/components/admin): `ecom-frontend/src/components/admin`
- [Checkout views](https://github.com/embarkxofficial/spring-boot-course/tree/main/ecom-frontend/src/components/checkout): `ecom-frontend/src/components/checkout`

### Frontend data flow

- [Redux state](https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/store/reducers/store.js): `ecom-frontend/src/store/reducers/store.js`
- [API actions](https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/store/actions/index.js): `ecom-frontend/src/store/actions/index.js`
- [HTTP client](https://github.com/embarkxofficial/spring-boot-course/blob/main/ecom-frontend/src/api/api.js): `ecom-frontend/src/api/api.js`

### E-commerce API

- [Product endpoints](https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/controller/ProductController.java): `sb-ecom/src/main/java/com/ecommerce/project/controller/ProductController.java`
- [Cart endpoints](https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/controller/CartController.java): `sb-ecom/src/main/java/com/ecommerce/project/controller/CartController.java`
- [Order endpoints](https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/controller/OrderController.java): `sb-ecom/src/main/java/com/ecommerce/project/controller/OrderController.java`
- [Other endpoints](https://github.com/embarkxofficial/spring-boot-course/tree/main/sb-ecom/src/main/java/com/ecommerce/project/controller): `sb-ecom/src/main/java/com/ecommerce/project/controller`
- [Product service](https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/service/ProductService.java): `sb-ecom/src/main/java/com/ecommerce/project/service/ProductService.java`
- [Cart service](https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/service/CartService.java): `sb-ecom/src/main/java/com/ecommerce/project/service/CartService.java`
- [Order service](https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/service/OrderService.java): `sb-ecom/src/main/java/com/ecommerce/project/service/OrderService.java`
- [Authentication service](https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/service/AuthService.java): `sb-ecom/src/main/java/com/ecommerce/project/service/AuthService.java`
- [Current-user lookup](https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/util/AuthUtil.java): `sb-ecom/src/main/java/com/ecommerce/project/util/AuthUtil.java`

### Commerce data

- [Data repositories](https://github.com/embarkxofficial/spring-boot-course/tree/main/sb-ecom/src/main/java/com/ecommerce/project/repositories): `sb-ecom/src/main/java/com/ecommerce/project/repositories`
- [Commerce entities](https://github.com/embarkxofficial/spring-boot-course/tree/main/sb-ecom/src/main/java/com/ecommerce/project/model): `sb-ecom/src/main/java/com/ecommerce/project/model`

### Payment integration

- [Stripe service](https://github.com/embarkxofficial/spring-boot-course/blob/main/sb-ecom/src/main/java/com/ecommerce/project/service/StripeService.java): `sb-ecom/src/main/java/com/ecommerce/project/service/StripeService.java`

### Other components

- **Shopper**
- **Admin or seller**
- **Stripe**

## Connections

- Shopper → Route application: uses (evidence: `ecom-frontend/src/App.jsx`)
- Admin or seller → Route application: uses (evidence: `ecom-frontend/src/App.jsx`)
- Route application → Customer views: routes to (evidence: `ecom-frontend/src/App.jsx`)
- Route application → Admin views: routes to (evidence: `ecom-frontend/src/App.jsx`)
- Route application → Checkout views: routes to (evidence: `ecom-frontend/src/App.jsx`)
- Customer views → API actions: dispatches (evidence: `ecom-frontend/src/components/admin/sellers/useSellerFilter.jsx`)
- Admin views → API actions: dispatches (evidence: `ecom-frontend/src/components/admin/sellers/useSellerFilter.jsx`)
- Checkout views → API actions: dispatches
- Route application → Redux state: mounts with (evidence: `ecom-frontend/src/main.jsx`)
- API actions → Redux state: updates
- API actions → HTTP client: calls (evidence: `ecom-frontend/src/store/actions/index.js`)
- HTTP client → Product endpoints: requests
- HTTP client → Cart endpoints: requests
- HTTP client → Order endpoints: requests
- HTTP client → Other endpoints: requests
- Product endpoints → Product service: delegates (evidence: `sb-ecom/src/main/java/com/ecommerce/project/controller/ProductController.java`)
- Cart endpoints → Cart service: delegates (evidence: `sb-ecom/src/main/java/com/ecommerce/project/controller/CartController.java`)
- Order endpoints → Order service: delegates (evidence: `sb-ecom/src/main/java/com/ecommerce/project/controller/OrderController.java`)
- Order endpoints → Current-user lookup: gets user (evidence: `sb-ecom/src/main/java/com/ecommerce/project/controller/OrderController.java`)
- Order endpoints → Stripe service: requests intent (evidence: `sb-ecom/src/main/java/com/ecommerce/project/controller/OrderController.java`)
- Product service → Data repositories: uses
- Cart service → Data repositories: uses
- Order service → Data repositories: uses
- Data repositories → Commerce entities: persists
- Stripe service → Stripe: integrates
