# camof1ow/symmetrical-umbrella architecture

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

- Interactive diagram: https://gitdiagram.com/camof1ow/symmetrical-umbrella
- Repository: https://github.com/camof1ow/symmetrical-umbrella

## Overview

##### High-Level Components

a) Core Application Components:
- Name Generator Service
- Independence Movement Activist Service
- Like Service
- Repair Service
- Rate Limiting System

b) External Interfaces:
- REST API Controllers
- External API Clients (Feign)

c) Security & Performance:
- Rate Limiting System
- XSS Prevention
- Security Configuration

##### Detailed Component Breakdown

**Client Layer**

**API Gateway Layer (Rate Limiting)**

**Controller Layer**

**Service Layer**

**Repository Layer**

**Database Layer**

##### Component Relationships

a) Client Interactions:
- How external requests flow through the rate limiter
- Security checks and XSS prevention
- API endpoints for different features

b) Service Interactions:
- Name generation flow
- Activist search process
- Like system operation
- Repair request handling

##### Specific Implementation Details

Technical elements:

**Rate Limiting System**
- IpBasedRateLimiter
- RateLimitInterceptor
- Dynamic Throttling Configuration

**Security Layer**
- XSS Prevention
- Security Config
- Exception Handling

**Core Services**
- Name Generator
- Name Conversion
- Hanja Processing
- Activist Service
- Search
- Image Management
- Like Service
- Repair Service

##### Data Flow Visualization

- → for synchronous calls
- ⇢ for asynchronous operations
- ⇄ for two-way communication

##### Technology Stack Indicators

- Spring Boot 3.3.2
- Java 21
- MySQL
- Spring Security
- Spring Cloud
- Feign Client

##### Infrastructure Components

Include:
- Load Balancer
- Database
- External API connections
- File storage for images

##### Additional Elements

Include:
- Version information
- System boundaries
- Error handling paths
- Rate limiting thresholds

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        CL[Client Application]
    end

    subgraph Gateway
        LB[Load Balancer]
        RL["Rate Limiting System"]:::security
        XSS["XSS Prevention"]:::security
    end

    subgraph Controllers
        NC["Name Controller"]
        AC["Activist Controller"]
        LC["Like Controller"]
        RC["Repair Controller"]
    end

    subgraph Services
        NGS["Name Generator Service"]:::core
        IAS["Independence Movement Activist Service"]:::core
        LS["Like Service"]:::core
        RS["Repair Service"]:::core
    end

    subgraph External
        EAC["External API Client"]
        APC["Activist API Client"]:::external
    end

    subgraph Security
        SC["Security Configuration"]:::security
        TC["Throttling Configuration"]:::security
    end

    subgraph Infrastructure
        DB[(Database)]
        FS[("File Storage")]
    end

    subgraph ErrorHandling
        EH["Exception Handler"]:::error
    end

    %% Relationships
    CL --> LB
    LB --> RL
    RL --> XSS
    XSS --> NC & AC & LC & RC

    NC --> NGS
    AC --> IAS
    LC --> LS
    RC --> RS

    IAS --> APC
    APC --> EAC

    NGS & IAS & LS & RS --> DB
    IAS --> FS

    %% Error Handling
    NC & AC & LC & RC --> EH

    %% Security Config
    SC --> NC & AC & LC & RC
    TC --> RL

    %% Styling
    classDef core fill:#blue
    classDef security fill:#green
    classDef external fill:#yellow
    classDef error fill:#red
    classDef infrastructure fill:#gray

    %% Click Events
    click NGS "https://github.com/Camof1ow/symmetrical-umbrella/tree/master/src/main/java/com/example/japanesenamegenerator/nameGenerator/"
    click IAS "https://github.com/Camof1ow/symmetrical-umbrella/tree/master/src/main/java/com/example/japanesenamegenerator/independence/"
    click LS "https://github.com/Camof1ow/symmetrical-umbrella/tree/master/src/main/java/com/example/japanesenamegenerator/likes/"
    click RS "https://github.com/Camof1ow/symmetrical-umbrella/tree/master/src/main/java/com/example/japanesenamegenerator/repair/"
    click RL "https://github.com/Camof1ow/symmetrical-umbrella/tree/master/src/main/java/com/example/japanesenamegenerator/common/ratelimit/"
    click XSS "https://github.com/Camof1ow/symmetrical-umbrella/tree/master/src/main/java/com/example/japanesenamegenerator/config/xss/"
    click SC "https://github.com/Camof1ow/symmetrical-umbrella/blob/master/src/main/java/com/example/japanesenamegenerator/config/SecurityConfig.java"
    click EAC "https://github.com/Camof1ow/symmetrical-umbrella/blob/master/src/main/java/com/example/japanesenamegenerator/config/FeignConfig.java"
    click APC "https://github.com/Camof1ow/symmetrical-umbrella/blob/master/src/main/java/com/example/japanesenamegenerator/independence/client/ActivistClient.java"
    click EH "https://github.com/Camof1ow/symmetrical-umbrella/blob/master/src/main/java/com/example/japanesenamegenerator/common/advisor/DefaultExceptionHandler.java"
    click TC "https://github.com/Camof1ow/symmetrical-umbrella/blob/master/src/main/java/com/example/japanesenamegenerator/config/ThrottlingConfig.java"
```
