# jishnu2745/java_21_reactjs_fullstack architecture

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

- Interactive diagram: https://gitdiagram.com/jishnu2745/java_21_reactjs_fullstack
- Repository: https://github.com/jishnu2745/java_21_reactjs_fullstack

## Overview

This repository is a React storefront and Java/Spring Boot microservices system. A customer signs in, browses products, submits an order, and can pay; order and payment events then drive asynchronous service work and notifications. The graph includes the documented gateway, service, database, cache, and Kafka roles, plus the frontend API/auth layer. Backend implementation excerpts were not provided, so backend relationships rely on README-described flows; other unverified connections are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/App.jsx) (React application), [`api-gateway/src/main/java/com/demo/gateway`](https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/api-gateway/src/main/java/com/demo/gateway) (API Gateway), [`order-service/src/main/java/com/demo/order`](https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/order-service/src/main/java/com/demo/order) (Order service), [`frontend/src/api/axiosInstance.js`](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/api/axiosInstance.js) (HTTP clients)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Frontend experience"]
  node_ui["React application<br/>[App.jsx]"]
  node_authstate["Auth context<br/>[AuthContext.jsx]"]
  node_authapi["Authentication API<br/>[auth.api.js]"]
  node_http["HTTP clients<br/>[axiosInstance.js]"]
  node_ordersui["Order workflow<br/>[OrdersPage.jsx]"]
  node_paymentui["Payment modal<br/>[PaymentModal.jsx]"]
  node_catalogui["Product catalog UI<br/>[ProductsPage.jsx]"]
  node_aggregateui["Aggregator UI<br/>[AggregatorPage.jsx]"]
  node_notificationsui["Notifications UI"]
end

subgraph group_edge["Ingress and identity"]
  node_gateway["API Gateway"]
  node_users["User service"]
end

subgraph group_commerce["Commerce services"]
  node_orders["Order service"]
  node_products["Product service"]
  node_payments["Payment service"]
end

subgraph group_events["Events and notifications"]
  node_kafka["Kafka event broker"]
  node_notifications["Notification service"]
end

subgraph group_platform["Runtime state"]
  node_databases[("Service databases")]
  node_redis[("Redis cache and locks")]
  node_s3["AWS S3"]
end

node_customer(("Customer"))

node_customer -->|"uses"| node_ui
node_ui -->|"provides auth"| node_authstate
node_authstate -->|"requests auth"| node_authapi
node_authapi -->|"uses client"| node_http
node_ordersui -->|"uses clients"| node_http
node_paymentui -->|"uses client"| node_http
node_aggregateui -->|"uses client"| node_http
node_ui -->|"routes to"| node_ordersui
node_ui -->|"routes to"| node_catalogui
node_ui -->|"routes to"| node_aggregateui
node_ui -->|"routes to"| node_notificationsui
node_http -->|"sends requests"| node_gateway
node_gateway -->|"routes auth"| node_users
node_gateway -->|"routes orders"| node_orders
node_gateway -->|"routes catalog"| node_products
node_gateway -->|"routes payments"| node_payments
node_orders -->|"checks inventory"| node_products
node_orders -->|"commits order and outbox"| node_databases
node_orders -->|"relays order events"| node_kafka
node_kafka -->|"delivers events"| node_notifications
node_notifications -->|"sends alerts"| node_customer
node_payments -->|"commits payment and outbox"| node_databases
node_payments -->|"relays payment events"| node_kafka
node_kafka -->|"delivers payment events"| node_orders
node_products -->|"caches and locks"| node_redis
node_products -.->|"stores images"| node_s3

