Σχεδιασμός και υλοποίηση ασφαλούς συστήματος ηλεκτρονικού εμπορίου (e-shop) με Spring Boot και JWT
Design and implementation of a secure e-commerce system using Spring Boot and JWT

View/ Open
Keywords
E-Commerce ; 2FA ; Viva Wallet ; JWT ; OAuth2 ; TOTP ; Next.jsAbstract
This thesis presents the design and implementation of a complete e-commerce system (N21). The central theme is system security, implemented through multiple complementary authentication and authorization mechanisms.
Spring Boot 4.0.3 with Java 17 was selected for backend development, while the frontend was built with Next.js 16.2, React 19, and TypeScript 5. PostgreSQL is used as the database management system with schema migrations managed via Flyway. Product images are stored and delivered via Cloudinary CDN, and the entire infrastructure runs on Hetzner Cloud VPS.
The security layer implements: (a) JSON Web Tokens (JWT) stored in HttpOnly cookies for both customer and administrator authentication, (b) OAuth2 via Google for third-party sign-in, (c) TOTP-based Two-Factor Authentication (2FA) for administrator accounts, (d) rate limiting via Bucket4j to prevent brute-force attacks, and (e) CSRF protection via SameSite cookies.
Functionally, the system provides a full product catalog, shopping cart for both guest and registered users with cart merging on login, order completion integrated with the Viva Wallet Smart Checkout v2 payment gateway, transactional email notifications via Zoho Mail SMTP and marketing newsletters via Brevo, full-text search via PostgreSQL tsvectors, a wishlist feature, order tracking number management with automated customer notifications, and a comprehensive admin panel.
The results confirm that it is feasible to build a modern, secure, and fully functional e-commerce platform using open-source technologies, with security features comparable to commercial solutions.


