# kevinxjavier/spring-boot-webflux-apirest-client-server architecture

> Architecture diagram of the GitHub repository kevinxjavier/spring-boot-webflux-apirest-client-server, 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/kevinxjavier/spring-boot-webflux-apirest-client-server
- Repository: https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server

## Overview

This repository pairs a reactive Spring WebFlux product API with a separate WebFlux client application. The server exposes product operations through both annotated controller endpoints and functional routes; handlers/services cover CRUD, validation, categories, and image uploads, with MongoDB-backed persistence. The client exposes its own functional routes and delegates product operations to a client service. The client-to-server HTTP relationship is likely, but the shown excerpts do not establish it, so it is marked unverified.

Main entry points: [`spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductServiceImpl.java`](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductServiceImpl.java) (Service implementation), [`spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/controllers/ProductController.java`](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/controllers/ProductController.java) (Product controller), [`spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/RouterFunctionConfig.java`](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/RouterFunctionConfig.java) (Functional routes), [`spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/handler/ProductHandler.java`](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/handler/ProductHandler.java) (Product handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_server_api["Server API"]
  node_server_boot["Server startup"]
  node_server_controller["Product controller"]
  node_server_router["Functional routes"]
  node_server_handler["Product handler"]
  node_server_http["Product API"]
end

subgraph group_server_domain["Server Domain"]
  node_server_service["Product service"]
  node_server_service_impl["Service implementation"]
  node_server_product["Product document<br/>[Product.java]"]
  node_server_category["Category document<br/>[Category.java]"]
end

subgraph group_server_data["Server Persistence"]
  node_product_dao["Product repository<br/>[ProductDao.java]"]
  node_category_dao["Category repository<br/>[CategoryDao.java]"]
  node_mongo[("MongoDB")]
end

subgraph group_client_app["Client Application"]
  node_client_router["Client routes<br/>[RouterConfig.java]"]
  node_client_handler["Client handler"]
  node_client_service["Client service"]
  node_client_service_impl["Client service implementation"]
  node_client_product["Client product model<br/>[Product.java]"]
end

node_api_user(("API caller"))
node_client_user(("Client caller"))

node_api_user -->|"sends requests"| node_server_controller
node_api_user -->|"sends requests"| node_server_router
node_server_router -->|"routes requests"| node_server_handler
node_server_controller -->|"calls"| node_server_service
node_server_handler -->|"calls"| node_server_service
node_server_service_impl -->|"uses"| node_product_dao
node_server_service_impl -->|"uses"| node_category_dao
node_server_service_impl -->|"queries"| node_mongo
node_product_dao -->|"persists"| node_mongo
node_category_dao -->|"persists"| node_mongo
node_client_user -->|"sends requests"| node_client_router
node_client_router -->|"routes requests"| node_client_handler
node_client_handler -->|"calls"| node_client_service
node_client_service_impl -.->|"calls API"| node_server_http
node_server_http -.->|"serves requests"| node_server_controller

click node_server_boot "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/SpringBootWebfluxApirestApplication.java"
click node_server_controller "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/controllers/ProductController.java"
click node_server_router "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/RouterFunctionConfig.java"
click node_server_handler "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/handler/ProductHandler.java"
click node_server_service "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductService.java"
click node_server_service_impl "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductServiceImpl.java"
click node_server_product "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/documents/Product.java"
click node_server_category "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/documents/Category.java"
click node_product_dao "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/dao/ProductDao.java"
click node_category_dao "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/dao/CategoryDao.java"
click node_client_router "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/webflux-client/src/main/java/com/kevinpina/client/RouterConfig.java"
click node_client_handler "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/webflux-client/src/main/java/com/kevinpina/client/handler/ProductHandler.java"
click node_client_service "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/webflux-client/src/main/java/com/kevinpina/client/services/ProductService.java"
click node_client_service_impl "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/webflux-client/src/main/java/com/kevinpina/client/services/ProductServiceImpl.java"
click node_client_product "https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/webflux-client/src/main/java/com/kevinpina/client/models/Product.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_server_boot,node_server_controller,node_server_router,node_server_handler,node_server_http,node_client_user toneBlue
class node_server_service,node_server_service_impl,node_server_product,node_server_category toneAmber
class node_product_dao,node_category_dao,node_mongo,node_api_user toneMint
class node_client_router,node_client_handler,node_client_service,node_client_service_impl,node_client_product toneRose
```

## Components

### Server API

- [Server startup](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/SpringBootWebfluxApirestApplication.java): `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/SpringBootWebfluxApirestApplication.java`
- [Product controller](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/controllers/ProductController.java): `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/controllers/ProductController.java`
- [Functional routes](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/RouterFunctionConfig.java): `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/RouterFunctionConfig.java`
- [Product handler](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/handler/ProductHandler.java): `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/handler/ProductHandler.java`
- **Product API**

### Server Domain

- [Product service](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductService.java): `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductService.java`
- [Service implementation](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductServiceImpl.java): `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductServiceImpl.java`
- [Product document](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/documents/Product.java): `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/documents/Product.java`
- [Category document](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/documents/Category.java): `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/documents/Category.java`

### Server Persistence

- [Product repository](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/dao/ProductDao.java): `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/dao/ProductDao.java`
- [Category repository](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/dao/CategoryDao.java): `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/dao/CategoryDao.java`
- **MongoDB**

### Client Application

- [Client routes](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/webflux-client/src/main/java/com/kevinpina/client/RouterConfig.java): `webflux-client/src/main/java/com/kevinpina/client/RouterConfig.java`
- [Client handler](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/webflux-client/src/main/java/com/kevinpina/client/handler/ProductHandler.java): `webflux-client/src/main/java/com/kevinpina/client/handler/ProductHandler.java`
- [Client service](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/webflux-client/src/main/java/com/kevinpina/client/services/ProductService.java): `webflux-client/src/main/java/com/kevinpina/client/services/ProductService.java`
- [Client service implementation](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/webflux-client/src/main/java/com/kevinpina/client/services/ProductServiceImpl.java): `webflux-client/src/main/java/com/kevinpina/client/services/ProductServiceImpl.java`
- [Client product model](https://github.com/kevinxjavier/spring-boot-webflux-apirest-client-server/blob/master/webflux-client/src/main/java/com/kevinpina/client/models/Product.java): `webflux-client/src/main/java/com/kevinpina/client/models/Product.java`

### Other components

- **API caller**
- **Client caller**

## Connections

- API caller → Product controller: sends requests (evidence: `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/controllers/ProductController.java`)
- API caller → Functional routes: sends requests (evidence: `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/RouterFunctionConfig.java`)
- Functional routes → Product handler: routes requests (evidence: `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/RouterFunctionConfig.java`)
- Product controller → Product service: calls (evidence: `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/controllers/ProductController.java`)
- Product handler → Product service: calls (evidence: `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/handler/ProductHandler.java`)
- Service implementation → Product repository: uses (evidence: `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductServiceImpl.java`)
- Service implementation → Category repository: uses (evidence: `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductServiceImpl.java`)
- Service implementation → MongoDB: queries (evidence: `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/services/ProductServiceImpl.java`)
- Product repository → MongoDB: persists (evidence: `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/dao/ProductDao.java`)
- Category repository → MongoDB: persists (evidence: `spring-boot-webflux-apirest-functional_endpoints-router_function-tests/src/main/java/com/kevinpina/models/dao/CategoryDao.java`)
- Client caller → Client routes: sends requests (evidence: `webflux-client/src/main/java/com/kevinpina/client/RouterConfig.java`)
- Client routes → Client handler: routes requests (evidence: `webflux-client/src/main/java/com/kevinpina/client/RouterConfig.java`)
- Client handler → Client service: calls (evidence: `webflux-client/src/main/java/com/kevinpina/client/handler/ProductHandler.java`)
- Client service implementation → Product API: calls API
- Product API → Product controller: serves requests
