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.
- Java 17
- Spring Boot
- Spring Data JPA
- Spring Web
- Spring Security
- Spring Data Redis
- MySQL
- Redis
- Hibernate
- 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
- Java 17
- Maven
- MySQL Database with a schema named ecommerce_db
- Redis server running on localhost at port 6379
- Clone the repository:
git clone https://github.com/jenojiji/ShopSmart-API.git
cd ShopSmart-API
- 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
- Install Dependencies:
mvn install
- Run the Application:
- Start the application:
mvn spring-boot:run
GET /api/users/5
PUT /api/users/5
DELETE /api/users/5
POST /api/orders
GET /api/orders/user/8
DELETE /api/orders/5
GET /api/products?pageNo=1&pageSize=5
GET /api/products/7
POST /api/auth/login
POST /api/auth/register
POST /api/auth/logout
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
POST /api/cart/add?userId=1&productId=1&quantity=2
GET /api/cart?userId=1