# hyyena/maple-trend-be architecture

> Architecture diagram of the GitHub repository hyyena/maple-trend-be, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hyyena/maple-trend-be
- Repository: https://github.com/hyyena/maple-trend-be

## Overview

##### Project Type and Purpose
- This is clearly a backend system (BE) for Maple-Trend, built in Java with Gradle as the build tool. The modules indicate separation of concerns such as:
– app-maple-stamp-api: The API exposure layer (with controllers, services, configurations, and HTTP test files).
– maple-stamp-domain-mariadb: Contains domain entities and repository interfaces for interacting with a MariaDB database.
– nexon-open-api-core: Houses API client code, external API integrations (e.g., OcidApi, StarforceApi, etc.), and related DTOs and exception handling.
– common: Likely a shared module for utilities or common functions.
- The existence of Docker and GitHub Actions (workflows for build and docker) further emphasizes a modern, containerized deployment pipeline.

##### Analyzing the File Structure
- The directory names clearly separate the application into functional modules:
- “app-maple-stamp-api” contains the main entry point (AppMapleStampApiApplication.java), controller (StampController.java), and service layers (BasicService, StampService, etc.). There are also configuration files (ActuatorConfig.java, WebConfig.java) that indicate usage of monitoring and web configurations, common in Spring Boot applications.
- “maple-stamp-domain-mariadb” contains entity definitions (Stamp.java, BaseEntity.java) and repository interfaces (StampRepository.java), representing the persistence layer.
- “nexon-open-api-core” holds the API client implementations for various external services, including both request and response DTOs.
- The “common” module is set up similarly with its own Gradle settings, suggesting shared business logic or utilities.
- The presence of Gradle wrapper files and settings files in each module indicates these are independent Gradle subprojects that integrate into one overall build.
- The workflow files (.github/workflows) suggest CI/CD pipelines for building and dockerizing the application.

## Diagram (Mermaid)

```mermaid
flowchart TD
    F["Client/ExternalRequest"]:::client

    subgraph "API Layer (app-maple-stamp-api)"
        A1["StampController"]:::controller
        A2["Service Layer"]:::service
        A3["Configurations"]:::config
        A4["HTTP Tests"]:::service
    end

    subgraph "Domain/Persistence Layer (maple-stamp-domain-mariadb)"
        B1["Entities"]:::domain
        B2["Repository: StampRepository"]:::repository
    end

    subgraph "External API Integration (nexon-open-api-core)"
        C1["API Clients"]:::integration
        C2["API DTOs"]:::integration
        C3["API Exceptions"]:::integration
    end

    subgraph "Common Utilities"
        D["Common Utilities"]:::common
    end

    subgraph "Infrastructure"
        E1["Docker (Containerization)"]:::infrastructure
        E2["CI/CD Pipeline (GitHubActions)"]:::infrastructure
        E3["Gradle Build Scripts"]:::infrastructure
    end

    %% Connections
    F -->|"HTTP_Request"| A1
    A1 -->|"calls"| A2
    A4 -->|"tests"| A1

    A2 -->|"persists"| B2
    B2 -->|"uses"| B1

    A2 -->|"calls"| C1
    C1 -->|"responds"| A2

    A2 ---|"utilizes"| D

    A3 -->|"configures"| A1
    A1 -->|"deployed_in"| E1
    E2 -->|"build_deploy"| A2
    E3 -->|"build_config"| A2

    %% Click Events
    click A1 "https://github.com/hyyena/maple-trend-be/blob/develop/app-maple-stamp-api/src/main/java/com/mapletrend/appmaplestampapi/controller/StampController.java"
    click A2 "https://github.com/hyyena/maple-trend-be/tree/develop/app-maple-stamp-api/src/main/java/com/mapletrend/appmaplestampapi/service"
    click A3 "https://github.com/hyyena/maple-trend-be/tree/develop/app-maple-stamp-api/src/main/java/com/mapletrend/appmaplestampapi/config"
    click A4 "https://github.com/hyyena/maple-trend-be/blob/develop/app-maple-stamp-api/http/stamp.http"
    click B1 "https://github.com/hyyena/maple-trend-be/tree/develop/maple-stamp-domain-mariadb/src/main/java/com/mapletrend/maplestampdomainmariadb/entity"
    click B2 "https://github.com/hyyena/maple-trend-be/blob/develop/maple-stamp-domain-mariadb/src/main/java/com/mapletrend/maplestampdomainmariadb/repository/StampRepository.java"
    click C1 "https://github.com/hyyena/maple-trend-be/tree/develop/nexon-open-api-core/src/main/java/com/mapletrend/nexonopenapicore/api"
    click C2 "https://github.com/hyyena/maple-trend-be/tree/develop/nexon-open-api-core/src/main/java/com/mapletrend/nexonopenapicore/dto"
    click C3 "https://github.com/hyyena/maple-trend-be/tree/develop/nexon-open-api-core/src/main/java/com/mapletrend/nexonopenapicore/exception"
    click D "https://github.com/hyyena/maple-trend-be/tree/develop/common"
    click E1 "https://github.com/hyyena/maple-trend-be/tree/develop/app-maple-stamp-api/Dockerfile"
    click E2 "https://github.com/hyyena/maple-trend-be/tree/develop/.github/workflows"
    click E3 "https://github.com/hyyena/maple-trend-be/blob/develop/app-maple-stamp-api/build.gradle.kts"

    %% Styles
    classDef client fill:#FFE6AA,stroke:#D48B00,stroke-width:2px
    classDef controller fill:#FFCCCC,stroke:#CC0000,stroke-width:2px
    classDef service fill:#FFF0B3,stroke:#FF9900,stroke-width:2px
    classDef config fill:#E0FFFF,stroke:#009999,stroke-width:2px
    classDef domain fill:#CCFFCC,stroke:#00CC00,stroke-width:2px
    classDef repository fill:#B3FFB3,stroke:#009900,stroke-width:2px
    classDef integration fill:#F0E68C,stroke:#B8860B,stroke-width:2px
    classDef common fill:#E6E6FA,stroke:#8A2BE2,stroke-width:2px
    classDef infrastructure fill:#D3D3D3,stroke:#666666,stroke-width:2px
```
