# alexpeti/spring-boot-microservices architecture

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

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

## Overview

This repository demonstrates a Spring Boot microservices ecosystem. A client sends requests through the API Gateway, which routes traffic and filters access to protected endpoints; the Identity Service provides registration, authentication, and JWT handling. Eureka supports service discovery, and Spring Cloud Config provides centralized configuration. The README does not specify service-to-service call paths or which services consume configuration, so those links are omitted rather than inferred.

Main entry points: [`api-gateway-service/src/main/java/com/example/apigatewayservice/routing`](https://github.com/alexpeti/spring-boot-microservices/tree/main/api-gateway-service/src/main/java/com/example/apigatewayservice/routing) (Request routing), [`identity-service/src/main/java/com/example/identityservice/auth`](https://github.com/alexpeti/spring-boot-microservices/tree/main/identity-service/src/main/java/com/example/identityservice/auth) (Authentication), [`eureka-naming-server/src/main/java/com/example/eurekanamingserver`](https://github.com/alexpeti/spring-boot-microservices/tree/main/eureka-naming-server/src/main/java/com/example/eurekanamingserver) (Service discovery), [`api-gateway-service/src/main/java/com/example/apigatewayservice/security`](https://github.com/alexpeti/spring-boot-microservices/tree/main/api-gateway-service/src/main/java/com/example/apigatewayservice/security) (JWT filters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gateway["API gateway"]
  node_gateway_routing["Request routing"]
  node_gateway_filters["JWT filters"]
end

subgraph group_identity["Identity"]
  node_identity_registration["Registration"]
  node_identity_auth["Authentication"]
  node_identity_jwt["JWT handling"]
end

subgraph group_platform["Platform services"]
  node_eureka["Service discovery"]
  node_config["Central configuration"]
end

subgraph group_demo["Demo endpoint"]
  node_demo_endpoint["Test endpoint"]
end

node_client(("API client"))

node_client -->|"sends requests"| node_gateway_routing
node_gateway_routing -->|"applies filters"| node_gateway_filters
node_gateway_filters -->|"checks JWT"| node_identity_jwt
node_identity_registration -.->|"supports access"| node_identity_auth
node_identity_auth -->|"issues JWT"| node_identity_jwt
node_gateway_routing -.->|"routes test traffic"| node_demo_endpoint
node_eureka -->|"enables discovery"| node_gateway_routing
node_eureka -->|"enables discovery"| node_identity_auth

click node_gateway_routing "https://github.com/alexpeti/spring-boot-microservices/tree/main/api-gateway-service/src/main/java/com/example/apigatewayservice/routing"
click node_gateway_filters "https://github.com/alexpeti/spring-boot-microservices/tree/main/api-gateway-service/src/main/java/com/example/apigatewayservice/security"
click node_identity_registration "https://github.com/alexpeti/spring-boot-microservices/tree/main/identity-service/src/main/java/com/example/identityservice/auth"
click node_identity_auth "https://github.com/alexpeti/spring-boot-microservices/tree/main/identity-service/src/main/java/com/example/identityservice/auth"
click node_identity_jwt "https://github.com/alexpeti/spring-boot-microservices/tree/main/identity-service/src/main/java/com/example/identityservice/token"
click node_eureka "https://github.com/alexpeti/spring-boot-microservices/tree/main/eureka-naming-server/src/main/java/com/example/eurekanamingserver"
click node_config "https://github.com/alexpeti/spring-boot-microservices/tree/main/spring-cloud-config-server/src/main/java/com/example/springcloudconfigserver"
click node_demo_endpoint "https://github.com/alexpeti/spring-boot-microservices/tree/main/demo-controller-microservice/src/main/java/com/example/democontrollermicroservice/controllers"

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_routing,node_gateway_filters,node_client toneBlue
class node_identity_registration,node_identity_auth,node_identity_jwt toneAmber
class node_eureka,node_config toneMint
class node_demo_endpoint toneRose
```

## Components

### API gateway

- [Request routing](https://github.com/alexpeti/spring-boot-microservices/tree/main/api-gateway-service/src/main/java/com/example/apigatewayservice/routing): `api-gateway-service/src/main/java/com/example/apigatewayservice/routing`
- [JWT filters](https://github.com/alexpeti/spring-boot-microservices/tree/main/api-gateway-service/src/main/java/com/example/apigatewayservice/security): `api-gateway-service/src/main/java/com/example/apigatewayservice/security`

### Identity

- [Registration](https://github.com/alexpeti/spring-boot-microservices/tree/main/identity-service/src/main/java/com/example/identityservice/auth): `identity-service/src/main/java/com/example/identityservice/auth`
- [Authentication](https://github.com/alexpeti/spring-boot-microservices/tree/main/identity-service/src/main/java/com/example/identityservice/auth): `identity-service/src/main/java/com/example/identityservice/auth`
- [JWT handling](https://github.com/alexpeti/spring-boot-microservices/tree/main/identity-service/src/main/java/com/example/identityservice/token): `identity-service/src/main/java/com/example/identityservice/token`

### Platform services

- [Service discovery](https://github.com/alexpeti/spring-boot-microservices/tree/main/eureka-naming-server/src/main/java/com/example/eurekanamingserver): `eureka-naming-server/src/main/java/com/example/eurekanamingserver`
- [Central configuration](https://github.com/alexpeti/spring-boot-microservices/tree/main/spring-cloud-config-server/src/main/java/com/example/springcloudconfigserver): `spring-cloud-config-server/src/main/java/com/example/springcloudconfigserver`

### Demo endpoint

- [Test endpoint](https://github.com/alexpeti/spring-boot-microservices/tree/main/demo-controller-microservice/src/main/java/com/example/democontrollermicroservice/controllers): `demo-controller-microservice/src/main/java/com/example/democontrollermicroservice/controllers`

### Other components

- **API client**

## Connections

- API client → Request routing: sends requests (evidence: `README.md`)
- Request routing → JWT filters: applies filters (evidence: `README.md`)
- JWT filters → JWT handling: checks JWT (evidence: `README.md`)
- Registration → Authentication: supports access
- Authentication → JWT handling: issues JWT (evidence: `README.md`)
- Request routing → Test endpoint: routes test traffic
- Service discovery → Request routing: enables discovery (evidence: `README.md`)
- Service discovery → Authentication: enables discovery (evidence: `README.md`)
