# sanimanqezu/spring-boot-microservices architecture

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

- Interactive diagram: https://gitdiagram.com/sanimanqezu/spring-boot-microservices
- Repository: https://github.com/sanimanqezu/spring-boot-microservices

## Overview

This is a Spring Cloud inventory-management system with an Angular GUI, an API gateway, and independently responsible user, product, order, and address services. The principal workflow is a user managing domain records in the GUI: domain screens call API clients, which send requests through the shared request layer to the gateway and then to the relevant backend service. The README documents service discovery, centralized configuration, and PostgreSQL persistence; sampled source confirms GUI request wiring and the Orders and Users Feign clients. Backend implementation details and exact database wiring were not sampled.

Main entry points: [`services/GatewayService/src/main/java/com/example/GatewayService/GatewayServiceApplication.java`](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/GatewayService/src/main/java/com/example/GatewayService/GatewayServiceApplication.java) (API Gateway), [`services/ConfigServer/src/main/java/com/example/ConfigServer/ConfigServerApplication.java`](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/ConfigServer/src/main/java/com/example/ConfigServer/ConfigServerApplication.java) (Config Server), [`services/Orders/src/main/java/za/co/example/controllers/OrdersController.java`](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/Orders/src/main/java/za/co/example/controllers/OrdersController.java) (Orders service), [`services/Users/src/main/java/za/co/example/controllers/UsersController.java`](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/Users/src/main/java/za/co/example/controllers/UsersController.java) (Users service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gui["Inventory GUI"]
  node_screens["Domain screens"]
  node_clients["Domain API clients"]
  node_requests["HTTP request layer<br/>[request.service.ts]"]
  node_alerts["Error notifications"]
end

subgraph group_edge["API Entry"]
  node_gateway["API Gateway"]
end

subgraph group_domains["Business Services"]
  node_users["Users service"]
  node_products["Products service"]
  node_orders["Orders service"]
  node_addresses["Addresses service"]
  node_userdb[("Users database")]
  node_productdb[("Products database")]
  node_orderdb[("Orders database")]
  node_addressdb[("Addresses database")]
end

subgraph group_platform["Cloud Platform"]
  node_eureka[("Eureka registry")]
  node_config["Config Server"]
end

node_operator(("Inventory user"))
node_postgres[("PostgreSQL")]

node_operator -->|"uses"| node_screens
node_screens -->|"calls"| node_clients
node_clients -->|"sends requests"| node_requests
node_requests -->|"HTTP requests"| node_gateway
node_gateway -->|"routes requests"| node_users
node_gateway -->|"routes requests"| node_products
node_gateway -->|"routes requests"| node_orders
node_gateway -->|"routes requests"| node_addresses
node_requests -->|"errors reach"| node_alerts
node_orders -.->|"Feign calls"| node_products
node_orders -.->|"Feign calls"| node_users
node_users -.->|"Feign calls"| node_addresses
node_users -->|"persists data"| node_userdb
node_products -->|"persists data"| node_productdb
node_orders -->|"persists data"| node_orderdb
node_addresses -->|"persists data"| node_addressdb
node_userdb -->|"stored in"| node_postgres
node_productdb -->|"stored in"| node_postgres
node_orderdb -->|"stored in"| node_postgres
node_addressdb -->|"stored in"| node_postgres
node_users -->|"registers"| node_eureka
node_products -->|"registers"| node_eureka
node_orders -->|"registers"| node_eureka
node_addresses -->|"registers"| node_eureka
node_gateway -->|"discovers services"| node_eureka
node_config -->|"provides configuration"| node_users
node_config -->|"provides configuration"| node_products
node_config -->|"provides configuration"| node_orders
node_config -->|"provides configuration"| node_addresses
node_config -->|"provides configuration"| node_gateway
node_config -->|"provides configuration"| node_eureka

click node_screens "https://github.com/sanimanqezu/spring-boot-microservices/tree/main/services/InventoryGUI/src/app/components"
click node_clients "https://github.com/sanimanqezu/spring-boot-microservices/tree/main/services/InventoryGUI/src/app/services"
click node_requests "https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/InventoryGUI/src/app/services/request-service/request.service.ts"
click node_alerts "https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/InventoryGUI/src/app/services/httpInterceptor-service/http-interceptor.service.ts"
click node_gateway "https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/GatewayService/src/main/java/com/example/GatewayService/GatewayServiceApplication.java"
click node_users "https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/Users/src/main/java/za/co/example/controllers/UsersController.java"
click node_products "https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/Products/src/main/java/za/co/example/controllers/ProductsController.java"
click node_orders "https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/Orders/src/main/java/za/co/example/controllers/OrdersController.java"
click node_addresses "https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/Addresses/src/main/java/za/co/example/controllers/AddressesController.java"
click node_eureka "https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/EurekaServer/src/main/java/com/example/EurekaServer/EurekaServerApplication.java"
click node_config "https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/ConfigServer/src/main/java/com/example/ConfigServer/ConfigServerApplication.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_screens,node_clients,node_requests,node_alerts,node_operator toneBlue
class node_gateway,node_postgres toneAmber
class node_users,node_products,node_orders,node_addresses,node_userdb,node_productdb,node_orderdb,node_addressdb toneMint
class node_eureka,node_config toneRose
```

## Components

### Inventory GUI

- [Domain screens](https://github.com/sanimanqezu/spring-boot-microservices/tree/main/services/InventoryGUI/src/app/components): `services/InventoryGUI/src/app/components`
- [Domain API clients](https://github.com/sanimanqezu/spring-boot-microservices/tree/main/services/InventoryGUI/src/app/services): `services/InventoryGUI/src/app/services`
- [HTTP request layer](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/InventoryGUI/src/app/services/request-service/request.service.ts): `services/InventoryGUI/src/app/services/request-service/request.service.ts`
- [Error notifications](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/InventoryGUI/src/app/services/httpInterceptor-service/http-interceptor.service.ts): `services/InventoryGUI/src/app/services/httpInterceptor-service/http-interceptor.service.ts`

### API Entry

- [API Gateway](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/GatewayService/src/main/java/com/example/GatewayService/GatewayServiceApplication.java): `services/GatewayService/src/main/java/com/example/GatewayService/GatewayServiceApplication.java`

### Business Services

- [Users service](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/Users/src/main/java/za/co/example/controllers/UsersController.java): `services/Users/src/main/java/za/co/example/controllers/UsersController.java`
- [Products service](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/Products/src/main/java/za/co/example/controllers/ProductsController.java): `services/Products/src/main/java/za/co/example/controllers/ProductsController.java`
- [Orders service](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/Orders/src/main/java/za/co/example/controllers/OrdersController.java): `services/Orders/src/main/java/za/co/example/controllers/OrdersController.java`
- [Addresses service](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/Addresses/src/main/java/za/co/example/controllers/AddressesController.java): `services/Addresses/src/main/java/za/co/example/controllers/AddressesController.java`
- **Users database**
- **Products database**
- **Orders database**
- **Addresses database**

### Cloud Platform

- [Eureka registry](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/EurekaServer/src/main/java/com/example/EurekaServer/EurekaServerApplication.java): `services/EurekaServer/src/main/java/com/example/EurekaServer/EurekaServerApplication.java`
- [Config Server](https://github.com/sanimanqezu/spring-boot-microservices/blob/main/services/ConfigServer/src/main/java/com/example/ConfigServer/ConfigServerApplication.java): `services/ConfigServer/src/main/java/com/example/ConfigServer/ConfigServerApplication.java`

### Other components

- **Inventory user**
- **PostgreSQL**

## Connections

- Inventory user → Domain screens: uses
- Domain screens → Domain API clients: calls
- Domain API clients → HTTP request layer: sends requests
- HTTP request layer → API Gateway: HTTP requests
- API Gateway → Users service: routes requests
- API Gateway → Products service: routes requests
- API Gateway → Orders service: routes requests
- API Gateway → Addresses service: routes requests
- HTTP request layer → Error notifications: errors reach
- Orders service → Products service: Feign calls
- Orders service → Users service: Feign calls
- Users service → Addresses service: Feign calls
- Users service → Users database: persists data
- Products service → Products database: persists data
- Orders service → Orders database: persists data
- Addresses service → Addresses database: persists data
- Users database → PostgreSQL: stored in
- Products database → PostgreSQL: stored in
- Orders database → PostgreSQL: stored in
- Addresses database → PostgreSQL: stored in
- Users service → Eureka registry: registers
- Products service → Eureka registry: registers
- Orders service → Eureka registry: registers
- Addresses service → Eureka registry: registers
- API Gateway → Eureka registry: discovers services
- Config Server → Users service: provides configuration
- Config Server → Products service: provides configuration
- Config Server → Orders service: provides configuration
- Config Server → Addresses service: provides configuration
- Config Server → API Gateway: provides configuration
- Config Server → Eureka registry: provides configuration
