# dharshibalasubramaniyam/fullstack-e-commerce-web-application architecture

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

- Interactive diagram: https://gitdiagram.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application
- Repository: https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application

## Overview

Purely is a React e-commerce frontend backed by Spring Boot microservices. The main user journey is browsing and searching products, managing a cart, authenticating, and checking out to an order-success page. The README documents the gateway as the frontend’s sole backend entry point, service discovery, and dedicated MongoDB databases. Frontend routing and the checkout component are visible in the supplied source; most backend internals and inter-service calls are not, so the graph limits those connections to documented architecture relationships.

Main entry points: [`microservice-backend/api-gateway/src/main/java/com/dharshi/apigateway/ApiGatewayApplication.java`](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/microservice-backend/api-gateway/src/main/java/com/dharshi/apigateway/ApiGatewayApplication.java) (API gateway), [`microservice-backend/service-registry/src/main/java/com/dharshi/serviceregistry/ServiceRegistryApplication.java`](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/microservice-backend/service-registry/src/main/java/com/dharshi/serviceregistry/ServiceRegistryApplication.java) (Service registry), [`frontend/src/routes/routes.jsx`](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/frontend/src/routes/routes.jsx) (Store routes), [`microservice-backend/auth-service/src/main/java/com/dharshi/authservice/services`](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/auth-service/src/main/java/com/dharshi/authservice/services) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Customer storefront"]
  node_routes["Store routes<br/>[routes.jsx]"]
  node_checkout["Checkout flow<br/>[checkout.jsx]"]
  node_api["API configuration<br/>[apiConfig.jsx]"]
  node_authcontext["Auth state<br/>[auth.context.jsx]"]
  node_storefront["Browse and account pages"]
end

subgraph group_edge["Request routing"]
  node_gateway["API gateway"]
  node_registry["Service registry"]
end

subgraph group_identity["Identity and accounts"]
  node_auth["Authentication"]
  node_users["User accounts"]
end

subgraph group_catalog["Product catalog"]
  node_categories["Categories"]
  node_products["Product catalog"]
end

subgraph group_commerce["Cart and orders"]
  node_cart["Shopping cart"]
  node_orders["Order processing"]
  node_notifications["Email notifications"]
end

node_customer(("Shopper"))
node_mongo[("MongoDB databases")]

node_customer -->|"browses"| node_routes
node_routes -->|"routes to"| node_storefront
node_routes -->|"routes to"| node_checkout
node_checkout -.->|"uses API config"| node_api
node_storefront -.->|"calls backend"| node_api
node_api -->|"sends requests"| node_gateway
node_gateway -->|"routes requests"| node_auth
node_gateway -.->|"routes requests"| node_users
node_gateway -->|"routes requests"| node_categories
node_gateway -.->|"routes requests"| node_products
node_gateway -.->|"routes requests"| node_cart
node_gateway -.->|"routes requests"| node_orders
node_gateway -.->|"routes requests"| node_notifications
node_auth -->|"registers with"| node_registry
node_users -->|"registers with"| node_registry
node_categories -->|"registers with"| node_registry
node_products -->|"registers with"| node_registry
node_cart -->|"registers with"| node_registry
node_orders -->|"registers with"| node_registry
node_notifications -->|"registers with"| node_registry
node_auth -->|"persists data"| node_mongo
node_users -->|"persists data"| node_mongo
node_categories -->|"persists data"| node_mongo
node_products -->|"persists data"| node_mongo
node_cart -->|"persists data"| node_mongo
node_orders -->|"persists data"| node_mongo

