# eltonriva1/customers-administration architecture

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

- Interactive diagram: https://gitdiagram.com/eltonriva1/customers-administration
- Repository: https://github.com/eltonriva1/customers-administration

## Overview

##### Project type and purpose
- This is a Spring Boot–based SOAP web‐service for “Customers Administration.”
- It exposes CRUD operations over SOAP (WSDL/XSD), backed by Spring Data JPA and a MySQL database.
- There is no front-end; it’s strictly a backend microservice exposing SOAP endpoints.

##### File structure
Top-level
- pom.xml, mvnw(.cmd), .mvn/… → Maven wrapper and build config
- docker-compose.yml → defines MySQL service (and potentially the service)
- SOAP/, files-xml/ → SOAP-UI project files and example request/response XML & XSD
- src/main/java/…/br/com/klayrocha → JAXB‐generated request/response/domain classes from XSD
- src/main/java/com/klayrocha/soap/webservices/customersadministration/…
– bean/Customer.java
– repository/CustomerRepository.java (Spring Data JPA)
– service/CustomerDetailService.java (business logic)
– soap/CustomerDetailEndpoint.java, WebServiceConfig.java (SOAP endpoints + config)
– soap/exception/CustomerNotFoundException.java
- src/main/resources/application.properties, customer-information.xsd
- src/test/java → unit/integration test scaffolding

##### README for additional insights
- Tech stack: Java 8, Spring Boot 2.7.9, Spring Data JPA, Hibernate, MySQL, Maven
- Deployment: configure JDBC URL + credentials, “mvn spring-boot:run,” HTTP on port 8080
- Future work: JWT auth, React/Angular front‐end, automated tests

