N11 TalentHub E-Commerce Platform — Microservices Architecture
About Project
This is my final project for the N11 TalentHub Java & React Bootcamp - a fully functional e-commerce application built with a microservices architecture, demonstrating enterprise-level software development practices end to end.
The system is composed of 4 independent Spring Boot microservices - Auth, Product, Cart, and Order - each owning its own PostgreSQL schema, validating JWT tokens independently via a shared secret, exposing its own Swagger UI, and running in its own Docker container. A React (Vite + Tailwind CSS) frontend consumes all four services through an NGINX reverse proxy that also handles routing and static file serving.
The Auth Service handles registration, login, and JWT lifecycle management, issuing short-lived access tokens (15 minutes) alongside longer-lived refresh tokens (7 days), using HS512 signing. Security is fully stateless: no session storage, BCrypt password hashing, role-based authorization (ROLE_USER / ROLE_ADMIN), and CORS locked down to the frontend origin only - with every service capable of validating a token independently, without calling back to the Auth Service.
The Product Service manages the catalog with full CRUD, pagination, search, and category filtering. The Cart Service is backed by Redis for high-speed reads and writes, extracting user identity directly from the JWT rather than requiring a userId parameter. The Order Service manages the full order lifecycle (PENDING → PAID → SHIPPED → DELIVERED, with a CANCELLED branch) and integrates the Iyzico payment gateway (sandbox) - initiating payment, then updating order status via a webhook callback once payment completes.
Every service returns a consistent response envelope ({success, message, data, timestamp}) and documents itself via Swagger/OpenAPI 3, so any endpoint can be tested directly from the browser after authorizing with a Bearer token.
The entire stack is containerized with a multi-stage Dockerfile per backend service (Maven build stage, then a slim JRE runtime image) and orchestrated locally with a single docker-compose up -d. A GitHub Actions CI pipeline builds and tests both backend and frontend on every push and pull request; a separate CD pipeline builds and pushes Docker images to GitHub Container Registry on every merge to main.
On the frontend, React Context handles global state (AuthContext for the JWT and user info, CartContext for cart state), React Router drives client-side navigation across public, authenticated, and admin-only routes, and a dedicated Axios instance per service automatically attaches the JWT to every outgoing request via an interceptor.
Testing spans unit tests (JUnit 5 + Mockito) for each service's business logic, integration tests using Spring Boot Test with TestContainers for a real PostgreSQL instance, and frontend tests with Vitest.
What sets this project apart from a typical bootcamp e-commerce clone is the deliberate choice of microservices over a monolith, Redis for cart performance rather than a plain database table, Swagger documentation on every single service rather than just the main API, a full GitHub Actions CI/CD pipeline rather than manual deployment, multi-stage Docker builds, and fully stateless JWT security rather than session-based auth.
