🏪 Ecommerce Shopping Application API ecommerce.BableshAAzad.com
- This project is a RESTful web service built using Java Spring Boot.
- It provides an API for e-commerce shopping applications.
- The project is based on an Ecommerce Shopping application prototype, implementing basic e-commerce functionalities.
📜 API Documentation:
- View API Postman requests and responses: ecommerce-shopping-app
- View frontEnd documentation ecommerce-shopping-app-ui
- View Store House Management System documentation store-house-management-system-api
🏠 Features:
- Login using Username and Password, providing an Access Token and Refresh Token (AT and RT).
- Login using OAuth2, supporting login with Google or GitHub.
For Customers:
- Search, filter, categorize products, view product information, and place orders.
- Manage the shopping cart, view added products, and proceed with orders.
- View past orders and download invoices.
For Sellers:
- Allow sellers to add, update, and delete products.
- Search warehouses based on proximity to your location to store products.
- View products and storage information by seller.
🧑💻 Technologies Used:
Spring Boot
Spring Security
RESTful API
MySQL
Spring Data JPA
OpenAPI Documentation
Validation
OpenPDF
Mail
OAuth2 Client
Google Guava
Hateoas
Cloudinary
WebFlux
💻 How To Use:
- You can directly access the service via https://ecommerce-shopping-app-bcsb.onrender.com.
- Refer to the API documentation for guidance on sending requests and handling responses: ecommerce-shopping-app.
- Pull the Docker image:
bableshaazad/storehousemanagementsystem
. - Refer to the API documentation for guidance on sending requests and handling responses: ecommerce-shopping-app.
- Set the necessary environment variables as shown below 👇.
- Download the master branch as a zip file.
- Import the project into your IDE and ensure JDK 21 is installed.
- Set the following environment variables 👇.
- Refer to the API documentation for guidance on sending requests and handling responses: ecommerce-shopping-app.
- For swagger documentation
http;//localhost:8081/swagger-ui.html
For Database: your DB info
DB_HOST_NAME
= localhostDB_NAME
= ecommerce-shopping-applicationDB_PASSWORD
= rootDB_PORT
= 3306DB_USERNAME
= root
For Storehouse-management-system app connection
CLIENT_API_KEY
= keyReceivedAtTheTimeOfRegistrationCLIENT_ID
= 1CLIENT_USERNAME
= aazad@bableshaazad.org
For Storing Images in Cloud using Cloudinary
CLOUDINARY_API_KEY
= 123YourKeyCLOUDINARY_API_SECRET
= abcdeYourPasswordCLOUDINARY_CLOUD_NAME
= abcdYourName
For GitHub OAuth2 Connection
GITHUB_ID
= 12345YourIDGITHUB_SECRET
= dummyKey12345
For Google OAuth2 Connection
GOOGLE_ID
= YourGoogleIDxyzGOOGLE_SECRET
= googleSecret
Your JWT Secret: Here I am using HS512 code generated at https://8gwifi.org/jwsgen.jsp
JWT_SECRET
= jwtSecret1234567890
For Sending Mail during Registration, Purchase Order, and Password Reset
MAIL_PASSWORD
= mailPasswordMAIL_USERNAME
= yourMail@gmail.com
-
Find Products:
Endpoint:
GET http://localhost:8080/products?page=0&size=1
Response:
{
"status": 200,
"message": "Inventories found",
"data": {
"links": [],
"content": [
{
"inventoryId": 1,
"productTitle": "Chair",
"lengthInMeters": 0.7,
"breadthInMeters": 0.8,
"heightInMeters": 0.8,
"weightInKg": 8,
"price": 300,
"description": "Chair for general use",
"productImage": "http://res.cloudinary.com/dpaf0bjfx/image/upload/c_fill,h_500,w_500/85010851-aafe-4d8e-9146-69e6b1b5c516",
"materialTypes": ["WOOD"],
"restockedAt": "2024-08-27",
"updatedInventoryAt": null,
"sellerId": 1,
"stocks": [
{
"stockId": 5,
"quantity": 10
}
],
"discount": 2,
"discountType": "NEW"
}
],
"page": {
"size": 1,
"totalElements": 12,
"totalPages": 12,
"number": 0
}
}
}
- For User Registration Endpoint
{
"email" : "bableshaazad@gmail.com",
"password" : "Test@123!"
}
{
"email" : "bableshaazad@gmail.com",
"otp" : "888549"
}
{
"username" : "bableshaazad",
"password" : "Test@123!"
}
{
"status": 200,
"message": "User Verified",
"data": {
"userId": 1,
"username": "bableshaazad",
"userRole": "CUSTOMER",
"accessExpiration": 3600,
"refreshExpiration": 1296000
}
}
- For more examples seen documentation ecommerce-shopping-app