# sartrebrasil/storage-library architecture

> Architecture diagram of the GitHub repository sartrebrasil/storage-library, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sartrebrasil/storage-library
- Repository: https://github.com/sartrebrasil/storage-library

## Overview

storage-lib is a Java object-storage abstraction with a shared API and provider adapters. The documented workflow is an application calling that API to upload, read, list, copy, or delete objects through a chosen backend; multipart streaming and Spring integrations extend that use. The graph retains the documented cloud, filesystem, and SFTP backends and the testkit. Source excerpts were not provided, so relationships are based on the README; implementation-level call paths cannot be verified.

Main entry points: [`storage-core/src/main/java/com/example/storage/ObjectStorage.java`](https://github.com/sartrebrasil/storage-library/blob/main/storage-core/src/main/java/com/example/storage/ObjectStorage.java) (Object API), [`storage-aws/src/main/java/com/example/storage/aws/S3ObjectStorage.java`](https://github.com/sartrebrasil/storage-library/blob/main/storage-aws/src/main/java/com/example/storage/aws/S3ObjectStorage.java) (AWS S3), [`storage-gcp/src/main/java/com/example/storage/gcp/GcsObjectStorage.java`](https://github.com/sartrebrasil/storage-library/blob/main/storage-gcp/src/main/java/com/example/storage/gcp/GcsObjectStorage.java) (Google Cloud), [`storage-azure/src/main/java/com/example/storage/azure/AzureBlobObjectStorage.java`](https://github.com/sartrebrasil/storage-library/blob/main/storage-azure/src/main/java/com/example/storage/azure/AzureBlobObjectStorage.java) (Azure Blob)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Storage API"]
  node_object_api["Object API<br/>[ObjectStorage.java]"]
  node_multipart["Multipart Stream"]
end

subgraph group_adapters["Storage Adapters"]
  node_s3["AWS S3"]
  node_gcs["Google Cloud"]
  node_azure["Azure Blob"]
  node_oci["OCI Storage"]
  node_filesystem["Local Filesystem"]
  node_sftp["SFTP Storage"]
end

subgraph group_spring["Spring Integration"]
  node_spring_starter["Boot Starter"]
  node_web_download["MVC Downloads"]
end

subgraph group_support["Developer Support"]
  node_testkit["Storage Testkit"]
end

node_application(("Application"))
node_aws_service[("S3 Service")]
node_gcs_service[("GCS Service")]
node_azure_service[("Azure Service")]
node_oci_service[("OCI Service")]
node_local_disk[("Local Disk")]
node_sftp_server[("SFTP Server")]

node_application -->|"calls"| node_object_api
node_application -->|"streams upload"| node_multipart
node_object_api -->|"uses adapter"| node_s3
node_object_api -->|"uses adapter"| node_gcs
node_object_api -->|"uses adapter"| node_azure
node_object_api -->|"uses adapter"| node_oci
node_object_api -->|"uses adapter"| node_filesystem
node_object_api -->|"uses adapter"| node_sftp
node_s3 -->|"stores objects"| node_aws_service
node_gcs -->|"stores objects"| node_gcs_service
node_azure -->|"stores objects"| node_azure_service
node_oci -->|"stores objects"| node_oci_service
node_filesystem -->|"stores objects"| node_local_disk
node_sftp -->|"stores objects"| node_sftp_server
node_application -->|"configures storage"| node_spring_starter
node_application -->|"serves downloads"| node_web_download
node_application -->|"tests implementations"| node_testkit

click node_object_api "https://github.com/sartrebrasil/storage-library/blob/main/storage-core/src/main/java/com/example/storage/ObjectStorage.java"
click node_multipart "https://github.com/sartrebrasil/storage-library/blob/main/storage-core/src/main/java/com/example/storage/MultipartOutputStream.java"
click node_s3 "https://github.com/sartrebrasil/storage-library/blob/main/storage-aws/src/main/java/com/example/storage/aws/S3ObjectStorage.java"
click node_gcs "https://github.com/sartrebrasil/storage-library/blob/main/storage-gcp/src/main/java/com/example/storage/gcp/GcsObjectStorage.java"
click node_azure "https://github.com/sartrebrasil/storage-library/blob/main/storage-azure/src/main/java/com/example/storage/azure/AzureBlobObjectStorage.java"
click node_oci "https://github.com/sartrebrasil/storage-library/blob/main/storage-oci/src/main/java/com/example/storage/oci/OciObjectStorage.java"
click node_filesystem "https://github.com/sartrebrasil/storage-library/blob/main/storage-filesystem/src/main/java/com/example/storage/filesystem/FileSystemObjectStorage.java"
click node_sftp "https://github.com/sartrebrasil/storage-library/blob/main/storage-sftp/src/main/java/com/example/storage/sftp/SftpObjectStorage.java"
click node_spring_starter "https://github.com/sartrebrasil/storage-library/blob/main/storage-spring-boot-starter/src/main/java/com/example/storage/spring/StorageAutoConfiguration.java"
click node_web_download "https://github.com/sartrebrasil/storage-library/blob/main/storage-spring-web/src/main/java/com/example/storage/web/ObjectResponses.java"
click node_testkit "https://github.com/sartrebrasil/storage-library/blob/main/storage-testkit/src/main/java/com/example/storage/memory/InMemoryObjectStorage.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_object_api,node_multipart toneBlue
class node_s3,node_gcs,node_azure,node_oci,node_filesystem,node_sftp,node_aws_service,node_gcs_service,node_azure_service,node_oci_service,node_local_disk,node_sftp_server toneAmber
class node_spring_starter,node_web_download toneMint
class node_testkit toneRose
class node_application toneIndigo
```

## Components

### Storage API

- [Object API](https://github.com/sartrebrasil/storage-library/blob/main/storage-core/src/main/java/com/example/storage/ObjectStorage.java): `storage-core/src/main/java/com/example/storage/ObjectStorage.java`
- [Multipart Stream](https://github.com/sartrebrasil/storage-library/blob/main/storage-core/src/main/java/com/example/storage/MultipartOutputStream.java): `storage-core/src/main/java/com/example/storage/MultipartOutputStream.java`

### Storage Adapters

- [AWS S3](https://github.com/sartrebrasil/storage-library/blob/main/storage-aws/src/main/java/com/example/storage/aws/S3ObjectStorage.java): `storage-aws/src/main/java/com/example/storage/aws/S3ObjectStorage.java`
- [Google Cloud](https://github.com/sartrebrasil/storage-library/blob/main/storage-gcp/src/main/java/com/example/storage/gcp/GcsObjectStorage.java): `storage-gcp/src/main/java/com/example/storage/gcp/GcsObjectStorage.java`
- [Azure Blob](https://github.com/sartrebrasil/storage-library/blob/main/storage-azure/src/main/java/com/example/storage/azure/AzureBlobObjectStorage.java): `storage-azure/src/main/java/com/example/storage/azure/AzureBlobObjectStorage.java`
- [OCI Storage](https://github.com/sartrebrasil/storage-library/blob/main/storage-oci/src/main/java/com/example/storage/oci/OciObjectStorage.java): `storage-oci/src/main/java/com/example/storage/oci/OciObjectStorage.java`
- [Local Filesystem](https://github.com/sartrebrasil/storage-library/blob/main/storage-filesystem/src/main/java/com/example/storage/filesystem/FileSystemObjectStorage.java): `storage-filesystem/src/main/java/com/example/storage/filesystem/FileSystemObjectStorage.java`
- [SFTP Storage](https://github.com/sartrebrasil/storage-library/blob/main/storage-sftp/src/main/java/com/example/storage/sftp/SftpObjectStorage.java): `storage-sftp/src/main/java/com/example/storage/sftp/SftpObjectStorage.java`

### Spring Integration

- [Boot Starter](https://github.com/sartrebrasil/storage-library/blob/main/storage-spring-boot-starter/src/main/java/com/example/storage/spring/StorageAutoConfiguration.java): `storage-spring-boot-starter/src/main/java/com/example/storage/spring/StorageAutoConfiguration.java`
- [MVC Downloads](https://github.com/sartrebrasil/storage-library/blob/main/storage-spring-web/src/main/java/com/example/storage/web/ObjectResponses.java): `storage-spring-web/src/main/java/com/example/storage/web/ObjectResponses.java`

### Developer Support

- [Storage Testkit](https://github.com/sartrebrasil/storage-library/blob/main/storage-testkit/src/main/java/com/example/storage/memory/InMemoryObjectStorage.java): `storage-testkit/src/main/java/com/example/storage/memory/InMemoryObjectStorage.java`

### Other components

- **Application**
- **S3 Service**
- **GCS Service**
- **Azure Service**
- **OCI Service**
- **Local Disk**
- **SFTP Server**

## Connections

- Application → Object API: calls (evidence: `README.md`)
- Application → Multipart Stream: streams upload (evidence: `README.md`)
- Object API → AWS S3: uses adapter (evidence: `README.md`)
- Object API → Google Cloud: uses adapter (evidence: `README.md`)
- Object API → Azure Blob: uses adapter (evidence: `README.md`)
- Object API → OCI Storage: uses adapter (evidence: `README.md`)
- Object API → Local Filesystem: uses adapter (evidence: `README.md`)
- Object API → SFTP Storage: uses adapter (evidence: `README.md`)
- AWS S3 → S3 Service: stores objects (evidence: `README.md`)
- Google Cloud → GCS Service: stores objects (evidence: `README.md`)
- Azure Blob → Azure Service: stores objects (evidence: `README.md`)
- OCI Storage → OCI Service: stores objects (evidence: `README.md`)
- Local Filesystem → Local Disk: stores objects (evidence: `README.md`)
- SFTP Storage → SFTP Server: stores objects (evidence: `README.md`)
- Application → Boot Starter: configures storage (evidence: `README.md`)
- Application → MVC Downloads: serves downloads (evidence: `README.md`)
- Application → Storage Testkit: tests implementations (evidence: `README.md`)