##### Essential details to capture
- The XSD → JAXB generation step
- The layered separation: SOAP binding vs. business logic vs. persistence
- Any exception→fault mapping in the endpoint
- The Docker-Compose dependency on MySQL
- The Maven build process generating WAR/JAR and launching via Spring Boot

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Build and Orchestration
    subgraph "Build & Orchestration"
        MAVEN["Maven Build & Wrapper"]:::build
        DOCKER["Docker Compose"]:::infra
    end

    %% Contract and Code Generation
    subgraph "Contract & JAXB Generation"
        XSD["customer-information.xsd"]:::contract
        subgraph "JAXB Generated Classes"
            CD["CustomerDetail.java"]:::domain
            DCRQ["DeleteCustomerRequest.java"]:::domain
            DCRP["DeleteCustomerResponse.java"]:::domain
            GACRQ["GetAllCustomerDetailRequest.java"]:::domain
            GACRP["GetAllCustomerDetailResponse.java"]:::domain
            GCRQ["GetCustomerDetailRequest.java"]:::domain
            GCRP["GetCustomerDetailResponse.java"]:::domain
            ICRQ["InsertCustomerRequest.java"]:::domain
            ICRP["InsertCustomerResponse.java"]:::domain
            OF["ObjectFactory.java"]:::domain
            ST["Status.java"]:::domain
            PI["package-info.java"]:::domain
        end
    end

    %% Application Layers
    subgraph "Spring Boot Application"
        ENT["CustomersAdministrationApplication.java"]:::config

        subgraph "SOAP WS Layer"
            WS["WebServiceConfig.java"]:::config
            ENDPT["CustomerDetailEndpoint.java"]:::config
            EXC["CustomerNotFoundException.java"]:::config
        end

        subgraph "Business Layer"
            SVC["CustomerDetailService.java"]:::service
        end

        subgraph "Persistence Layer"
            REPO["CustomerRepository.java"]:::repo
            BEAN["Customer.java"]:::domain
        end

        APPPROP["application.properties"]:::config
    end

    %% External & Testing
    SOAPCLI["SOAP Client"]:::external
    TEST["Test Suite"]:::test
    DB["MySQL Database"]:::db

    %% Orchestration flows
    MAVEN -->|builds| ENT
    MAVEN -->|starts| DOCKER
    DOCKER -->|orchestrates| DB

    %% Contract to generation
    XSD -->|generates| CD
    XSD --> DCRQ
    XSD --> DCRP
    XSD --> GACRQ
    XSD --> GACRP
    XSD --> GCRQ
    XSD --> GCRP
    XSD --> ICRQ
    XSD --> ICRP
    XSD --> OF
    XSD --> ST
    XSD --> PI

    %% Client request flow
    SOAPCLI -->|HTTP/SOAP/XML| WS
    WS -->|invokes| ENDPT
    ENDPT -->|calls| SVC
    SVC -->|uses| REPO
    REPO -->|JDBC| DB

    %% Exception mapping
    EXC -.->|SOAP Fault| ENDPT

    %% Tests
    TEST -->|exercises| WS

    %% Click Events
    click MAVEN "https://github.com/eltonriva1/customers-administration/blob/main/pom.xml"
    click MAVEN "https://github.com/eltonriva1/customers-administration/tree/main/mvnw"
    click MAVEN "https://github.com/eltonriva1/customers-administration/blob/main/.mvn/wrapper/maven-wrapper.properties"
    click DOCKER "https://github.com/eltonriva1/customers-administration/blob/main/docker-compose.yml"
    click SOAPCLI "https://github.com/eltonriva1/customers-administration/blob/main/SOAP/Customers-soapui-project.xml"
    click SOAPCLI "https://github.com/eltonriva1/customers-administration/blob/main/files-xml/Request.xml"
    click SOAPCLI "https://github.com/eltonriva1/customers-administration/blob/main/files-xml/Response.xml"
    click XSD "https://github.com/eltonriva1/customers-administration/blob/main/src/main/resources/customer-information.xsd"
    click CD "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/CustomerDetail.java"
    click DCRQ "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/DeleteCustomerRequest.java"
    click DCRP "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/DeleteCustomerResponse.java"
    click GACRQ "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/GetAllCustomerDetailRequest.java"
    click GACRP "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/GetAllCustomerDetailResponse.java"
    click GCRQ "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/GetCustomerDetailRequest.java"
    click GCRP "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/GetCustomerDetailResponse.java"
    click ICRQ "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/InsertCustomerRequest.java"
    click ICRP "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/InsertCustomerResponse.java"
    click OF "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/ObjectFactory.java"
    click ST "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/Status.java"
    click PI "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/br/com/klayrocha/package-info.java"
    click ENT "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/com/klayrocha/soap/webservices/CustomersAdministrationApplication.java"
    click WS "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/com/klayrocha/soap/webservices/customersadministration/soap/WebServiceConfig.java"
    click ENDPT "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/com/klayrocha/soap/webservices/customersadministration/soap/CustomerDetailEndpoint.java"
    click SVC "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/com/klayrocha/soap/webservices/customersadministration/service/CustomerDetailService.java"
    click REPO "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/com/klayrocha/soap/webservices/customersadministration/repository/CustomerRepository.java"
    click BEAN "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/com/klayrocha/soap/webservices/customersadministration/bean/Customer.java"
    click EXC "https://github.com/eltonriva1/customers-administration/blob/main/src/main/java/com/klayrocha/soap/webservices/customersadministration/soap/exception/CustomerNotFoundException.java"
    click APPPROP "https://github.com/eltonriva1/customers-administration/blob/main/src/main/resources/application.properties"
    click TEST "https://github.com/eltonriva1/customers-administration/blob/main/src/test/java/com/klayrocha/soap/webservices/CustomersAdministrationApplicationTests.java"

    %% Styles
    classDef build fill:#e0e0e0,stroke:#333,stroke-width:1px
    classDef infra fill:#ffefc2,stroke:#333,stroke-width:1px
    classDef contract fill:#fff2cc,stroke:#333,stroke-width:1px
    classDef domain fill:#d9ead3,stroke:#333,stroke-width:1px
    classDef config fill:#cfe2f3,stroke:#333,stroke-width:1px
    classDef service fill:#d5a6bd,stroke:#333,stroke-width:1px
    classDef repo fill:#f4cccc,stroke:#333,stroke-width:1px
    classDef external fill:#c9daf8,stroke:#333,stroke-width:1px
    classDef test fill:#ead1dc,stroke:#333,stroke-width:1px
    classDef db fill:#b6d7a8,stroke:#333,stroke-width:1px
```
