# ashokitschool/microservices_zero_to_hero architecture

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

- Interactive diagram: https://gitdiagram.com/ashokitschool/microservices_zero_to_hero
- Repository: https://github.com/ashokitschool/microservices_zero_to_hero

## Overview

This repository is a small Spring Cloud microservices example: a gateway fronts a greeting service, which calls a welcome service; supporting services provide discovery, administration, and centralized configuration. The source excerpts show the greeting-to-welcome call and gateway request validation. Gateway routing, service registration, and configuration-client/server wiring are not shown, so those links are marked unverified.

Main entry points: [`06_API_Gateway/src/main/java/in/ashokit/Application.java`](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/06_API_Gateway/src/main/java/in/ashokit/Application.java) (API gateway), [`05_Greet_Service/src/main/java/in/ashokit/controller/GreetRestController.java`](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/05_Greet_Service/src/main/java/in/ashokit/controller/GreetRestController.java) (Greet endpoint), [`04_Welcome_Service/src/main/java/in/ashokit/controller/WelcomeRestController.java`](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/04_Welcome_Service/src/main/java/in/ashokit/controller/WelcomeRestController.java) (Welcome endpoint), [`05_Greet_Service/src/main/java/in/ashokit/client/WelcomeFeignClient.java`](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/05_Greet_Service/src/main/java/in/ashokit/client/WelcomeFeignClient.java) (Welcome client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_edge["Request edge"]
  node_gateway["API gateway<br/>[Application.java]"]
  node_gateway_filter["Request filter<br/>[MyFilter.java]"]
end

subgraph group_services["Application services"]
  node_greet["Greet endpoint"]
  node_welcome_client["Welcome client"]
  node_welcome["Welcome endpoint"]
end

subgraph group_platform["Cloud platform"]
  node_registry[("Service registry<br/>[Application.java]")]
  node_admin["Admin server<br/>[Application.java]"]
end

subgraph group_configuration["Configuration"]
  node_config_server["Config server<br/>[Application.java]"]
  node_config_client["Config client"]
end

node_caller(("API caller"))

node_caller -.->|"sends request"| node_gateway
node_gateway -.->|"filters requests"| node_gateway_filter
node_gateway -.->|"routes request"| node_greet
node_greet -->|"calls client"| node_welcome_client
node_welcome_client -->|"requests message"| node_welcome
node_welcome -.->|"returns message"| node_welcome_client
node_gateway -.->|"uses discovery"| node_registry
node_greet -.->|"registers service"| node_registry
node_welcome -.->|"registers service"| node_registry
node_config_client -.->|"loads settings"| node_config_server

click node_gateway "https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/06_API_Gateway/src/main/java/in/ashokit/Application.java"
click node_gateway_filter "https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/06_API_Gateway/src/main/java/in/ashokit/filter/MyFilter.java"
click node_greet "https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/05_Greet_Service/src/main/java/in/ashokit/controller/GreetRestController.java"
click node_welcome_client "https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/05_Greet_Service/src/main/java/in/ashokit/client/WelcomeFeignClient.java"
click node_welcome "https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/04_Welcome_Service/src/main/java/in/ashokit/controller/WelcomeRestController.java"
click node_registry "https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/01_Service_Registry/src/main/java/in/ashokit/Application.java"
click node_admin "https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/02_Admin_Server/src/main/java/in/ashokit/Application.java"
click node_config_server "https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/07_Cloud_Config_Server/src/main/java/in/ashokit/Application.java"
click node_config_client "https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/08_Cloud_Config_Client/src/main/java/in/ashokit/rest/MsgRestController.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_filter toneBlue
class node_greet,node_welcome_client,node_welcome toneAmber
class node_registry,node_admin,node_caller toneMint
class node_config_server,node_config_client toneRose
```

## Components

### Request edge

- [API gateway](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/06_API_Gateway/src/main/java/in/ashokit/Application.java): `06_API_Gateway/src/main/java/in/ashokit/Application.java`
- [Request filter](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/06_API_Gateway/src/main/java/in/ashokit/filter/MyFilter.java): `06_API_Gateway/src/main/java/in/ashokit/filter/MyFilter.java`

### Application services

- [Greet endpoint](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/05_Greet_Service/src/main/java/in/ashokit/controller/GreetRestController.java): `05_Greet_Service/src/main/java/in/ashokit/controller/GreetRestController.java`
- [Welcome client](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/05_Greet_Service/src/main/java/in/ashokit/client/WelcomeFeignClient.java): `05_Greet_Service/src/main/java/in/ashokit/client/WelcomeFeignClient.java`
- [Welcome endpoint](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/04_Welcome_Service/src/main/java/in/ashokit/controller/WelcomeRestController.java): `04_Welcome_Service/src/main/java/in/ashokit/controller/WelcomeRestController.java`

### Cloud platform

- [Service registry](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/01_Service_Registry/src/main/java/in/ashokit/Application.java): `01_Service_Registry/src/main/java/in/ashokit/Application.java`
- [Admin server](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/02_Admin_Server/src/main/java/in/ashokit/Application.java): `02_Admin_Server/src/main/java/in/ashokit/Application.java`

### Configuration

- [Config server](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/07_Cloud_Config_Server/src/main/java/in/ashokit/Application.java): `07_Cloud_Config_Server/src/main/java/in/ashokit/Application.java`
- [Config client](https://github.com/ashokitschool/microservices_zero_to_hero/blob/main/08_Cloud_Config_Client/src/main/java/in/ashokit/rest/MsgRestController.java): `08_Cloud_Config_Client/src/main/java/in/ashokit/rest/MsgRestController.java`

### Other components

- **API caller**

## Connections

- API caller → API gateway: sends request
- API gateway → Request filter: filters requests
- API gateway → Greet endpoint: routes request
- Greet endpoint → Welcome client: calls client (evidence: `05_Greet_Service/src/main/java/in/ashokit/controller/GreetRestController.java`)
- Welcome client → Welcome endpoint: requests message (evidence: `05_Greet_Service/src/main/java/in/ashokit/client/WelcomeFeignClient.java`)
- Welcome endpoint → Welcome client: returns message
- API gateway → Service registry: uses discovery
- Greet endpoint → Service registry: registers service
- Welcome endpoint → Service registry: registers service
- Config client → Config server: loads settings
