Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 3f6f275

Browse files
authored
Add architecture section and diagram to README
Added architecture section with a detailed diagram illustrating the system components and their interactions.
1 parent 03a3da5 commit 3f6f275

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ This project is a powerful and secure steganography tool built with Spring Boot
1010

1111
- [What is Steganography?](#what-is-steganography)
1212
- [Features](#features)
13+
- [Architecture](#architecture)
14+
- [Demo](#demo)
1315
- [Docker Hub](#docker-hub)
1416
- [How It Works](#how-it-works)
1517
- [Encoding Process](#encoding-process)
@@ -50,6 +52,80 @@ Steganography is the practice of concealing a message or file within another fil
5052
- **Robust Error Handling**: A global exception handler provides detailed, structured error responses (`ProblemDetail`) for API clients.
5153
- **Traceability**: A `CorrelationIdFilter` adds a unique trace ID to every request for improved logging and debugging.
5254

55+
## Architecture
56+
57+
```mermaid
58+
graph TD
59+
subgraph "User / Client"
60+
User[<fa:fa-user> User/API Client]
61+
end
62+
63+
subgraph "DevOps & CI/CD Pipeline"
64+
GH_Repo[<fa:fa-github> GitHub Repo] -->|Push to master<br>New Release| GH_Actions[<fa:fa-cogs> GitHub Actions<br>Build, Test, & Publish]
65+
GH_Actions -->|Publishes Image| DockerHub[<fa:fa-docker> Docker Hub<br>noobdevsam/spring-project-steganography-tool]
66+
end
67+
68+
subgraph "Spring Boot Application (Docker Container)"
69+
subgraph "Request Entry Point"
70+
Filter[<fa:fa-filter> CorrelationIdFilter<br><i>Adds Trace ID</i>] --> Controller
71+
Controller[<fa:fa-server> StegoController<br><i>REST API Endpoints</i>]
72+
ExceptionHandler[<fa:fa-shield-alt> GlobalExceptionHandler<br><i>Formats Error Responses</i>]
73+
Controller -- Catches Exceptions --> ExceptionHandler
74+
end
75+
76+
subgraph "Core Business Logic"
77+
Service[<fa:fa-concierge-bell> SteganographyService<br><i>Orchestrates Workflows</i>]
78+
end
79+
80+
subgraph "Utility Services"
81+
CapacitySvc[<fa:fa-calculator> CapacityUtilService<br><i>Estimates required space</i>]
82+
AesSvc[<fa:fa-lock> AesUtilService<br><i>PBKDF2 Key Derivation, AES Encryption</i>]
83+
LsbSvc[<fa:fa-magic> LsbUtilService<br><i>Hides data in image pixels</i>]
84+
LargeFileSvc[<fa:fa-file-import> LargeFileEncryptionService<br><i>Handles large file streams</i>]
85+
end
86+
87+
subgraph "Data & Storage Layer"
88+
Repo[<fa:fa-book> StegoDataRepository<br><i>JPA interface to DB</i>]
89+
StorageSvc[<fa:fa-folder-open> StorageService<br><i>Manages file system I/O</i>]
90+
end
91+
92+
subgraph "Background Processing"
93+
CleanupTask[<fa:fa-trash-alt> OrphanCleanupTask<br><i>Scheduled Job</i>]
94+
end
95+
end
96+
97+
subgraph "External Systems"
98+
DB[(<fa:fa-database> MySQL Database<br><i>Stores encoding metadata</i>)]
99+
FS[/<fa:fa-hdd> File System<br><i>Docker Volume for stego-images</i>/]
100+
end
101+
102+
%% --- FLOWS ---
103+
User -- "1. POST /encode (Image, Data, Password)" --> Filter
104+
Controller -->|2. Calls| Service
105+
106+
Service -->|3. Early check| CapacitySvc
107+
Service -->|4. Encrypts data| AesSvc
108+
Service -- "4a. (For large files)" --> LargeFileSvc
109+
Service -->|5. Embeds encrypted data| LsbSvc
110+
Service -->|6. Saves stego-image| StorageSvc
111+
Service -->|7. Saves metadata| Repo
112+
113+
Repo -->|JPA| DB
114+
StorageSvc -->|Writes/Reads| FS
115+
CleanupTask -->|Deletes old files| StorageSvc
116+
CleanupTask -->|Checks DB references| Repo
117+
118+
style User fill:#D5E8D4,stroke:#82B366
119+
style GH_Repo fill:#f5f5f5,stroke:#333
120+
style DockerHub fill:#DAE8FC,stroke:#6C8EBF
121+
style DB fill:#DAE8FC,stroke:#6C8EBF
122+
style FS fill:#DAE8FC,stroke:#6C8EBF
123+
```
124+
125+
## Demo
126+
127+
[![Watch the demo video](https://img.youtube.com/vi/TEHwmlSL3ag/0.jpg)](https://youtu.be/TEHwmlSL3ag)
128+
53129
## Docker Hub
54130

55131
The official Docker image for this project is available on Docker Hub. You can pull it directly to run the application without building it from the source.

0 commit comments

Comments
 (0)