Skip to content

sravnigithub/ecommerce-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛒 E-Commerce Backend Application (Spring Boot) 📌 Project Overview

This project is a backend E-commerce application developed using Spring Boot and RESTful APIs. It provides CRUD (Create, Read, Update, Delete) operations for managing products and uses Spring Data JPA with Hibernate for database interaction.

The application is designed following a layered architecture and uses the H2 in-memory database for development and testing purposes.

🚀 Technologies Used

Java 17

Spring Boot

Spring Web (REST APIs)

Spring Data JPA

Hibernate

H2 In-Memory Database

Lombok

Jakarta Validation

Postman (for API testing)

🏗️ Project Architecture Controller → Service → Repository → Database

Controller: Handles HTTP requests and responses

Service: Contains business logic

Repository: Communicates with the database using JPA

Entity: Represents database tables

📦 Entity Details Item Entity

Each product in the system is represented by the Item entity with the following attributes:

Field Description id Auto-generated primary key productId Unique business identifier name Product name description Product description price Product price

Validation constraints ensure data integrity at both API and database levels.

🔧 Database Configuration

Uses H2 in-memory database

Database schema is auto-generated by Hibernate

No manual SQL scripts required

H2 Console http://localhost:8080/h2-console

(Default JDBC URL and credentials can be found in application.properties)

🔄 API Functionality

The application supports:

Add a new product

Fetch all products

Fetch product by ID

Update product details

Delete product

All APIs follow REST principles and exchange data in JSON format.

🧪 API Testing

APIs tested using Postman

Request and response data exchanged in JSON

Validation errors handled gracefully

Convert into microservices architecture

Integrate frontend (React / Angular)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages