# truong-2005/animeshop architecture

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

- Interactive diagram: https://gitdiagram.com/truong-2005/animeshop
- Repository: https://github.com/truong-2005/animeshop

## Overview

AnimeShop is a microservices-based anime shop. The tree indicates a user-facing gateway, authentication, product and content management, and order handling, with service discovery supporting the backend. The likely user journey is to enter through the gateway, browse the catalog, and place an order; however, the supplied README and source excerpts do not document or show those runtime connections. The graph therefore identifies the product stages and their implementation areas without asserting unsupported calls or data flows.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_edge["Entry and identity"]
  node_gateway["API gateway<br/>[GatewayConfig.java]"]
  node_gateway_jwt["JWT filter"]
  node_auth_api["Authentication API"]
  node_auth_service["Auth service<br/>[AuthService.java]"]
  node_jwt_service["JWT service<br/>[JwtService.java]"]
  node_user_store[("User repository")]
end

subgraph group_commerce["Shop operations"]
  node_product_api["Product API"]
  node_product_service["Product service"]
  node_category_api["Category products"]
  node_banner_api["Banner API"]
  node_image_storage["Catalog images"]
  node_order_api["Order API"]
  node_order_detail_api["Order details"]
  node_order_service["Order service<br/>[OrderService.java]"]
  node_product_client["Product client<br/>[ProductClient.java]"]
end

subgraph group_content["Storefront content"]
  node_category_content["Content categories"]
  node_post_content["Posts"]
  node_post_service["Post service<br/>[PostService.java]"]
  node_content_images["Content images"]
end

subgraph group_platform["Service platform"]
  node_discovery["Service discovery"]
end

node_shopper(("Shopper"))

click node_gateway "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/api-gateway/src/main/java/com/example/apigateway/config/GatewayConfig.java"
click node_gateway_jwt "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/api-gateway/src/main/java/com/example/apigateway/filter/JwtGatewayFilter.java"
click node_auth_api "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/auth-service/src/main/java/com/example/authservice/controller/AuthController.java"
click node_auth_service "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/auth-service/src/main/java/com/example/authservice/service/AuthService.java"
click node_jwt_service "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/auth-service/src/main/java/com/example/authservice/security/JwtService.java"
click node_user_store "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/auth-service/src/main/java/com/example/authservice/repository/UserRepository.java"
click node_product_api "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/controller/ProductController.java"
click node_product_service "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/service/ProductService.java"
click node_category_api "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/controller/CategoryProductController.java"
click node_banner_api "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/controller/BannerController.java"
click node_image_storage "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/service/ImageStorageService.java"
click node_order_api "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/order-service/src/main/java/com/example/orderservice/controller/OrderController.java"
click node_order_detail_api "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/order-service/src/main/java/com/example/orderservice/controller/OrderDetailController.java"
click node_order_service "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/order-service/src/main/java/com/example/orderservice/service/OrderService.java"
click node_product_client "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/order-service/src/main/java/com/example/orderservice/client/ProductClient.java"
click node_category_content "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/content-service/src/main/java/com/example/contentservice/controller/CategoryController.java"
click node_post_content "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/content-service/src/main/java/com/example/contentservice/controller/PostController.java"
click node_post_service "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/content-service/src/main/java/com/example/contentservice/service/PostService.java"
click node_content_images "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/content-service/src/main/java/com/example/contentservice/service/ImageStorageService.java"
click node_discovery "https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/discovery-server/src/main/java/com/example/discoveryserver/DiscoveryServerApplication.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_gateway,node_gateway_jwt,node_auth_api,node_auth_service,node_jwt_service,node_user_store toneBlue
class node_product_api,node_product_service,node_category_api,node_banner_api,node_image_storage,node_order_api,node_order_detail_api,node_order_service,node_product_client toneAmber
class node_category_content,node_post_content,node_post_service,node_content_images toneMint
class node_discovery toneRose
class node_shopper toneIndigo
```

## Components

### Entry and identity

- [API gateway](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/api-gateway/src/main/java/com/example/apigateway/config/GatewayConfig.java): `anime-shop-microservices/api-gateway/src/main/java/com/example/apigateway/config/GatewayConfig.java`
- [JWT filter](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/api-gateway/src/main/java/com/example/apigateway/filter/JwtGatewayFilter.java): `anime-shop-microservices/api-gateway/src/main/java/com/example/apigateway/filter/JwtGatewayFilter.java`
- [Authentication API](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/auth-service/src/main/java/com/example/authservice/controller/AuthController.java): `anime-shop-microservices/auth-service/src/main/java/com/example/authservice/controller/AuthController.java`
- [Auth service](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/auth-service/src/main/java/com/example/authservice/service/AuthService.java): `anime-shop-microservices/auth-service/src/main/java/com/example/authservice/service/AuthService.java`
- [JWT service](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/auth-service/src/main/java/com/example/authservice/security/JwtService.java): `anime-shop-microservices/auth-service/src/main/java/com/example/authservice/security/JwtService.java`
- [User repository](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/auth-service/src/main/java/com/example/authservice/repository/UserRepository.java): `anime-shop-microservices/auth-service/src/main/java/com/example/authservice/repository/UserRepository.java`

### Shop operations

- [Product API](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/controller/ProductController.java): `anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/controller/ProductController.java`
- [Product service](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/service/ProductService.java): `anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/service/ProductService.java`
- [Category products](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/controller/CategoryProductController.java): `anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/controller/CategoryProductController.java`
- [Banner API](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/controller/BannerController.java): `anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/controller/BannerController.java`
- [Catalog images](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/service/ImageStorageService.java): `anime-shop-microservices/catalog-service/src/main/java/com/example/catalogservice/service/ImageStorageService.java`
- [Order API](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/order-service/src/main/java/com/example/orderservice/controller/OrderController.java): `anime-shop-microservices/order-service/src/main/java/com/example/orderservice/controller/OrderController.java`
- [Order details](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/order-service/src/main/java/com/example/orderservice/controller/OrderDetailController.java): `anime-shop-microservices/order-service/src/main/java/com/example/orderservice/controller/OrderDetailController.java`
- [Order service](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/order-service/src/main/java/com/example/orderservice/service/OrderService.java): `anime-shop-microservices/order-service/src/main/java/com/example/orderservice/service/OrderService.java`
- [Product client](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/order-service/src/main/java/com/example/orderservice/client/ProductClient.java): `anime-shop-microservices/order-service/src/main/java/com/example/orderservice/client/ProductClient.java`

### Storefront content

- [Content categories](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/content-service/src/main/java/com/example/contentservice/controller/CategoryController.java): `anime-shop-microservices/content-service/src/main/java/com/example/contentservice/controller/CategoryController.java`
- [Posts](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/content-service/src/main/java/com/example/contentservice/controller/PostController.java): `anime-shop-microservices/content-service/src/main/java/com/example/contentservice/controller/PostController.java`
- [Post service](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/content-service/src/main/java/com/example/contentservice/service/PostService.java): `anime-shop-microservices/content-service/src/main/java/com/example/contentservice/service/PostService.java`
- [Content images](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/content-service/src/main/java/com/example/contentservice/service/ImageStorageService.java): `anime-shop-microservices/content-service/src/main/java/com/example/contentservice/service/ImageStorageService.java`

### Service platform

- [Service discovery](https://github.com/truong-2005/animeshop/blob/main/anime-shop-microservices/discovery-server/src/main/java/com/example/discoveryserver/DiscoveryServerApplication.java): `anime-shop-microservices/discovery-server/src/main/java/com/example/discoveryserver/DiscoveryServerApplication.java`

### Other components

- **Shopper**