click node_ui "https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/App.jsx"
click node_authstate "https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/context/AuthContext.jsx"
click node_authapi "https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/api/auth.api.js"
click node_http "https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/api/axiosInstance.js"
click node_ordersui "https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/pages/Orders/OrdersPage.jsx"
click node_paymentui "https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/components/common/PaymentModal.jsx"
click node_catalogui "https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/pages/Products/ProductsPage.jsx"
click node_aggregateui "https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/pages/Aggregator/AggregatorPage.jsx"
click node_notificationsui "https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/pages/Notifications/NotificationsPage.jsx"
click node_gateway "https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/api-gateway/src/main/java/com/demo/gateway"
click node_users "https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/user-service/src/main/java/com/demo/user"
click node_orders "https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/order-service/src/main/java/com/demo/order"
click node_products "https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/product-service/src/main/java/com/demo/product"
click node_payments "https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/payment-service/src/main/java/com/demo/payment"
click node_notifications "https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/notification-service/src/main/java/com/demo/notification"

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_ui,node_authstate,node_authapi,node_http,node_ordersui,node_paymentui,node_catalogui,node_aggregateui,node_notificationsui toneBlue
class node_gateway,node_users toneAmber
class node_orders,node_products,node_payments toneMint
class node_kafka,node_notifications toneRose
class node_databases,node_redis,node_s3,node_customer toneIndigo
```

## Components

### Frontend experience

- [React application](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth context](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Authentication API](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/api/auth.api.js): `frontend/src/api/auth.api.js`
- [HTTP clients](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/api/axiosInstance.js): `frontend/src/api/axiosInstance.js`
- [Order workflow](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/pages/Orders/OrdersPage.jsx): `frontend/src/pages/Orders/OrdersPage.jsx`
- [Payment modal](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/components/common/PaymentModal.jsx): `frontend/src/components/common/PaymentModal.jsx`
- [Product catalog UI](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/pages/Products/ProductsPage.jsx): `frontend/src/pages/Products/ProductsPage.jsx`
- [Aggregator UI](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/pages/Aggregator/AggregatorPage.jsx): `frontend/src/pages/Aggregator/AggregatorPage.jsx`
- [Notifications UI](https://github.com/jishnu2745/java_21_reactjs_fullstack/blob/main/frontend/src/pages/Notifications/NotificationsPage.jsx): `frontend/src/pages/Notifications/NotificationsPage.jsx`

### Ingress and identity

- [API Gateway](https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/api-gateway/src/main/java/com/demo/gateway): `api-gateway/src/main/java/com/demo/gateway`
- [User service](https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/user-service/src/main/java/com/demo/user): `user-service/src/main/java/com/demo/user`

### Commerce services

- [Order service](https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/order-service/src/main/java/com/demo/order): `order-service/src/main/java/com/demo/order`
- [Product service](https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/product-service/src/main/java/com/demo/product): `product-service/src/main/java/com/demo/product`
- [Payment service](https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/payment-service/src/main/java/com/demo/payment): `payment-service/src/main/java/com/demo/payment`

### Events and notifications

- **Kafka event broker**
- [Notification service](https://github.com/jishnu2745/java_21_reactjs_fullstack/tree/main/notification-service/src/main/java/com/demo/notification): `notification-service/src/main/java/com/demo/notification`

### Runtime state

- **Service databases**
- **Redis cache and locks**
- **AWS S3**

### Other components

- **Customer**

## Connections

- Customer → React application: uses (evidence: `README.md`)
- React application → Auth context: provides auth (evidence: `frontend/src/App.jsx`)
- Auth context → Authentication API: requests auth (evidence: `frontend/src/context/AuthContext.jsx`)
- Authentication API → HTTP clients: uses client (evidence: `frontend/src/api/auth.api.js`)
- Order workflow → HTTP clients: uses clients (evidence: `frontend/src/pages/Orders/OrdersPage.jsx`)
- Payment modal → HTTP clients: uses client (evidence: `frontend/src/components/common/PaymentModal.jsx`)
- Aggregator UI → HTTP clients: uses client
- React application → Order workflow: routes to (evidence: `frontend/src/App.jsx`)
- React application → Product catalog UI: routes to (evidence: `frontend/src/App.jsx`)
- React application → Aggregator UI: routes to (evidence: `frontend/src/App.jsx`)
- React application → Notifications UI: routes to (evidence: `frontend/src/App.jsx`)
- HTTP clients → API Gateway: sends requests (evidence: `README.md`)
- API Gateway → User service: routes auth (evidence: `README.md`)
- API Gateway → Order service: routes orders (evidence: `README.md`)
- API Gateway → Product service: routes catalog (evidence: `README.md`)
- API Gateway → Payment service: routes payments (evidence: `README.md`)
- Order service → Product service: checks inventory (evidence: `README.md`)
- Order service → Service databases: commits order and outbox (evidence: `README.md`)
- Order service → Kafka event broker: relays order events (evidence: `README.md`)
- Kafka event broker → Notification service: delivers events (evidence: `README.md`)
- Notification service → Customer: sends alerts (evidence: `README.md`)
- Payment service → Service databases: commits payment and outbox (evidence: `README.md`)
- Payment service → Kafka event broker: relays payment events (evidence: `README.md`)
- Kafka event broker → Order service: delivers payment events (evidence: `README.md`)
- Product service → Redis cache and locks: caches and locks (evidence: `README.md`)
- Product service → AWS S3: stores images
