This is a simple e-commerce website implemented using the Spring Boot
framework in Java, by a group of five members, namely Spring Spartans
. This group project is assigned under Information Processing for Web
in 5th semester of BTech (IT), University of Calcutta
Link to the website - https://shopkart-e-commerce-website.onrender.com
Customer Management
- Login, Sign Up, View & Update ProfileProduct Catalog
- Display of products, Search by name, Filter by categoryShopping Cart
- Add products to cart, Increase & decrease quantityOrder Management*
- Place orders from cart, Buy again, Cancel orders, Detailed order list & summaryAdmin Dashboard
- Login (with a security key), Sales insight through analytics, Add or update products, View customers, Update orders
* This project is purely made for educational purpose and not meant to be deployed for commercial production. It assumes that payments are made instantly on placing orders as this project is not integrated with a payment gateway.
Endpoint | View Rendered |
---|---|
/ |
Login page for customer |
/signup |
Sign-up page for customer |
/update |
Form to update customer profile |
/product |
Product Catalogue |
/product/category/{category} |
Filter products by category |
/product/search?prefix={prefix} |
Search results for products by name |
/product/{id} |
Product details |
/cartitem/cart |
Customer's cart |
/order/history |
Customer's order history/list |
/order/summary/{id} |
Summary of order placed |
/admin |
Login page for Admin |
/admin/dashboard |
Admin Dashboard |
Before you begin, ensure that you have met the following requirements:
- Java Development Kit (JDK): Download from Oracle's official website or use OpenJDK.
- Maven: Download from Maven's official website.
- MySQL: Download from MySQL's official website.
- IDE: An Integrated Development Environment (IDE) such as
IntelliJ IDEA
orEclipse IDE
. - STS Plugin (If you're using Eclipse): Install STS Plugin.
To clone the repository, follow these steps:
-
Open your terminal (Command Prompt, PowerShell, or any terminal emulator).
-
Navigate to the directory where you want to clone the project.
-
Run the following command:
git clone https://github.com/Swarnotaj003/ShopKart-E-commerce-Website.git
-
Navigate into the project directory:
cd ShopKart-E-commerce-Website
-
Configure Database Connection Settings: Open the
application.properties
file & update the database connection settings.# Database connection settings spring.datasource.url=jdbc:mysql://${DATASOURCE_HOST}:${DATASOURCE_PORT}/${DATASOURCE_DB_NAME} spring.datasource.username=${DATASOURCE_USER} spring.datasource.password=${DATASOURCE_PASSWORD}
Replace the environment variables with the corresponding credentials of your MySQL connection*.
-
Setup your Project Path: Open the
application.properties
file & update the project path.# Settings for uploading files spring.servlet.multipart.enabled=true file.project-path=${PROJECT_PATH} file.image-path=uploads
Replace the environment variable with the our own path to the project folder*.
* You may create a
.env
file to store the values of these environment variables, which should be updated toRun configurations
before executing the project.
The Maven Wrapper allows you to run Maven commands without needing to install Maven on your machine. Follow these steps to run the Spring Boot application using the Maven Wrapper:
-
Open your terminal: Make sure you have your terminal (Command Prompt, PowerShell, or any terminal emulator) open.
-
Navigate to the project directory: If you are not already in the project directory, use the
cd
command to navigate to it. For example:cd path/to/your/ShopKart-E-commerce-Website
-
Run the application using the Maven Wrapper: Use the following command to build and start the application:
./mvnw spring-boot:run
On Windows, use:
mvnw spring-boot:run
-
Wait for the application to start. You should see output in the terminal indicating that the application is running, along with the port number (default is 8080).
-
Once the application starts, open your web browser and navigate to:
http://localhost:8080
You can also run the Spring Boot application directly from your IDE. Follow these steps based on your preferred IDE:
-
Launch the IDE & import the project.
-
Locate the main application class named
ShopkartApplication.java
in thesrc/main/java
directory.- Right-click on the main class file and select
Run As
>Spring Boot Application
.
- Right-click on the main class file and select
-
Once the application starts, open your web browser and navigate to:
http://localhost:8080