How arnaud1404/luminashare works
• Main Components:
• Frontend: Located in the "frontend" folder, built with Node.js (using Vue components like App.vue, Gallery.vue, etc.). This part handles user interactions through a web interface.
• Backend: A Spring Boot application (Java 17 with Maven) found under the "backend" directory. It exposes REST APIs through controllers (e.g., ImageController, FileController) and implements business logic via services and DAOs.
• Database: PostgreSQL, as indicated by the README prerequisites and environment variables. The backend interacts with the database (e.g., via ImageRepository) to store image metadata and possibly binary data.
• Image Processing Modules: The backend includes packages for imageProcessing (e.g., ColorProcessing, Convolution, GrayLevelProcessing) that indicate a modular design for handling photo analysis and transformations.
• File Handling: A separate module within the backend for managing files (handled by controllers and associated classes).
• Relationships and Data Flow:
• Users interact with the Frontend, which sends HTTP API calls to the Backend.
• The Backend processes these calls, invoking image processing when necessary and interacting with PostgreSQL to store/retrieve image data.
• Optionally, external image sources (e.g. picsum.photos for test images) can be shown as an external dependency from which image data can be fetched.
• Docker Compose is used to orchestrate these services in deployment.
• Architectural Patterns & Guidelines:
• Separation of concerns between the UI (frontend), API and business logic (backend), and data (database).
• Important modules inside the backend (controllers, services, DAOs, file handling & image processing) to clearly convey the responsibilities.
flowchart TD
direction LR
FE[Frontend
(Vue, Node.js)]:::frontend
BE[Backend API
(Spring Boot, Java 17)]:::backend
DB[Database
(PostgreSQL)]:::database
end
%% External Services and Components Module inside Backend
direction TB
IC[ImageController]:::controller
FC[FileController]:::controller
IS[ImageService]:::service
IDAO[ImageDao / DAO]:::dao
IP[Image Processing
end
%% User and External Image Service
USER[User]:::user
EXT[External Image Service
(picsum.photos)]:::external
%% Connections between User and Frontend
USER -->|HTTP Request/API Call| FE
%% Frontend communicates with Backend API
FE -->|REST API Calls
(upload, retrieve, process images)| BE
%% Backend API is composed of various modules
BE --> IC
BE --> FC
BE --> IS
BE --> IDAO
BE --> IP
%% Backend interacts with database
BE -->|JDBC / ORM| DB
%% Frontend might fetch demo images from external service
FE -->|Optional Fetch| EXT
%% Styling Classes
classDef frontend fill:#cce5ff,stroke:#339aff,stroke-width:2px;
classDef backend fill:#d4edda,stroke:#28a745,stroke-width:2px;
classDef database fill:#fff3cd,stroke:#ffc107,stroke-width:2px;
classDef controller fill:#f8d7da,stroke:#dc3545,stroke-width:1px;
classDef service fill:#e2e3e5,stroke:#6c757d,stroke-width:1px;
classDef dao fill:#d1ecf1,stroke:#0c5460,stroke-width:1px;
classDef processing fill:#ffeeba,stroke:#fd7e14,stroke-width:1px;
classDef user fill:#f0f9ff,stroke:#007bff,stroke-width:2px;
classDef external fill:#e2f0cb,stroke:#8bc34a,stroke-width:2px;
A deployment boundary (Docker Compose) encompassing the frontend, backend, and database.
2. Detailed backend modules (controllers, service, DAO, and image processing) that are critical for image-centric business logic.
Interaction flows
• Users initiate requests to the Frontend.
• Frontend communicates via RESTful API calls to the Backend.
• The Backend handles business logic, interacts with internal modules, and connects to PostgreSQL.
• Optionally, the Frontend fetches test images from an external image service.