You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Un e-commerce RESTful completo costruito con Spring Boot 3.x, con autenticazione, gestione prodotti, carrello e ordini.
📋 Panoramica
E-Shop è un'applicazione backend REST completa che gestisce un intero flusso e-commerce: dalla registrazione utente alla creazione di ordini, passando per la gestione del catalogo e del carrello. Include anche un'interfaccia frontend in HTML/CSS/JS per testare e utilizzare l'applicazione direttamente dal browser.
🛠️ Tech Stack
Livello
Tecnologia
Versione
Runtime
Java
21
Framework
Spring Boot 3.x
3.4.1
Data Access
Spring Data JPA
—
Database
PostgreSQL
16 (Docker)
Sicurezza
Spring Security
JWT + Role-based
Validazione
Jakarta Validation
Bean Validation 3.0
Testing
Testcontainers
1.21.4 + JUnit 5
Build
Maven
3.x
Frontend
HTML5 / CSS3 / Vanilla JS
—
🏗️ Architettura
L'applicazione segue l'architettura a layer tipica di Spring Boot:
Security by layer: Spring Security (JWT stateless + BCrypt + role-based
@PreAuthorize), RateLimitFilter su login/register (sliding window in-memory),
CORS per il frontend.
📊 Entity Relationship
User 1:1 Cart 1:N CartItem
User 1:N Order 1:N OrderItem, 1:1 OrderPayment (per ordine pagato)
User 1:N PhoneNumber, 1:N Address
Articles 1:N CartItem, OrderItem
Category (gerarchia parent) ↔ Articles
Entity
Campi Principali
User
id, username, email, password (BCrypt), role (USER/ADMIN)
✅ Immagini articoli — più immagini per articolo (tabella article_images), servite su /images/articles/**, con miniatura hover e lightbox navigabile nella scheda dettaglio
🖼️ Crediti immagini (frontend mockup) — le immagini prodotto di questo progetto sono state generate con
txt2mock_batchgen, altro mio progetto di generazione massiva di immagini mockup via ComfyUI API:
un LLM converte le righe della tabella articles in prompt English (items.json), e lo script trasforma il file in un batch di PNG (workflow Z-Image Turbo). Le immagini generate risiedono in data/article-images/ e sono associate agli articoli.
🧪 Testing
Suite rebuild completata il 2026-08-17 (vedi REBUILD_PLAN.md per dettagli e note tecniche):
302/302 test verdi con mvn test (serve Docker per Testcontainers PostgreSQL 16).
E-Shop is a full-stack e-commerce REST API built with Java 21 and Spring Boot 3.4.1. It implements a complete shopping flow — from user registration to order placement and payment — backed by PostgreSQL 16.