# codecentric/spring-boot-admin architecture

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

- Interactive diagram: https://gitdiagram.com/codecentric/spring-boot-admin
- Repository: https://github.com/codecentric/spring-boot-admin

## Overview

##### Main Components

a) Server Components (spring-boot-admin-server):
- Instance Registry & Management
- Event Store (Hazelcast/In-Memory)
- Notification System
- Web Interface
- Security Layer

b) Client Components (spring-boot-admin-client):
- Registration Management
- Actuator Endpoints
- Metadata Contributors

c) UI Components (spring-boot-admin-server-ui):
- Frontend Application
- REST API Consumers
- Monitoring Views

##### Relationships and Interactions

- Client → Server: Registration and heartbeat
- Server → Client: Actuator endpoint polling
- UI → Server: REST API calls
- Server → External Services: Notifications (Email, Slack, etc.)

##### Specific Implementation Details

Key architectural patterns:
- Event-sourcing pattern for instance state
- Reactive endpoints support
- Service discovery integration
- Multi-instance clustering capability

**┌─────────────────────────────────────────────────────┐**
- External Services                   │
- (Notification targets, Service Discovery)        │
- ┘
- ▲

**┌─────────────────────────────────────────────────────┐**
- Spring Boot Admin Server               │
- ┬─────────────────┬────────────────┤
- Instance       │   Event         │  Notification   │
- Registry       │   Store         │  System         │
- ┼─────────────────┼────────────────┤
- Security       │   Web           │  Actuator       │
- Layer          │   Interface     │  Proxy          │
- ┴─────────────────┴────────────────┘
- ▲

**┌─────────────────────────────────────────────────────┐**
- Spring Boot Admin Client               │
- ┬─────────────────┬────────────────┤
- Registration   │   Metadata      │  Actuator       │
- Management     │   Contributors  │  Endpoints      │
- ┴─────────────────┴────────────────┘

##### Additional Elements

Important aspects:
- Version compatibility matrix
- Supported Spring Boot versions
- Integration points with service discovery systems
- Security configurations
- Clustering capabilities

##### Notes

Annotations for:
- Scalability options
- Security considerations
- Configuration requirements
- Integration points

Remember to include the project's core purpose: monitoring and managing Spring Boot applications through actuator endpoints, with emphasis on the admin UI's role in visualizing and interacting with the monitored applications.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef server fill:#b3d1ff,stroke:#333,stroke-width:2px
    classDef client fill:#90EE90,stroke:#333,stroke-width:2px
    classDef ui fill:#FFB366,stroke:#333,stroke-width:2px
    classDef external fill:#E0E0E0,stroke:#333,stroke-width:2px

    %% External Services Layer
    subgraph ExternalServices
        ES1[Email Services]:::external
        ES2[Slack]:::external
        ES3[Service Discovery]:::external
    end

    %% Server Layer
    subgraph ServerComponents
        IR["Instance Registry & Management"]:::server
        ES["Event Store"]:::server
        NS["Notification System"]:::server
        WI["Web Interface"]:::server
        SL["Security Layer"]:::server
        AP["Actuator Proxy"]:::server
        RAC["REST API Consumers"]:::server
    end

    %% Client Layer
    subgraph ClientComponents
        RM["Registration Management"]:::client
        MC["Metadata Contributors"]:::client
        AE["Actuator Endpoints"]:::client
    end

    %% UI Layer
    subgraph UIComponents
        FA["Frontend Application"]:::ui
        MV["Monitoring Views"]:::ui
    end

    %% Relationships
    ClientComponents --> ServerComponents
    ServerComponents --> ExternalServices
    UIComponents --> ServerComponents
    ES1 & ES2 & ES3 --> ServerComponents

    %% Click Events
    click IR "https://github.com/codecentric/spring-boot-admin/blob/master/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/InstanceRegistry.java"
    click ES "https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/eventstore/"
    click NS "https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/"
    click WI "https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/web/"
    click SL "https://github.com/codecentric/spring-boot-admin/blob/master/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/config/AdminServerWebConfiguration.java"
    click RM "https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-client/src/main/java/de/codecentric/boot/admin/client/registration/"
    click MC "https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-client/src/main/java/de/codecentric/boot/admin/client/registration/metadata/"
    click FA "https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-server-ui/src/main/frontend/"
    click MV "https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-server-ui/src/main/frontend/views/instances/"
    click RAC "https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/web/client/"

    %% Legend
    subgraph Legend
        L1["Server Components"]:::server
        L2["Client Components"]:::client
        L3["UI Components"]:::ui
        L4["External Services"]:::external
    end
```
