An open API service indexing awesome lists of open source software.

https://github.com/sk2k19/springboot_ecom_web_app

A backend-focused web application built with Spring Boot, REST APIs, and integrated with MySQL, MongoDB, Redis, Elasticsearch, Kafka, Docker, and Kubernetes โ€” showcasing my ability to design scalable, production-ready systems aligned with modern industry practices.
https://github.com/sk2k19/springboot_ecom_web_app

docker elasticsearch kafka kubernetes mongodb mysql-database postman redis restful-api spring-boot

Last synced: 3 months ago
JSON representation

A backend-focused web application built with Spring Boot, REST APIs, and integrated with MySQL, MongoDB, Redis, Elasticsearch, Kafka, Docker, and Kubernetes โ€” showcasing my ability to design scalable, production-ready systems aligned with modern industry practices.

Awesome Lists containing this project

README

          

# ๐Ÿ›๏ธ Product Management APIs using Spring Boot + FakeStore API

![Java](https://img.shields.io/badge/Java-17-blue)
![Spring Boot](https://img.shields.io/badge/Spring--Boot-3.x-brightgreen)
![Build](https://img.shields.io/badge/build-passing-success)
![REST](https://img.shields.io/badge/API-RESTful-orange)
![License](https://img.shields.io/badge/license-MIT-blue)

> ๐Ÿ”จ A production-style Product API backend built with Spring Boot, integrated with **FakeStore API** and enhanced by **custom exception handling**, global error responses, and clean architecture.

---

## ๐Ÿ“˜ Overview

This project showcases a fully functional Product Management API built with `Spring Boot`. It integrates with the public [FakeStore API](https://fakestoreapi.com/) to perform real-world operations like create, read, and update products.

It focuses on writing **scalable**, **clean**, and **debug-friendly code** using best backend practices.

---

## ๐Ÿš€ Features

โœ… Create Product
โœ… Get All Products
โœ… Update Product by ID (PATCH)
โœ… Custom Exception Classes for clarity
โœ… Global Exception Handling with `@ControllerAdvice`
โœ… External API Integration using `RestTemplate`
โœ… Clean and modular service-layer architecture
โœ… Debug-friendly logs and response messages

---

## ๐Ÿ“‚ API Endpoints

| Method | Endpoint | Description |
|--------|----------|-------------|
| `POST` | `/products` | Create a new product |
| `GET` | `/products` | Fetch all products |
| `PATCH` | `/products/{id}` | Update product by ID |

---

## ๐Ÿ“ฆ Tech Stack

| Tech | Purpose |
|-------------|--------------------------------------|
| **Java 17** | Core programming language |
| **Spring Boot 3.x** | Backend framework |
| **RestTemplate** | External API consumption |
| **Lombok** | Reducing boilerplate code |
| **Maven** | Project management & dependencies |
| **ControllerAdvice** | Global error handling |
| **Custom Exceptions** | Specific error responses |

---

## ๐Ÿ›ก๏ธ Error Handling & Debugging

- โœ… Global exception handler using `@RestControllerAdvice`
- โœ… Custom exceptions like `InvalidProductIdException` for clarity
- โœ… All errors return clean, consistent **JSON responses**
- โœ… Helps with debugging and API client feedback

### ๐Ÿงช Sample Error Response:

```json
{
"timestamp": "2025-04-12T12:34:56.789",
"status": 404,
"error": "Product Not Found",
"message": "Product with ID 15 does not exist",
"path": "/products/15"
}