Simple Online Shopping System
Simple Online Shopping System
This project is based on Online Shopping App using Java, Spring, Spring Boot,
MySQL. There are 6 model classes in the project User, Customer, Address, Product,
Cart and Order. The main goal of this project is to create a series of backend API’s so
that the user can access the functionalities of the various types of functions of the
models just like the functionalities one can get while shopping from any online
website.
Abstract:
The Online Shopping System is an integrated web-based application designed to
provide complete solutions for both vendors and customers. Here are the key points:
1. Goal and Objectives:
o Goal: To create an efficient system for handling customer orders, inventory
management, and secure transactions.
o Objectives: Streamline shopping processes, enhance user experience, and provide a
seamless platform for buying products online.
2. System Components:
o Inventory Management: Tracks available products, categories, and other relevant
details.
o Order Processing: Manages customer orders, maintains order history, and facilitates
secure payments.
o User Interface: Provides an intuitive and user-friendly interface for browsing
products, adding them to the cart, and checking out.
3. Software Requirements:
o Front-End Frameworks: Choose from technologies like Angular, Back-End
Services: Develop backend services using Java (Spring Boot
o Database: Select an appropriate database system such as MySQL
o Security: Implement secure authentication and encryption for user privacy.
1. Java
2. MySQL
3. Spring
4. Spring Boot
Tools:
To register as a user:
http://localhost:8088/regisrtration
To login as a user:
http://localhost:8088/login
http://localhost:8088/newproducts
To get customer
http://localhost:8088/{customerId}
http://localhost:8088/Cart/addtocart/{id}/{custId}
http://localhost:8088/getAll
Swagger UI
Request used for each endpoint:
Registration(adding user):
"UserId":101,
"name": "Sai",
"mobile":"7896158490",
"password": "sai@123",
“role”: “Customer”
Login :
"mobileNo":"7896158490",
"password": "sai@123"
Adding Product:
"productName":"SamsungGalaxy",
"price": 1000,
"quantity":1,
"manufacturer":"Samsung",
"category":"MOBILES"
Adding Address:
"streetNo":"101",
"buildingName":"SuryaEnclave",
"city":"hyderabad",
"country":"india",
"state":"Telangana",
"pincode":500010
Adding Customer:
"firstName":"Sai",
"lastName":"Surya",
"mobileNumber":"7896158490",
"email":"[email protected]",
"addressList":[{
"streetNo":"101",
"buildingName":"SuryaEnclave",
"city":"hyderabad",
"country":"india",
"state":"Telangana",
"pincode":500010
}]
System Configuration: -
use project;
create table address (address_id integer not null, building_name varchar(255) not null, city
varchar(255) not null, country varchar(255) not null, pincode varchar(255), state varchar(255) not
null, street_no varchar(255) not null, primary key (address_id)) engine=InnoDB
create table current_user_session (id integer not null, user_id integer, time datetime(6), unique_id
varchar(255), primary key (id)) engine=InnoDB
create table customer (customer_id integer not null, email varchar(255), first_name varchar(255)
not null, last_name varchar(255) not null, mobile_number varchar(255) not null, primary key
(customer_id)) engine=InnoDB
create table my_order (orderid integer not null, localdtetime datetime(6), orderstatus varchar(255),
address_address_id integer, customer_customer_id integer, primary key (orderid)) engine=InnoDB
create table products (product_id integer not null, category varchar(255), color varchar(255),
dimension varchar(255), manufacturer varchar(255) not null, price double precision not null,
product_name varchar(255) not null, quantity integer, specification varchar(255), primary key
(product_id)) engine=InnoDB
create table user (user_id integer not null, mobile varchar(255) not null, name varchar(255) not null,
password varchar(255) not null, primary key (user_id)) engine=InnoDB