# danielburgmann/fake-rabbit architecture

> Architecture diagram of the GitHub repository danielburgmann/fake-rabbit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danielburgmann/fake-rabbit
- Repository: https://github.com/danielburgmann/fake-rabbit

## Overview

##### Main Components

a) Application Core:
- Spring Boot Application (FakeRabbitApplication)
- Web Configuration (FakeRabbitWebConfig) with CORS support
- Controllers Layer (organize by feature):
- Index Controller
- Hello Controller
- Config Controller
- Build Info Controller
- Env Controller
- Log Controller
- OpenFeign Controller

b) External Integrations:
- GitHub API Integration (via OpenFeign)
- External Configuration Support
- Static Content Serving

c) Deployment Options:
- Docker Container
- Kubernetes Deployment
- Helm Charts

**[External Clients] → [Load Balancer/Ingress]**
- ↓
**[Web Layer (Controllers)] → [Service Layer]**
- ↓
**[External Services/APIs] ← [Integration Layer]**

##### Key Relationships

a) Internal Flow:
- Request handling path from controllers through services
- Template rendering for HTML endpoints
- Static resource serving
- Configuration management flow

b) External Interactions:
- CORS-enabled endpoints
- OpenFeign client connections
- External configuration loading
- Multiple port configurations

##### Implementation Details

Layer 1 - External Access:
**[Browser/Client] → [CORS Policy] → [HTTP Endpoints]**

Layer 2 - Core Components:
**[Controllers] → [Services] → [Domain Objects]**
- ↓
**[Templates] → [Static Resources]**

Layer 3 - External Integration:
**[OpenFeign Client] → [GitHub API]**
**[Config Service] → [External Properties]**

Layer 4 - Deployment:
**[Docker Container]**
- ↓
**[Kubernetes Pod] → [ConfigMap]**
- ↓
**[Helm Release]**

##### Additional Elements

- Version information
- Build/deployment flow
- Test coverage
- Monitoring points

Remember to:
- Keep the main application flow clear
- Major integration points
- Configuration management
- Demonstrate deployment options
- Development/testing specific features

## Diagram (Mermaid)

```mermaid
graph TB
    %% External Client Layer
    Client[Browser/Client]:::client

    %% Load Balancer Layer
    LB[Load Balancer/Ingress]:::infra

    %% Web Layer
    subgraph Controllers
        WebConfig["Web Configuration"]:::config
        IndexC["Index Controller"]:::controller
        HelloC["Hello Controller"]:::controller
        ConfigC["Config Controller"]:::controller
        BuildC["Build Info Controller"]:::controller
        EnvC["Env Controller"]:::controller
        LogC["Log Controller"]:::controller
        FeignC["OpenFeign Controller"]:::controller
    end

    %% Core Application
    MainApp["Fake Rabbit Application"]:::core

    %% Resources
    subgraph Resources
        Static["Static Content"]:::resource
        Templates["Templates"]:::resource
        AppProps["Application Properties"]:::config
    end

    %% External Integration
    subgraph Integration
        FeignConfig["Feign Configuration"]:::config
        GitHubAPI["GitHub API Client"]:::external
    end

    %% Deployment Options
    subgraph Deployment
        Docker["Docker Container"]:::deploy
        K8s["Kubernetes"]:::deploy
        Helm["Helm Charts"]:::deploy
        ExtConfig["External Configuration"]:::config
    end

    %% Relationships
    Client --> LB
    LB --> Controllers
    Controllers --> MainApp
    MainApp --> Resources
    MainApp --> Integration
    Integration --> GitHubAPI
    MainApp --> Deployment

    %% Click Events
    click WebConfig "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/java/de/db8/os/sample/fakerabbit/FakeRabbitWebConfig.java"
    click IndexC "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/java/de/db8/os/sample/fakerabbit/IndexController.java"
    click HelloC "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/java/de/db8/os/sample/fakerabbit/hello/HelloController.java"
    click ConfigC "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/java/de/db8/os/sample/fakerabbit/config/ConfigController.java"
    click BuildC "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/java/de/db8/os/sample/fakerabbit/buildinfo/BuildInfoController.java"
    click EnvC "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/java/de/db8/os/sample/fakerabbit/env/EnvController.java"
    click LogC "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/java/de/db8/os/sample/fakerabbit/log/LogController.java"
    click FeignC "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/java/de/db8/os/sample/fakerabbit/openfeign/FeignController.java"
    click MainApp "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/java/de/db8/os/sample/fakerabbit/FakeRabbitApplication.java"
    click Static "https://github.com/danielburgmann/fake-rabbit/tree/master/src/main/resources/static/"
    click Templates "https://github.com/danielburgmann/fake-rabbit/tree/master/src/main/resources/templates/"
    click AppProps "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/resources/application.properties"
    click FeignConfig "https://github.com/danielburgmann/fake-rabbit/blob/master/src/main/java/de/db8/os/sample/fakerabbit/openfeign/FeignConfiguration.java"
    click GitHubAPI "https://github.com/danielburgmann/fake-rabbit/tree/master/src/main/java/de/db8/os/sample/fakerabbit/openfeign/github/"
    click Docker "https://github.com/danielburgmann/fake-rabbit/tree/master/scenarios/docker/"
    click K8s "https://github.com/danielburgmann/fake-rabbit/tree/master/scenarios/kubernetes/"
    click Helm "https://github.com/danielburgmann/fake-rabbit/tree/master/scenarios/helm/fake-rabbit/"
    click ExtConfig "https://github.com/danielburgmann/fake-rabbit/tree/master/scenarios/external-config/"

    %% Styles
    classDef client fill:#f9f,stroke:#333,stroke-width:2px
    classDef infra fill:#gray,stroke:#333,stroke-width:2px
    classDef controller fill:#aaf,stroke:#333,stroke-width:2px
    classDef core fill:#55f,stroke:#333,stroke-width:2px
    classDef config fill:#fa0,stroke:#333,stroke-width:2px
    classDef resource fill:#5f5,stroke:#333,stroke-width:2px
    classDef external fill:#a5a,stroke:#333,stroke-width:2px
    classDef deploy fill:#999,stroke:#333,stroke-width:2px
```
