Project Documentation
Project Documentation
Project Report
On
MCA–I
SEM–I
CERTIFICATE
Examiner 1 Examiner 2
Date:
Place: Pune
DECLARATION
I certify that the work contained in this report is original and has
been done by me under the guidance of my guide.
The work has not been submitted to any other Institute for any degree
or diploma.
I have followed the guidelines provided by the Institute in preparing
the report.
I have conformed to the norms and guidelines given in the Ethical
Code of Conduct of the Institute.
Whenever I have used materials (data, theoretical analysis,
figures, and text) from other sources, I have given
due credit to them by citing them in the text of the report
and giving their details in the references.
It is very difficult task to acknowledge all those who have been of tremendous
help in this project. I would like to thank my respected guide Dr. Ramesh
Jadhav for providing me necessary facilities to complete my project and also for
support.
Thank You
Yours Sincerely,
1.1 Abstract
Existing System:
In existing system following are key point:
Limited Accessibility: Traditional stores and physical suppliers often have
limited geographical reach. Customers may need to travel long distances to
access a diverse range of car accessories, which can be time-consuming and
costly.
1.Hardware Requirements
Processor: AMD Ryzen 3
RAM: 4GB
HDD: 256GB
2. Software Requirements:
Operating System: Windows 10
Database: MySQL
Front End: JSP , SEVELET, SpringBoot , Bootstrap
Server Side Script: JAVA, Tomcat
Software Development Tool : Java 11 , Intellij idea
Client-side requirement
1.Hardware Requirements:
Processor AMD Ryzen 3
RAM: 4GB
2.Software Requirements:
Operating System : Windows 10
Browser : Crome , Brave
1.5 Brief Description of Technology Used JAVA:
Java is one of the most popular and widely used programming language
and platform. A platform is an environment that helps to develop and run pro-
grams written in any programming language. Java is fast, reliable and secure.
From desktop to web applications, scientific supercomputers to gaming
consoles, cell phones to the Internet, Java is used in every nook and corner. Java
is a programming language and computing platform first released by Sun
Microsystems in 1995. There are lots of applications and websites that will not
work unless you have Java installed, and more are created every day. Java is
fast, secure, and reliable. From laptops to datacenters, game consoles to
scientific supercomputers, cell phones to the Internet, Java is everywhere! Java
is a general-purpose, concurrent, object-oriented, classbased, and the run- time
environment (JRE) which consists of JVM which is the cornerstone of the Java
platform. This blog on what is Java will clear all your doubts about why to learn
java, features and how it works.
JDK:
The Java Development Kit (JDK) is an implementation of either one of
the Java Platform, Standard Edition, Java Platform, Enterprise Edition, or Java
Platform, Micro Edition platforms released by Oracle Corporation in the form
of a binary product aimed at Java developers on Solaris, Linux, macOS or
Windows. The JDK includes a private JVM and a few other resources to finish
the development of a Java Application. Since the introduction of the Java
platform, it has been by far the most widely used Software Development Kit
(SDK). On 17 November 2006, Sun announced that they would release it under
the GNU General Public License (GPL), thus making it free software. This
happened in large part on 8 May 2007, when Sun contributed the source code to
the OpenJDK.
2. PROPOSED SYSTEM
Proposed System:
Key Components of the Proposed System:
Search and Filter Functionality: Users can search for specific car
accessory by name, size, length, diameter, category, or material.
Advanced filtering options will enable users to refine their searches based
on criteria like price range, brand, and specifications.
Order Management: Registered users can track their order status and
history. They will receive email notifications at various stages of the
order processing, from order confirmation to shipment tracking.
User Reviews and Ratings: Customers can leave reviews and ratings for
products they have purchased, helping others make informed decisions.
Technical Feasibility
Java: Java is a mature and widely used programming language kn
own for its portability, scalability, and robustness. Leveraging Jav
a as the core programming language for the e-commerce site ensur
es platform independence, allowing it to run on various operating
systems.
JSP (Java Server Pages) and Servlets: JSP and Servlets are funda
mental components of the Java EE (Enterprise Edition) stack, spec
ializing in dynamic web page creation and handling user interactio
ns. They enable the development of responsive and interactive we
b interfaces, making them suitable for building an e-commerce sit
e with rich features.
Economic Feasibility
Cost Analysis: The economic feasibility analysis begins with
a comprehensive cost assessment. This includes the initial develo
pment costs, which involve hiring skilled Java developers, web de
signers, and database administrators to build and launch the platfo
rm. Additionally, ongoing operational costs such as hosting, maint
enance, and marketing expenses need to be factored in.
Operational Feasibility
User-Friendly Interface: The operational feasibility of our e-comm
erce site begins with its user-friendly interface. The Java, JSP, Servlet, an
d Hibernate technologies allow for the creation of an intuitive and respon
sive website, making it easy for users to navigate, search for products, an
d complete transactions. This user-friendliness ensures that both tech-sav
vy and non-technical users can interact with the platform comfortably.
Admin :
The administrator is the master user of this application
Responsibility of admin includes:
Admin:
3.6 Sequence Diagram :
3.6 Table Design :
Table:
The given below table is a snapshot of backend view of the localhost and the
structures of the tables present in Car Acessories Ecomerce. The tables present
are Login, customer, bill , meter , tax
Product Details
Field name Data Type constraint Description
Category
Field name Data Type constraint Description
Order
Field name Data Type constraint Description
order_id BIGINT Primary key order id
delivery_date DATETIME Not Null Delivery date
description VARCHAR(255) Not Null description
grand_total FLOAT Not Null Grand total
is_deleted BIT(1) Not Null Is deleted
order_date VARCHAR(255) Not Null Order date
order_status VARCHAR(255) Not Null Order status
payment_method VARCHAR(255) Not Null Payment
method
shipping_method VARCHAR(255) Not Null Shipping
method
shipping_total FLOAT foreign key Shipping total
sub_total FLOAT Not Null Sub total
tax_rate FLOAT Not Null Tax rate
tax_total FLOAT Not Null Tax total
customer_id BIGINT Primary key customer id
Product
Field name Data Type constraint Description
Product_id BIGINT Primary key Product id
code DATETIME Not Null Code
cost_price FLOAT Not Null Cost price
description VARCHAR(255) Not Null description
image1 VARCHAR(255) Not Null image1
Image2 VARCHAR(255) Not Null Image2
Image3 VARCHAR(255) Not Null Image3
is_active BIT(1) Not Null Is active
is_deleted BIT(1) Not Null Is deleted
name FLOAT Not Null name
our_price FLOAT Not Null Our price
sale_price FLOAT Not Null Sale price
stock_qty Int Not Null Stock qty
customer_id BIGINT Primary key customer id
Shopping cart
Field name Data Type constraint Description
Quotation
Field name Data Type constraint Description
Quote_id BIGINT Primary key Quote id
Name VARCHAR(255) Not Null name
company VARCHAR(255) Not Null company
Contact INT Foreign key contact
Tool_name VARCHAR(255) Not Null Tool name
Description VARCHAR(255) Not Null Description
Price FLOAT Not Null Price
Date DATETIME Not Null Date
3.10 Sample Input and Output Screens :
Frontend:
4 : CODING Sample Code :
import javax.validation.Valid;
import nazeem.autoparts.library.model.Category;
import nazeem.autoparts.library.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Controller
@RequestMapping("/category")
public class CategoryController {
@Autowired
private CategoryService categoryService;
private String add_edit_template="/category/add-edit-category";
private String list_template="/category/list-category";
private String list_redirect="redirect:/category/list";
@GetMapping("/add")
public String addCategory(Category category, Model model){
model.addAttribute("category", category);
return add_edit_template;
}
@GetMapping("/edit/{id}")
public String editCategory(@PathVariable("id") int id, Model model){
Category category = categoryService.get(id); model.addAttribute("category",
category);
return add_edit_template;
}
@PostMapping("/save")
public String saveCategory(@Valid @ModelAttribute("category") Category
category, BindingResult result, Model model){
model.addAttribute("category", category);
if(result.hasErrors()){
return add_edit_template;
}
categoryService.save(category);
return list_redirect+"?success";
}
/*@GetMapping("/delete/{id}")
public String deleteCategory(@PathVariable("id") int id, Model model) {
categoryService.delete(id);
return list_redirect+"?deleted";
}*/
@GetMapping("/list")
public String listCategory(Model model) {
List<Category> listCategories = categoryService.findAll();
model.addAttribute("listCategories", listCategories);
return list_template;
}
}
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class DashboardController {
@RequestMapping("/")
public String index() {
return "/dashboard/index";
}
// Added to test 500 page
@RequestMapping(path = "/tigger-error", produces =
MediaType.APPLICATION_JSON_VALUE)
public void error500() throws Exception {
throw new Exception();
}
}
import nazeem.autoparts.library.model.User;
import nazeem.autoparts.library.service.UserService;
import nazeem.autoparts.library.web.dto.UserRegistrationDto;
import org.springframework.beans.factory.annotation.Autowired;import
org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import javax.validation.Valid;
@Controller
public class LoginController {
@Autowired
private UserService userService;
@GetMapping("/login")
public String login(Model model) {
return "/auth/login";
}
@GetMapping("/register")
public String register(Model model) {
UserRegistrationDto userRegistrationDto = new
UserRegistrationDto();
model.addAttribute("userRegistrationDto", userRegistrationDto);
return "/auth/register";
}
@PostMapping("/register")
public String registerUserAccount(@Valid
@ModelAttribute("userRegistrationDto") UserRegistrationDto
userRegistrationDto, BindingResult result, Model model) {
model.addAttribute("userRegistrationDto", userRegistrationDto);
User userExists =
userService.findByUsername(userRegistrationDto.getUsername());
//System.out.println("user-->"+userRegistrationDto.getUserName());
//System.out.println("userExists-->"+userExists);
if (userExists != null) {
return "redirect:/register?username";
}
if(result.hasErrors()){
return "/auth/register";
}
userService.save(userRegistrationDto);
return "redirect:/register?success";
}
}
Frontend:
import nazeem.autoparts.library.model.*;
import nazeem.autoparts.library.service.*;
import nazeem.autoparts.library.util.Utility;
import org.springframework.beans.factory.annotation.Autowired;import
org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@Controller
public class HomeController {
@Autowired
private MakeService makeService;
@Autowired
private ModelService modelService;
@Autowired
private Utility utility;
@Autowired
ProductService productService;
@RequestMapping("/")
public String index(Model model) {
model.addAttribute("classActiveHome", "home active ");
List<Make> listMake = makeService.findAll();
model.addAttribute("listMake", listMake);
List<nazeem.autoparts.library.model.Model> listModel =
modelService.getModels(listMake.get(0).getId());
model.addAttribute("listModel", listModel);
List<Integer> listYear = utility.getYears();
model.addAttribute("listYear", listYear);
List<Product> productList = productService.findAllByActive();
model.addAttribute("productList", productList);
//Getting top 4
List<Product> productList2 =
productService.topMostOrderedProducts(8);
model.addAttribute("productList2", productList2);
return "/client/home";
}
@RequestMapping("/about-us")
public String aboutUs(Model model) {
model.addAttribute("classActivePages", "home active ");
return "/client/about-us";
}
@RequestMapping("/contact-us")
public String contactUs(Model model) {
model.addAttribute("classActivePages", "home active "); return "/client/contact-
us";
}
@RequestMapping("/faq")
public String faq(Model model) {
model.addAttribute("classActivePages", "home active ");
return "/client/faq";
}
@RequestMapping("/privacy-policy")
public String privacyPolicy(Model model) {
model.addAttribute("classActivePages", "home active ");
return "/client/privacy-policy";
}
@RequestMapping("/return-policy")
public String returnPolicy(Model model) {
model.addAttribute("classActivePages", "home active ");
return "/client/return-policy";
}
@RequestMapping("/terms-and-conditions")
public String termsAndConditions(Model model) {
model.addAttribute("classActivePages", "home active ");
return "/client/terms-and-conditions";
}
@RequestMapping(value = "/models")
@ResponseBody
public List<Dropdown> getModels(@RequestParam Long make) {
List<nazeem.autoparts.library.model.Model> modelList =
modelService.getModels(make);
List<Dropdown> dropdownList=new ArrayList<>();
for (nazeem.autoparts.library.model.Model model: modelList) {
dropdownList.add(new Dropdown(model.getId(), model.getName()));
}
return dropdownList;
}
// Added to test 500 page
@RequestMapping(path = "/tigger-error", produces =
MediaType.APPLICATION_JSON_VALUE)
public void error500() throws Exception {
throw new Exception();
}
}
import nazeem.autoparts.library.model.Category;
import nazeem.autoparts.library.model.Make;
import nazeem.autoparts.library.service.CategoryService;
import nazeem.autoparts.library.service.MakeService;
import nazeem.autoparts.library.service.ModelService;
import nazeem.autoparts.library.service.ProductService;
import nazeem.autoparts.library.model.Product;
import nazeem.autoparts.library.util.Utility;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Controller;import
org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMethod;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@Controller
public class PartController {
@Autowired
CategoryService categoryService;
@Autowired
private ProductService productService;
@Autowired
private MakeService makeService;
@Autowired
private ModelService modelService;
@Autowired
private Utility utility;
private final Integer PAGE_SIZE=2;
@RequestMapping("/category")
public String category(@RequestParam("id") Optional<Long> id
, Model model
, @RequestParam("page") Optional<Integer> page
, @RequestParam("size") Optional<Integer> size) {
int currentPage = page.orElse(1);
int pageSize = size.orElse(PAGE_SIZE);
model.addAttribute("classActiveCategory", "home active ");
//Get all categories
List<Category> categoryList = categoryService.findAll();
model.addAttribute("categories", categoryList);
//Get selected product & category
Page<Product> productList;
Category category;
if (id.isPresent()) {
productList = productService.searchResults("",
id.get().toString(), "1", "1", "", PageRequest.of(currentPage-1,
pageSize));
//productList = productService.findAllByCategoryId(id.get(),
PageRequest.of(currentPage-1, pageSize));
category = categoryService.get(id.get());
} else {
productList = productService.searchResults("", "", "1", "1",
"", PageRequest.of(currentPage-1, pageSize));
//productList = productService.findPaginated("",
PageRequest.of(currentPage-1, pageSize));
category = new Category();
category.setName("All Categories");
}
5 : Limitations of System:
7 : Conclusion
In conclusion, while the ecommerce site for car accessories e commerce offers a
valuable
platform, its success hinges on addressing key areas like scalability, security,
personalization, compatibility, and performance. Investing in these aspects can
significantly enhance user experience, security measures, and adaptability,
ensuring sustained growth and customer satisfaction within the competitive
market of car accessories and tools.
8: Bibliography
• https://autoparts.nz/
• https://www.youtube.com/watch?v=jdBYwqmMMxU&list=PL0zysOflR
CekMr91amXBNwWku4PmeFaFD
• https://www.autopartscorner.com/