Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShopSmart API

The ShopSmart API is a backend RESTful API built with Spring Boot, designed to power e-commerce platforms with seamless functionality.

This API enables essential e-commerce operations such as user management, product catalog browsing, order processing, and cart management.

With built-in security, session management, and admin controls, ShopSmart API provides a robust foundation for scaling and customizing e-commerce solutions.

Tech Stack

  • Java 17
  • Spring Boot
    • Spring Data JPA
    • Spring Web
    • Spring Security
    • Spring Data Redis
  • MySQL
  • Redis
  • Hibernate

Features

  • User Management: Registration, login, logout, and profile management.
  • Product Catalog: Browse products with pagination.
  • Order Management: Create, view, and delete orders.
  • Cart Management: Add, view, and modify items in the shopping cart.
  • Admin Functionalities: Admin-only access to manage users, products, and orders.
  • Session Management: Redis-based session management for scalable session handling

Installation

Prerequisites

  • Java 17
  • Maven
  • MySQL Database with a schema named ecommerce_db
  • Redis server running on localhost at port 6379

Setup

  1. Clone the repository:
   git clone https://github.com/jenojiji/ShopSmart-API.git
   cd ShopSmart-API
  1. Configure the Database:
    • Ensure MySQL is running on localhost with database name ecommerce_db, and set the username and password in application.properties:
   spring.datasource.url=jdbc:mysql://localhost:3306/ecommerce_db
   spring.datasource.username=root
   spring.datasource.password=root
  1. Install Dependencies:
mvn install
  1. Run the Application:
    • Start the application:
mvn spring-boot:run

API Reference

API Endpoints : USER

  GET /api/users/5
  PUT /api/users/5
   DELETE /api/users/5

API Endpoints : ORDER

  POST /api/orders
  GET /api/orders/user/8
  DELETE /api/orders/5

API Endpoints : PRODUCT

  GET /api/products?pageNo=1&pageSize=5
  GET /api/products/7

API Endpoints : AUTH

  POST /api/auth/login
  POST /api/auth/register
  POST /api/auth/logout

API Endpoints : ADMIN

  GET /api/admin/users
  GET /api/admin/orders
  POST /api/admin/products
  PUT /api/admin/products/6
  DELETE /api/admin/products/1
  GET /api/admin/products?pageNo=2&pageSize=12
  GET /api/admin/products/4

API Endpoints : CART

  POST /api/cart/add?userId=1&productId=1&quantity=2
  GET /api/cart?userId=1

About

The ShopSmart API is built with Spring Boot, Spring Security, MySQL, Redis, and Hibernate to provide a secure, scalable backend for managing users, products, orders, and carts.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages