Problem and solution
Problem
An e-commerce platform must coordinate customer, seller, and administrator workflows across orders, inventory, payments, and support.
Solution
A Spring Boot REST API with JWT access control, a Next.js frontend, real-time seller chat, and multiple payment workflows.
Technical approach
- Customer, seller, and administrator role workflows
- Product variants, stock, cart, and order tracking
- WebSocket chat, notifications, and payment webhooks
Implementation details
A RESTful e-commerce API built with Spring Boot 3.3.2 and Java 21. It supports customer, seller, and administrator roles through JWT authentication and role-based access control. Core commerce workflows include shopping carts, order management and tracking, products and variants, and inventory. Sellers can apply for an account, create a shop, manage products, variants, stock, and orders, review sales dashboards and statistics, and support customers through chat. A WebSocket chat system using STOMP provides file and image sharing and real-time notifications. Payment integration supports credit and debit cards, PromptPay, TrueMoney, Rabbit LINE Pay, cash on delivery, PayPal, and Stripe through the Omise payment gateway, with payment webhooks and refunds. Customers can register, sign in, browse products and variants, manage carts and wishlists, track orders, choose among payment methods, review and rate products, and chat with sellers. Administrators manage users, products, shops, orders, payments, categories, and system statistics. The backend uses Java 21, Spring Boot 3.3.2, Spring Security, Spring Data JPA, PostgreSQL 15, JWT, Spring WebSocket, Lombok, and Maven. The frontend uses Next.js 14, TypeScript, Tailwind CSS, React 18, Zustand, and Axios. The system also supports product variants, multiple payment gateways, file and image management, reviews and ratings, and Docker.