click node_routes "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/frontend/src/routes/routes.jsx"
click node_checkout "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/frontend/src/pages/checkout/checkout.jsx"
click node_api "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/frontend/src/api-service/apiConfig.jsx"
click node_authcontext "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/frontend/src/contexts/auth.context.jsx"
click node_storefront "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/frontend/src/pages"
click node_gateway "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/microservice-backend/api-gateway/src/main/java/com/dharshi/apigateway/ApiGatewayApplication.java"
click node_registry "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/microservice-backend/service-registry/src/main/java/com/dharshi/serviceregistry/ServiceRegistryApplication.java"
click node_auth "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/auth-service/src/main/java/com/dharshi/authservice/services"
click node_users "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/user-service/src/main/java/com/dharshi/userservice/services"
click node_categories "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/category-service/src/main/java/com/dharshi/categoryservice/services"
click node_products "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/product-service/src/main/java/com/dharshi/productservice/services"
click node_cart "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/cart-service/src/main/java/com/dharshi/cartservice/services"
click node_orders "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/order-service/src/main/java/com/dharshi/orderservice/services"
click node_notifications "https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/notification-service/src/main/java/com/dharshi/notificationservice/services"

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_routes,node_checkout,node_api,node_authcontext,node_storefront toneBlue
class node_gateway,node_registry,node_mongo toneAmber
class node_auth,node_users toneMint
class node_categories,node_products toneRose
class node_cart,node_orders,node_notifications,node_customer toneIndigo
```

## Components

### Customer storefront

- [Store routes](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/frontend/src/routes/routes.jsx): `frontend/src/routes/routes.jsx`
- [Checkout flow](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/frontend/src/pages/checkout/checkout.jsx): `frontend/src/pages/checkout/checkout.jsx`
- [API configuration](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/frontend/src/api-service/apiConfig.jsx): `frontend/src/api-service/apiConfig.jsx`
- [Auth state](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/frontend/src/contexts/auth.context.jsx): `frontend/src/contexts/auth.context.jsx`
- [Browse and account pages](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/frontend/src/pages): `frontend/src/pages`

### Request routing

- [API gateway](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/microservice-backend/api-gateway/src/main/java/com/dharshi/apigateway/ApiGatewayApplication.java): `microservice-backend/api-gateway/src/main/java/com/dharshi/apigateway/ApiGatewayApplication.java`
- [Service registry](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/blob/main/microservice-backend/service-registry/src/main/java/com/dharshi/serviceregistry/ServiceRegistryApplication.java): `microservice-backend/service-registry/src/main/java/com/dharshi/serviceregistry/ServiceRegistryApplication.java`

### Identity and accounts

- [Authentication](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/auth-service/src/main/java/com/dharshi/authservice/services): `microservice-backend/auth-service/src/main/java/com/dharshi/authservice/services`
- [User accounts](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/user-service/src/main/java/com/dharshi/userservice/services): `microservice-backend/user-service/src/main/java/com/dharshi/userservice/services`

### Product catalog

- [Categories](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/category-service/src/main/java/com/dharshi/categoryservice/services): `microservice-backend/category-service/src/main/java/com/dharshi/categoryservice/services`
- [Product catalog](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/product-service/src/main/java/com/dharshi/productservice/services): `microservice-backend/product-service/src/main/java/com/dharshi/productservice/services`

### Cart and orders

- [Shopping cart](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/cart-service/src/main/java/com/dharshi/cartservice/services): `microservice-backend/cart-service/src/main/java/com/dharshi/cartservice/services`
- [Order processing](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/order-service/src/main/java/com/dharshi/orderservice/services): `microservice-backend/order-service/src/main/java/com/dharshi/orderservice/services`
- [Email notifications](https://github.com/dharshibalasubramaniyam/fullstack-e-commerce-web-application/tree/main/microservice-backend/notification-service/src/main/java/com/dharshi/notificationservice/services): `microservice-backend/notification-service/src/main/java/com/dharshi/notificationservice/services`

### Other components

- **Shopper**
- **MongoDB databases**

## Connections

- Shopper → Store routes: browses (evidence: `README.md`)
- Store routes → Browse and account pages: routes to (evidence: `frontend/src/routes/routes.jsx`)
- Store routes → Checkout flow: routes to (evidence: `frontend/src/routes/routes.jsx`)
- Checkout flow → API configuration: uses API config
- Browse and account pages → API configuration: calls backend
- API configuration → API gateway: sends requests (evidence: `README.md`)
- API gateway → Authentication: routes requests (evidence: `README.md`)
- API gateway → User accounts: routes requests
- API gateway → Categories: routes requests (evidence: `README.md`)
- API gateway → Product catalog: routes requests
- API gateway → Shopping cart: routes requests
- API gateway → Order processing: routes requests
- API gateway → Email notifications: routes requests
- Authentication → Service registry: registers with (evidence: `README.md`)
- User accounts → Service registry: registers with (evidence: `README.md`)
- Categories → Service registry: registers with (evidence: `README.md`)
- Product catalog → Service registry: registers with (evidence: `README.md`)
- Shopping cart → Service registry: registers with (evidence: `README.md`)
- Order processing → Service registry: registers with (evidence: `README.md`)
- Email notifications → Service registry: registers with (evidence: `README.md`)
- Authentication → MongoDB databases: persists data (evidence: `README.md`)
- User accounts → MongoDB databases: persists data (evidence: `README.md`)
- Categories → MongoDB databases: persists data (evidence: `README.md`)
- Product catalog → MongoDB databases: persists data (evidence: `README.md`)
- Shopping cart → MongoDB databases: persists data (evidence: `README.md`)
- Order processing → MongoDB databases: persists data (evidence: `README.md`)
