Online Shoe Store
Online Shoe Store
On
Under Supervision of
Prof. Eswar Reddy
Submitted By
Rahul Mishra
Master in Computer Application
Regd. No. : 2005274043
This is to certify that this project entitled “Online Shoes Store” submitted in
partial fulfillment of the degree of MASTER IN COMPUTER APPLICATIONS to the
Department of Computer Applications, United School of Business Management,
Bhubaneswar, Odisha, done by Rahul Mishra, Registration No. 2005274043 is an
authentic work carried out by him at Ashirbad Consultancy under our guidance and is
worthy of acceptance for award of the degree. The work fulfills the entire requirement as
per the regulation of the University and in our opinion it has reached the standard needed
for submission.
This is to certify that the Project entitled Online Shoes Store is a bonafide record
of independent work done by Rahul Mishra (Reg. No.: 2005274043) under my
supervision during December 2021 to March 2022 at Ashirbad Consultancy, submitted
to the Department of Computer Applications, United School of Business Management,
Bhubaneswar, Odisha in partial fulfillment for the award of the degree of Master in
Computer Application in session 2020-2022 and that the project has not previously
formed the basis for the award of any other degree, Diploma, Associate ship, Fellowship
or other title.
I hereby declare that the Project entitled “Online Shoes Store” submitted to the
Department of Computer application, United School of Business Management,
Bhubaneswar, Odisha in partial fulfillment for the award of the degree of Master in
Computer Application in session 2020-2022 is an authentic record of my own work
carried out under the guidance of Mr. Eswar Reddy, Professor, Dept. of MCA and that
the Project has not previously formed the basis for the award of any other degree. The
report has been prepared in compliance to the guidelines specified by the University.
Place: Cuttack
Date: 21th March- 2022
(Signature)
Regd. No.-2005274043
This is to certify that the above statement made by the candidate is correct to the best of my
knowledge.
GUIDE
Prof. Eswar Reddy
Department of Computer
Application
ACKNOWLEDGEMENT
Rahul Mishra
Regd.No.-2005274043
Abstract
"Online shoes store" is site to purchase shoes.
It contains all the functionality such as - User login, Admin login, Searching
Shoe, Add to Cart and Payment etc.
It uses various technology and frameworks: Java, Spring Framework, spring
boot, spring boot data jpa with hibernate, Thymeleaf etc.
It follows MVC Architecture with respect to Spring MVC.
The main objective of this system is to help user provide a platform to buy
shoes online so that they will not be confuse in buying various products by
comparing prices offered by different sellers. The user can check as well
compare different products on our website. There is a link of different sellers on
websites through which the user can buy.
CONTENT:-
1. INTRODUCTION 1-2
2. OBJECTIVE 3-7
1|P age
1. Introduction
The "Online Shoes Store" has been developed to override the problems prevailing in
the practicing manual system. This software is supported to eliminate and in some
cases reduce the hardships faced by this existing system. Moreover this system is
designed for the particular need of the company to carry out operations in a smooth
and effective manner.
The application is reduced as much as possible to avoid errors while entering the
data. It also provides error message while entering invalid data. No formal
knowledge is needed for the user to use this system. Thus by this all it proves it is
user-friendly. Online Shoes Store, as described above, can lead to error free, secure,
reliable and fast management system. It can assist the user to concentrate on their
other activities rather to concentrate on the record keeping. Thus it will help
organization in better utilization of resources.
Every organization, whether big or small, has challenges to overcome and managing
the information of Order, Customer, Payment and Shopping Cart.
Every Online Shoes Store has different Customer needs, therefore we design
exclusive employee management systems that are adapted to your managerial
requirements.
This is designed to assist in strategic planning, and will help you ensure that your
organization is equipped with the right level of information and details for your
future goals. Also, for those busy executive who are always on the go, our systems
come with remote access features, which will allow you to manage your workforce
anytime, at all times. These systems will ultimately allow you to better manage
resources.
2|P age
CHAPTER-2
OBJECTIVE
3|P age
2. Objective of Project on Online Shoes Store:
The main objective of the Project on Online Shoes Store is to manage the details of
Customer, Order, Shoes, and Payment. It manages all the information about Customer,
Shopping Cart, and Payment. The project is totally built at administrative end and thus only
the administrator is guaranteed the access. The purpose of the project is to build an
application program to reduce the manual work for managing the Customer, Order,
Shopping Cart, Shoes. It tracks all the details about the Shoes and Payment.
It tracks all the information of Order, Shopping Cart and Payment etc
Manage the information of Order
Shows the information and description of the Customer, Shoes
To increase efficiency of managing the Customer, Order
It deals with monitoring the information and transactions of Payment.Manage the
information of Customer
Editing, adding and updating of Records is improved which results in proper
Resource management of Customer data.
Manage the information of Payment Integration of all records of Payment.
4|P age
The system generates types of information that can be used for various purposes.
o It satisfy the user requirement
o Be easy to understand by the user and operator
o Be easy to operate
o Have a good user interface
o Be expandable
o Delivered on scheduled within the budget
5|P age
The software quality plan we will use the following SQA Strategy:
• In the first step, we will select the test factors and rank them. The selected test factors
such as reliability, maintainability, portability or etc. will be placed in the matrix according to
their ranks.
• The second step is for identifying the phases of the development process. The
phase should be recorded in the matrix.
• The third step is that identifying the business risks of the software deliverables. The risks
will be ranked into three ranks such as high, medium and low.
6|P age
Software Requirement Specification
The Software Requirements Specification is produced at the culmination of the analysis task.
The function and performance allocated to software as part of system engineering are
refined by establishing a complete information description, a detailed functional and
behavioral description, an indication of performance requirements and design constraints,
appropriate validation criteria, and other data pertinent to requirements.
7|P age
CHAPTER-3
FEASIBILITY STUDY
8|P age
3. Feasibility Study:
After doing the project Online Shoes Store, study and analyzing all the existing or
required functionalities of the system, the next task is to do the feasibility study for
the project. All projects are feasible - given unlimited resources and infinite time.
Feasibility study includes consideration of all the possible ways to provide a solution
to the given problem. The proposed solution should satisfy all the user requirements
and should be flexible enough so that future changes can be easily done based on
the future upcoming requirements.
A. Economical Feasibility
This is a very important aspect to be considered while developing a project. We decided the
technology based on minimum possible cost factor.
• All hardware and software cost has to be borne by the organization.
• Overall we have estimated that the benefits the organization is going to receive from the
proposed system will surely overcome the initial costs and the later on running cost for
system.
B. Technical Feasibility
This included the study of function, performance and constraints that may affect the ability
to achieve an acceptable system. For this feasibility study, we studied complete functionality
to be provided in the system, as described in the System Requirement Specification (SRS),
and checked if everything was possible using different type of frontend and backend
platforms.
C. Operational Feasibility
No doubt the proposed system is fully GUI based that is very user friendly and all inputs to
be taken all self-explanatory even to a layman. Besides, a proper training has been
conducted to let know the essence of the system to the users so that they feel comfortable
with new system. As far our study is concerned the clients are comfortable and happy as the
system has cut down their loads and doing.
9|P age
System Design of Online Shoes Store
In this phase, a logical system is built which fulfils the given requirements. Design phase of
software development deals with transforming the clients’s requirements into a logically
working system. Normally, design is performed in the following in the following two steps:
1. Primary Design Phase:
In this phase, the system is designed at block level. The blocks are created on the basis of
analysis done in the problem identification phase. Different blocks are created for different
functions emphasis is put on minimizing the information flow between blocks. Thus, all
activities which require more interaction are kept in one block.
2. Secondary Design Phase:
10 | P a g e
User Interface Design
User Interface Design is concerned with the dialogue between a user and the computer. It is
concerned with everything from starting the system or logging into the system to the
eventually presentation of desired inputs and outputs. The overall flow of screens and
messages is called a dialogue.
The following steps are various guidelines for User Interface Design:
1. The system user should always be aware of what to do next.
2. The screen should be formatted so that various types of information, instructions and
messages always appear in the same general display area.
3. Message, instructions or information should be displayed long enough to allow the
system user to read them.
4. Use display attributes sparingly.
5. Default values for fields and answers to be entered by the user should be specified.
6. A user should not be allowed to proceed without correcting an error.
7. The system user should never get an operating system message or fatal error.
11 | P a g e
Benefit to Organization
The organization will obviously be able to gain benefits such as savings in operating cost,
reduction in paperwork, better utilization of human resources and more presentable image
increasing goodwill.
The Initial Cost
The initial cost of setting up the system will include the cost of hardware software (OS, add-
on software, utilities) & labour (setup & maintenance). The same has to bear by the
organization.
Running Cost
Besides, the initial cost the long term cost will include the running cost for the system
including the AMC, stationary charges, cost for human resources, cost for update/renewal
of various related software.
Need for Training
The users along with the administrator need to be trained at the time of
implementation of the system for smooth running of the system. The client will
provide the training site.
We talked to the management people who were managing a the financial issues of
the center, the staff who were keeping the records in lots of registers and the
reporting manager regarding their existing system, their requirements and their
expectations from the new proposed system. Then, we did the system study of the
entire system based on their requirements and the additional features they wanted
to incorporate in this system.
Reliable, accurate and secure data was also considered to be a complex task without
this proposed system. Because there was no such record for keeping track of all the
activities, which was done by the Online Shoes Store on the daily basis.
The new system proposed and then developed by me will ease the task of the
organization in consideration. It will be helpful in generating the required reports by
the staff, which will help them to track their progress and services.
Thus, it will ease the task of Management to a great extent as all the major activities
to be performed, are computerized through this system.
12 | P a g e
CHAPTER-4
LITERATURE REVIEW
13 | P a g e
4. LITERATURE REVIEW:
JAVA:-
Because you’re online store will be built with Java, a highly versatile language, it
will work well on all types of browsers. Java is also powerful when it comes to
debugging and that will be critical for online businesses in the real world.
SPRING:-
Spring is the most popular application development framework for enterprise Java. Millions
of developers around the world use Spring Framework to create high performing, easily
testable, and reusable code.
Spring makes building web applications fast and hassle-free. By removing much of the
boilerplate code and configuration associated with web development, you get a modern
web programming model that streamlines the development of server-side HTML
applications, REST APIs, and bidirectional, event-based systems.
Advantages:-
SPRING MVC:-
A Spring MVC is a Java framework which is used to build web applications. It follows the
Model-View-Controller design pattern. It implements all the basic features of a core spring
framework like Inversion of Control, Dependency Injection.
A Spring MVC provides an elegant solution to use MVC in spring framework by the help
of DispatcherServlet. Here, DispatcherServlet is a class that receives the incoming request
and maps it to the right resource such as controllers, models, and views.
14 | P a g e
o Model - A model contains the data of the application. A data can be a single
object or a collection of objects.
o Controller - A controller contains the business logic of an application. Here,
the @Controller annotation is used to mark the class as the controller.
o View - A view represents the provided information in a particular format.
Generally, JSP+JSTL is used to create a view page. Although spring also
supports other view technologies such as Apache Velocity, Thymeleaf and
FreeMarker.
o Front Controller - In Spring Web MVC, the DispatcherServlet class works as
the front controller. It is responsible to manage the flow of the Spring MVC
application.
15 | P a g e
16 | P a g e
o The DispatcherServlet checks the entry of view resolver in the XML file and
invokes the specified view component.
o Separate roles - The Spring MVC separates each role, where the model
object, controller, command object, view resolver, DispatcherServlet, validator,
etc. can be fulfilled by a specialized object.
o Light-weight - It uses light-weight servlet container to develop and deploy
your application.
o Powerful Configuration - It provides a robust configuration for both
framework and application classes that includes easy referencing across
contexts, such as from web controllers to business objects and validators.
o Reusable business code - Instead of creating new objects, it allows us to use
the existing business objects.
o Easy to test - In Spring, generally we create JavaBeans classes that enable you
to inject test data using the setter methods.
o Flexible Mapping - It provides the specific annotations that easily redirect the
page.
SPRINGBOOT:-
Spring Boot is one of the best backend frameworks that developers count on
while performing backend web development tasks. It is a Spring-based
framework that allows developers to write production-grade backend web
applications in Java. Spring Boot is microservices-ready, which allows
developers to divvy the load for proper handling of requests made by the users
across devices and platforms.
Let’s see why the Spring Boot framework is among the best.
17 | P a g e
Comes with Spring Boot CLI (Command Line Interface), which allows
developers to write applications in Groovy, a programming language that
simplifies development
Requires no code generation and neither the XML (extensible
Markup Language) configuration
Spring Data JPA, part of the larger Spring Data family, makes it easy to easily
implement JPA based repositories. This module deals with enhanced support for JPA
based data access layers. It makes it easier to build Spring-powered applications that
use data access technologies.
Implementing a data access layer of an application has been cumbersome for quite a
while. Too much boilerplate code has to be written to execute simple queries as well
as perform pagination, and auditing.
Spring Data JPA aims to significantly improve the implementation of data access
layers by reducing the effort to the amount that’s actually needed. As a developer
you write your repository interfaces, including custom finder methods, and spring
will provide the implementation automatically.
18 | P a g e
SPRING SECURITY:-
Spring Security is the primary choice for implementing application-level security in spring
applications. Generally, its purpose is to offer you a highly customizable way of
implementing authentication, authorization, and protection against common attacks.
FEATURES:-
THYMELEAF:-
It provides full integration with Spring Framework. It applies a set of transformations to
template files in order to display data or text produced by the application. It is appropriate
for serving XHTML/HTML5 in web applications. The goal of Thymeleaf is to provide a stylish
and well-formed way of creating templates.
It is based on XML tags and attributes. These XML tags define the execution of predefined
logic on the DOM (Document Object Model) instead of explicitly writing that logic as code
inside the template. It is a substitute for JSP.
The architecture of Thymeleaf allows the fast processing of templates that depends on the
caching of parsed files. It uses the least possible amount of I/O operations during execution.
JSP is more or less similar to HTML. But it is not completely compatible with HTML like
Thymeleaf. We can open and display a Thymeleaf template file normally in the browser
while the JSP file does not.
Thymeleaf supports variable expressions (${...}) like Spring EL and executes on model
attributes, asterisk expressions (*{...}) execute on the form backing bean, hash expressions
(#{...}) are for internationalization, and link expressions (@{...}) rewrite URLs.
19 | P a g e
HTML:
HTML (Hypertext Markup Language) is the code that is used to structure a web page and its
content. For example, content could be structured within a set of paragraphs, a list of bulleted
points, or using images and data tables
Why do we use HTML in website?
HTML allows users to create and structure sections, headings, links, paragraphs, and
more, on a website using various tags and elements. Almost everything you want to
create on a web page can be done using a specific HTML code
BOOTSTRAP:
Spring is a popular framework that is used for developing enterprise Java applications, with
Spring Boot is a set of tools and libraries that make spring development a lot easier. So
using Bootstrap and jQuery in a Spring Boot project is developer's common choice.
Bootstrap is a framework to help you design websites faster and easier. It includes HTML
and CSS based design templates for typography, forms, buttons, tables, navigation,
modals, image carousels, etc. It also gives you support for JavaScript plugins.
JAVASCRIPT:
JavaScript is used by programmers across the world to create dynamic and interactive web
content like applications and browsers. JavaScript is so popular that it's the most used
programming language in the world, used as a client-side programming language by 97.0%
of all websites.
JavaScript is a text-based programming language used both on the client-side and server-
side that allows you to make web pages interactive. Where HTML and CSS are languages
that give structure and style to web pages, JavaScript gives web pages interactive elements
that engage a user.
JQUERY:
The purpose of jQuery is to make it much easier to use JavaScript on your website. JQuery
takes a lot of common tasks that require many lines of JavaScript code to accomplish, and
wraps them into methods that you can call with a single line of code.
The advantages of using jQuery are:
o JavaScript enhancement without the overhead of learning new syntax.
o Ability to keep the code simple, clear, readable and reusable.
o Eradication of the requirement of writing repetitious and complex loops and DOM
scripting library calls.
20 | P a g e
Brief Introduction about RDBSM:
RDBMSS have become a predominant choice for the storage of information in new
databases used for financial records, manufacturing and logistical information,
personnel data, and much more since the 1980s.
Relational databases have often replaced legacy hierarchical databases and network
databases because they are easier to understand and use. However, relational
databases have been challenged by object databases, which were introduced in an
attempt to address the object-relational impedance mismatch in relational database,
and XML databases.
21 | P a g e
CHAPTER-5
IMPLEMENTATION METHODOLOGY
22 | P a g e
5. Implementation Methodology:
Model View Controller or MVC as it is popularly called, is a software design pattern for
developing web applications. A Model View Controller pattern is made up of the following
three parts:
• Model - The lowest level of the pattern which is responsible for maintaining data.
View - This is responsible for displaying all or a portion of the data to the user.
Controller - Software Code that controls the interactions between the Model
and View.
MVC is popular as it isolates the application logic from the user interface layer and supports
separation of concerns. Here the Controller receives all requests for the application and
then works with the Model to prepare any data needed by the View. The View then uses
the data prepared by the Controller to generate a final presentable response. The MVC
abstraction can be graphically represented as follows.
23 | P a g e
CHAPTER-6
PROJECT PLANNING
24 | P a g e
6. Project Planning:
Software project plan can be viewed as the following:
1) Within the organization: How the project is to be implemented? What are
various constraints (time, cost, and staff)? What is market strategy?
2) With respect to the customer: Weekly or timely meetings with the customer with
presentation on status reports. Customer’s feedback is also taken and further modification
and developments are done. Project milestones and deliverables are also presented to the
customer.
For a successful software project, the following steps can be followed:
Select a project
Identifying project's aims and objectives
o Understanding requirements and specification
o Methods of analysis, design and implementation
o Testing techniques
o Documentation
Project milestones and deliverables
Budget allocation
o Exceeding limits within control
Project Estimates
o Cost
o Time
o Size of code
o Duration
Resource Allocation
o Hardware
o Software
o Previous relevant project information
o Digital Library
Risk Management
o Risk avoidance
o Risk detection
25 | P a g e
Project Scheduling:
An elementary Gantt chart or Timeline chart for the development plan is given below. The
plan explains the tasks versus the time (in weeks) they will take to complete.
26 | P a g e
CHAPTER-7
PROJECT SPECIFICATION
27 | P a g e
7. PROJECT SPECIFICATION:
Software Specification:-
Jdk 1.8 or more version.
MySQL 8.0.
64-bit Operating System: Windows 8 or Higher.
Windows Administrator permissions are needed for some parts of the
program to function properly.
Hardware Specification:-
A good laptop/pc with good processor.
Environment Specification:-
Must have a Browser software.
Eclipse IDE or STS IDE (For Backend).
Visual Studio Code (For Frontend).
MySQL Workbench.
Dependencies:-
Spring-boot-starter-web
Spring-boot-starter-tomcat
Spring-boot-starter-Thymeleaf
Spring-boot-starter-tomcat
Spring-boot-starter-data-jpa
Spring-boot-starter-security
Devtools
MySQL-connector-java
28 | P a g e
CHAPTER-8
PROJECT PROFILE
29 | P a g e
8. Project Profile
There has been continuous effort to develop tools, which can ease the process of software
development. But, with the evolving trend of different programming paradigms today's
software developers are really challenged to deal with the changing technology. Among
other issues, software re-engineering is being regarded as an important process in the
software development industry. One of the major tasks here is to understand software
systems that are already developed and to transform them to a different software
environment. Generally, this requires a lot of manual effort in going through a program that
might have been developed by another programmer. This project makes a novel attempt to
address the issue of program analysis and generation of diagrams, which can depict the
structure of a program in a better way. Today, UML is being considered as an industrial
standard for software engineering design process. It essential provides several diagramming
tools that can express different aspects/ characteristics of program such as
Use cases: Elicit requirement from users in meaningful chunks. Construction planning is built
around delivering some use cases n each interaction basis for system testing.
Class diagrams: shows static structure of concepts, types and class. Concepts how users
think about the world; type shows interfaces of software components; classes shows
implementation of software components.
Interaction diagrams: shows how several objects collaborate in single use case.
Package diagram: show group of classes and dependencies among them.
Package diagram: show group of classes and dependencies among them.
State diagram: show how single object behaves across many use cases.
Activity diagram: shows behavior with control structure. Can show many objects over many
uses, many object in single use case, or implementations methods encourage parallel
behavior, etc.
The end-product of this project is a comprehensive tool that can parse any java program and
extract most of the object oriented features inherent in the program such as polymorphism,
inheritance, encapsulation and abstraction.
What is UML?
UML stands for Unified Modeling Language is the successor to the wave of Object Oriented
Analysis and Design (OOA&D) methods that appeared in the late 80's. It most directly unifies
the methods of Brooch, Rum Baugh (OMT) and Jacobson. The UML is called a modeling
language, not a method. Most methods consist at least in principle, of both a modeling
language and a process. The Modeling language is that notation that methods used to
express design.
30 | P a g e
Notations and meta-models:
The notation is the graphical stuff; it is the syntax of the modeling language. For instance,
class diagram notation defines how items are concepts such as class, association, and
multiplicity is represented. These are:
Class Diagram: The class diagram technique has become truly central within object oriented
methods. Virtually every method has included some variation on this technique. Class
diagram is also subject to the greatest range of modeling concept. Although the basic
elements are needed by everyone, advanced concepts are used less often. A class diagram
describes the types of objects in the system and the various kinds of static relationship that
exist among them. There are two principal kinds of static relationship:
o Association
o Subtype
Class diagram also show the attributes and operations of a class and the constraints that
apply to the way objects are connected.
Association: Association represent between instances of class. From the conceptual
perspective, association represents conceptual relations between classes. Each association
has two roles. Each role is a direction on the association. A role also has multiplicity, which is
a indication of how many object may participate in the given relationship.
31 | P a g e
Generalization: A typical example of generalization evolves the personal and corporate
customer of a business. They have differences but also many similarity. The similarities can
be placed in generalization with personal customer and corporate customer sub type.
Aggregation: aggregation is the part of relationship. It is like saying a car has engine and
wheels as its parts. This sounds good, but difficult thing is considering, what is the difference
is aggregation and association.
Interaction: interaction diagrams are models that describes how groups of objects
collaboration in some behavior.
Typically, an interaction diagram captures the behavior a single use cases. The diagram
shows a number of example objects and the messages that are passed between these
objects in use cases. These are following approaches with simple use case that exhibits the
following behavior.
Objects can send a message to another. Each message is checks with given stock item. There
are two diagrams: Sequence and Collaboration diagram.
32 | P a g e
CHAPTER-9
SECURITY TESTING
33 | P a g e
9. Security Testing of the Project
Testing is vital for the success of any software. No system design is ever perfect. Testing is
also carried in two phases. First phase is during the software engineering that is during the
module creation. Second phase is after the completion of software. This is system testing
which verifies that the whole set of programs hanged together.
White Box Testing:
In this technique, the close examination of the logical parts through the software are tested by
cases that exercise species sets of conditions or loops. All logical parts of the software
checked once. Errors that can be corrected using this technique are typographical errors,
logical expressions which should be executed once may be getting executed more than once
and error resulting by using wrong controls and loops. When the box testing tests all the
independent part within a module a logical decisions on their true and the false side are
exercised, all loops and bounds within their operational bounds were exercised and internal
data structure to ensure their validity were exercised once.
9.2. Black Box Testing:
This method enables the software engineer to device sets of input techniques that fully
exercise all functional requirements for a program. Black box testing tests the input, the
output and the external data. It checks whether the input data is correct and whether we
are getting the desired output.
Unit Testing:
Each module is considered independently. It focuses on each unit of software as implemented in the
source code. It is white box testing.
Integration Testing:
Integration testing aims at constructing the program structure while at the same
constructing tests to uncover errors associated with interfacing the modules.
Modules are integrated by using the top down approach.
Validation Testing:
Validation testing was performed to ensure that all the functional and performance
requirements are met.
System Testing:
It is executing programs to check logical changes made in it with intention of finding errors.
a system is tested for online response, volume of transaction, recovery from failure etc.
System testing is done to ensure that the system satisfies all the user requirements.
34 | P a g e
CHAPTER-10
IMPLEMENTATION AND SOFTWARE
SPECIFICATION TESTING
35 | P a g e
10. Implementation and Software Specification Testing
Detailed Design of Implementation
This phase of the systems development life cycle refines hardware and software
specifications, establishes programming plans, trains users and implements extensive testing
procedures, to evaluate design and operating specifications and/or provide the basis for
further modification.
Technical Design
This activity builds upon specifications produced during new system design, adding detailed
technical specifications and documentation.
Test Specifications and Planning
This activity prepares detailed test specifications for individual modules and
programs, job streams, subsystems, and for the system as a whole.
Programming and Testing
This activity encompasses actual development, writing, and testing of program units or
modules.
User Training
This activity encompasses writing user procedure manuals, preparation of user training
materials, conducting training programs, and testing procedures.
Installation Phase
In this phase the new computerized system is installed, the conversion to new procedures
is fully implemented, and the potential of the new system is explored.
System Installation
The process of starting the actual use of a system and training user personnel in its operation.
Review Phase
This phase evaluates the successes and failures during a systems development project, and
to measure the results of a new Computerized Tran system in terms of benefits and savings
projected at the start of the project.
36 | P a g e
CHAPTER-11
STEPS IN SOFTWARE TESTING
37 | P a g e
11. THE STEPS IN THE SOFTWARE TESTING
The steps involved during Unit testing are as follows:
a. Preparation of the test cases.
b. Preparation of the possible test data with all the validation checks.
c. Complete code review of the module.
d. Actual testing done manually.
e. Modifications done for the errors found during testing.
f. Prepared the test result scripts.
The unit testing done included the testing of the following items:
1. Functionality of the entire module/forms.
2. Validations for user input.
3. Checking of the Coding standards to be maintained during coding.
4. Testing the module with all the possible test data.
5. Testing of the functionality involving all type of calculations etc.
6. Commenting standard in the source files.
After completing the Unit testing of all the modules, the whole system is integrated with all
its dependencies in that module. While System Integration, We integrated the modules one by
one and tested the system at each step. This helped in reduction of errors at the time of the
system testing.
The steps involved during System testing are as follows:
Integration of all the modules/forms in the system.
• Preparation of the test cases.
• Preparation of the possible test data with all the validation checks.
• Actual testing done manually.
• Recording of all the reproduced errors.
• Modifications done for the errors found during testing.
• Prepared the test result scripts after rectification of the errors.
The System Testing done included the testing of the following items:
1. Functionality of the entire system as a whole.
2. User Interface of the system.
3. Testing the dependent modules together with all the possible test data scripts.
4. Verification and Validation testing.
5. Testing the reports with all its functionality.
38 | P a g e
CHAPTER-12
SYSTEM ANALYSIS
39 | P a g e
12. System Analysis:
o System analysis is a process of gathering and interpreting facts, diagnosing
problems and the information about the Online Shoes Store to recommend
improvements on the system. It is a problem solving activity that requires intensive
communication between the system users and system developers.
o A detailed study of the process must be made by various techniques like interviews,
questionnaires etc. The data collected by these sources must be scrutinized to arrive
to a conclusion. The conclusion is an understanding of how the system functions.
This system is called the existing system. Now the existing system is subjected to
close study and problem areas are identified.
o The designer now functions as a problem solver and tries to sort out the difficulties
that the enterprise faces. The solutions are given as proposals. The proposal is then
weighed with the existing system analytically and the best one is selected. The
proposal is presented to the user for an endorsement by the user. The proposal is
reviewed on user request and suitable changes are made.
o This is loop that ends as soon as the user is satisfied with proposal. Preliminary
study is the process of gathering and interpreting facts, using the information for
further studies on the system. Preliminary study is problem solving activity that
requires intensive communication between the system users and system developers.
It does various feasibility studies.
o In these studies a rough figure of the system activities can be obtained, from which
the decision about the strategies to be followed for effective system study and
analysis can be taken.
40 | P a g e
Existing System of Online Shoes Store:
• Security of data.
• Ensure data accuracy's.
• Proper control of the higher officials.
• Minimize manual data entry.
• Minimum time needed for the various processing.
• Greater efficiency.
• Better service.
• User friendliness and interactive.
• Minimum time required.
41 | P a g e
APPLICATION WORK FLOW:-
When Users gives a request from a browser, it means user enters our project websites or
login page. User enter URL of our program then a request comes to backend here we
developed backend code in spring boot with MVC Architecture.
MVC: - Model, view and Controller.
User request comes to Controller layer then if there is a logic to execute for response then
controller layer pass the request to Service layer.
After execution of some specific operations by the help of repository or we can say DAO
Layer (Data Access Object) it perform database operation Service layer pass the updated
request to Controller then add it to model then it returns the View .
View is a Presentation Layer: We are using Thymeleaf, HTML and CSS in this layer to
represent the response.
42 | P a g e
CHAPTER-13
CODING
43 | P a g e
13. CODING
44 | P a g e
Dependencies:-
Pom.xml :-
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.nico.store</groupId>
<artifactId>store</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>store</name>
<description>project for Spring Boot ShoeShop</description>
<packaging>war</packaging>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>
45 | P a g e
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>ShoeShop</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
46 | P a g e
StoreApplication.java:-
Main java file where the springboot program starts.
package com.nico.store.store;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import
org.springframework.cache.annotation.EnableCaching;
@SpringBootApplication
@EnableCaching
public class StoreApplication extends SpringBootServletInitializer {
@Override
public SpringApplicationBuilder configure(SpringApplicationBuilder application)
{
return application.sources(StoreApplication.class);
}
47 | P a g e
MODEL :-
User.java:-
package com.nico.store.store.domain;
import java.util.Collection;
import java.util.HashSet; import
java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column; import
javax.persistence.Entity;
import javax.persistence.FetchType; import
javax.persistence.GeneratedValue; import
javax.persistence.GenerationType; import
javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
@NamedEntityGraph(
name= "UserComplete",
attributeNodes= { @NamedAttributeNode(value="userRoles", subgraph="role-subgraph") },
subgraphs= {
@NamedSubgraph(name = "role-subgraph", attributeNodes = {
@NamedAttributeNode("role") }
)}
)
@Entity
@SuppressWarnings("serial")
public class User implements UserDetails {
@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="id", nullable=false, updatable=false)
@NotNull
private String username;
private String password;
private String firstName;
private String lastName;
@NotNull
@Email
private String email;
48 | P a g e
private Set<UserRole> userRoles = new HashSet<>();
public User() {
@Override
public Collection<? extends GrantedAuthority> getAuthorities() { Set<GrantedAuthority>
authorites = new HashSet<>(); userRoles.forEach(userRole -> authorites.add(new
Authority(userRole.getRole().getName())));
return authorites;
}
@Override
public String toString() {
return getClass().getSimpleName() + "[id=" + id + "]" + "[username=" + username + "]" + "[password=" +
password + "]" + "[email=" + email + "]";
}
@Override
public boolean isAccountNonExpired() {
return true;
}
@Override
public boolean isAccountNonLocked() {
return true;
}
@Override
public boolean isCredentialsNonExpired() {
return true;
}
@Override
public boolean isEnabled() {
return true;
}
49 | P a g e
this.password = password;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
50 | P a g e
Shoppingcart.java:
package com.nico.store.store.domain; import
java.math.BigDecimal;
import java.util.List;
51 | P a g e
Payment.java:-
package com.nico.store.store.domain;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
@Entity
public class Payment {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@OneToOne private
Order order;
52 | P a g e
}
public void setCardName(String cardName) {
this.cardName = cardName;
}
public String getCardNumber() {
return cardNumber;
}
public void setCardNumber(String cardNumber) {
this.cardNumber = cardNumber;
}
public int getExpiryMonth() {
return expiryMonth;
}
public void setExpiryMonth(int expiryMonth) {
this.expiryMonth = expiryMonth;
}
public int getExpiryYear() {
return expiryYear;
}
public void setExpiryYear(int expiryYear) {
this.expiryYear = expiryYear;
}
public int getCvc() {
return cvc;
}
public void setCvc(int cvc) {
this.cvc = cvc;
}
public String getHolderName() {
return holderName;
}
public void setHolderName(String holderName) {
this.holderName = holderName;
}
}
53 | P a g e
Order.java:-
package com.nico.store.store.domain;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table; @Entity
@Table(name="user_order")
public class Order {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private Date orderDate; private
Date shippingDate; private
String orderStatus; private
BigDecimal orderTotal;
@ManyToOne(fetch = FetchType.LAZY)
private User user;
54 | P a g e
this.orderDate = orderDate;
}
public Date getShippingDate() {
return shippingDate;
}
public void setShippingDate(Date shippingDate) { this.shippingDate =
shippingDate;
}
public String getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
public BigDecimal getOrderTotal() {
return orderTotal;
}
55 | P a g e
Category.java:-
package com.nico.store.store.domain;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
@Entity
public class Category {
@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JoinColumn(name="article_id")
private Article article;
public Category() {
}
56 | P a g e
Address.java:-
package com.nico.store.store.domain; import
javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Address {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String streetAddress;
private String city;
private String country; private
String zipCode;
57 | P a g e
Article.java:-
package com.nico.store.store.domain; import
java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
@Entity
public class Article {
@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
private Long id;
private String title;
private int stock;
private double price;
private String picture;
public Article() {
}
public boolean hasStock(int amount) {
return (this.getStock() > 0) && (amount <= this.getStock());
}
public void decreaseStock(int amount) { this.stock -
= amount;
}
58 | P a g e
}
public void addSize(Brand brand) {
brands.add(brand);
brand.setArticle(this);
}
public void removeSize(Brand brand) {
brands.remove(brand);
brand.setArticle(null);
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public int getStock() {
return stock;
}
public void setStock(int stock) {
this.stock = stock;
}
public Set<Size> getSizes() {
return sizes;
}
public void setSizes(Set<Size> sizes) { this.sizes =
sizes;
}
public Set<Brand> getBrands() {
return brands;
}
public void setBrands(Set<Brand> brands) {
this.brands = brands;
}
public Set<Category> getCategories() {
return categories;
}
public void setCategories(Set<Category> categories) {
this.categories = categories;
}
59 | P a g e
SECURITY:-
SecurityConfig.java:-
package com.nico.store.store.config;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled=true)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private UserSecurityService userSecurityService; private
BCryptPasswordEncoder passwordEncoder() {
return SecurityUtility.passwordEncoder();
}
private static final String[] PUBLIC_MATCHERS = {
"/css/**",
"/js/**",
"/image/**",
"/",
"/new-user",
"/login",
"/store",
"/article-detail"
};
@Override
protected void configure(HttpSecurity http) throws Exception { http
.authorizeRequests()
.antMatchers(PUBLIC_MATCHERS).permitAll()
.antMatchers("/article/**").hasRole("ADMIN")
.anyRequest().authenticated();
http
.csrf().disable().cors().disable()
.formLogin().failureUrl("/login?error")
.loginPage("/login").permitAll()
.and()
.logout().logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
.logoutSuccessUrl("/?logout").deleteCookies("remember-me").permitAll()
.and()
.rememberMe().key("aSecretKey");
}
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(userSecurityService).passwordEncoder(passwordEncoder());
}
}
60 | P a g e
Role.java:-
package com.nico.store.store.domain.security; import
java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
@Entity
public class Role {
@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
private Long roleId;
@Column(unique = true)
private String name;
public Role() {
}
UserRole.java:-
package com.nico.store.store.domain.security; import
javax.persistence.*;
import com.nico.store.store.domain.User;
@Entity
@Table(name="user_role")
public class UserRole {
@Id @GeneratedValue(strategy=GenerationType.AUTO)
private Long userRoleId;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="user_id")
private User user;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="role_id")
private Role role;
public UserRole() {
}
public UserRole(User user, Role role) {
this.user = user;
this.role = role;
}
61 | P a g e
FILTER :
SortFilter.java:-
package com.nico.store.store.type;
class SortFilter {
}
}
62 | P a g e
CONTROLLERS :
HomeController.java:-
package com.nico.store.store.controller;
import java.util.List;
import com.nico.store.store.domain.Article;
import com.nico.store.store.service.ArticleService;
@Controller
public class HomeController {
@Autowired
private ArticleService articleService;
@RequestMapping("/")
public String index(Model model) {
List<Article> articles = articleService.findFirstArticles(); model.addAttribute("articles",
articles);
return "index";
}
63 | P a g e
AccountController.java:-
package com.nico.store.store.controller;
import java.security.Principal;
import java.util.Arrays;
import java.util.List;
import javax.validation.Valid;
import com.nico.store.store.domain.Address;
import com.nico.store.store.domain.Order;
import com.nico.store.store.domain.User;
import com.nico.store.store.service.OrderService; import
com.nico.store.store.service.UserService;
import com.nico.store.store.service.impl.UserSecurityService; import
utility.SecurityUtility;
@Controller
public class AccountController {
@Autowired
private UserService userService;
@Autowired
private UserSecurityService userSecurityService;
@Autowired
private OrderService orderService;
@RequestMapping("/login")
public String log(Model model) {
model.addAttribute("usernameExists", model.asMap().get("usernameExists"));
model.addAttribute("emailExists", model.asMap().get("emailExists")); return
"myAccount";
}
@RequestMapping("/my-profile")
public String myProfile(Model model, Authentication authentication) {
@RequestMapping("/my-orders")
public String myOrders(Model model, Authentication authentication) {
64 | P a g e
User user = (User) authentication.getPrincipal();
model.addAttribute("user", user);
List<Order> orders = orderService.findByUser(user);
model.addAttribute("orders", orders);
return "myOrders";
}
@RequestMapping("/my-address")
public String myAddress(Model model, Principal principal) {
User user = userService.findByUsername(principal.getName());
model.addAttribute("user", user);
return "myAddress";
}
@RequestMapping(value="/new-user", method=RequestMethod.POST)
public String newUserPost(@Valid @ModelAttribute("user") User user, BindingResult
bindingResults, @ModelAttribute("new-password") String password,
RedirectAttributes redirectAttributes, Model model) {
model.addAttribute("email", user.getEmail());
model.addAttribute("username", user.getUsername());
boolean invalidFields = false;
if (bindingResults.hasErrors()) {
return "redirect:/login";
}
if (userService.findByUsername(user.getUsername()) != null) {
redirectAttributes.addFlashAttribute("usernameExists", true);
invalidFields = true;
}
if (userService.findByEmail(user.getEmail()) != null) {
redirectAttributes.addFlashAttribute("emailExists", true);
invalidFields = true;
}
if (invalidFields) {
return "redirect:/login";
}
user = userService.createUser(user.getUsername(),password,user.getEmail(),
Arrays.asList("ROLE_USER"));
userSecurityService.authenticateUser(user.getUsername()); return
"redirect:/my-profile";
}
65 | P a g e
}
/*check username already exists*/
User existingUser = userService.findByUsername(user.getUsername());
if (existingUser != null && !existingUser.getId().equals(currentUser.getId())) {
model.addAttribute("usernameExists", true);
return "myProfile";
}
/*check email already exists*/
existingUser = userService.findByEmail(user.getEmail());
if (existingUser != null && !existingUser.getId().equals(currentUser.getId())) {
model.addAttribute("emailExists", true);
return "myProfile";
}
/*update password*/
if (newPassword != null && !newPassword.isEmpty() && !newPassword.equals("")){
BCryptPasswordEncoder passwordEncoder =
SecurityUtility.passwordEncoder();
String dbPassword = currentUser.getPassword();
if(passwordEncoder.matches(user.getPassword(), dbPassword)){
currentUser.setPassword(passwordEncoder.encode(newPassword));
} else
{ model.addAttribute("incorrectPassword", true); return
"myProfile";
}
}
currentUser.setFirstName(user.getFirstName());
currentUser.setLastName(user.getLastName());
currentUser.setUsername(user.getUsername());
currentUser.setEmail(user.getEmail()); userService.save(currentUser);
model.addAttribute("updateSuccess", true); model.addAttribute("user",
currentUser);
userSecurityService.authenticateUser(currentUser.getUsername()); return
"myProfile";
}
@RequestMapping("/order-detail")
public String orderDetail(@RequestParam("order") Long id, Model model) { Order
order = orderService.findOrderWithDetails(id); model.addAttribute("order",
order);
return "orderDetails";
}
66 | P a g e
StoreController.java:-
package com.nico.store.store.controller;
import javax.websocket.server.PathParam;
import com.nico.store.store.domain.Article;
import com.nico.store.store.form.ArticleFilterForm;
import com.nico.store.store.service.ArticleService;
import com.nico.store.store.type.SortFilter;
@Controller
public class StoreController {
@Autowired
private ArticleService articleService;
@RequestMapping("/store")
public String store(@ModelAttribute("filters") ArticleFilterForm filters, Model model) { Integer
page = filters.getPage();
int pagenumber = (page == null || page <= 0) ? 0 : page-1;
SortFilter sortFilter = new SortFilter(filters.getSort());
Page<Article> pageresult =
articleService.findArticlesByCriteria(PageRequest.of(pagenumber,9, sortFilter.getSortType()),
filters.getPricelow(), filters.getPricehigh(),
@RequestMapping("/article-detail")
public String articleDetail(@PathParam("id") Long id, Model model) {
Article article = articleService.findArticleById(id);
model.addAttribute("article", article);
model.addAttribute("notEnoughStock", model.asMap().get("notEnoughStock"));
model.addAttribute("addArticleSuccess", model.asMap().get("addArticleSuccess")); return
"articleDetail";
}
67 | P a g e
ShoppingCartController.java:-
package com.nico.store.store.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication; import
org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
@Controller
@RequestMapping("/shopping-cart")
public class ShoppingCartController {
@Autowired
private ArticleService articleService;
@Autowired
private ShoppingCartService shoppingCartService;
@RequestMapping("/cart")
public String shoppingCart(Model model, Authentication authentication) { User
user = (User) authentication.getPrincipal();
ShoppingCart shoppingCart = shoppingCartService.getShoppingCart(user);
model.addAttribute("cartItemList", shoppingCart.getCartItems());
model.addAttribute("shoppingCart", shoppingCart);
return "shoppingCart";
}
@RequestMapping("/update-item")
public String updateItemQuantity(@RequestParam("id") Long cartItemId,
@RequestParam("qty") Integer qty, Model model) {
CartItem cartItem = shoppingCartService.findCartItemById(cartItemId); if
(cartItem.canUpdateQty(qty)) {
shoppingCartService.updateCartItem(cartItem, qty);
}
return "redirect:/shopping-cart/cart";
}
@RequestMapping("/remove-item")
public String removeItem(@RequestParam("id") Long id) {
shoppingCartService.removeCartItem(shoppingCartService.findCartItemById(id));
return "redirect:/shopping-cart/cart";
}
68 | P a g e
REPOSITORIES :
UserRepository.java:-
package com.nico.store.store.repository;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.EntityGraph.EntityGraphType; import
org.springframework.data.repository.CrudRepository;
import com.nico.store.store.domain.User;
RoleRepository.java:-
package com.nico.store.store.repository;
com.nico.store.store.domain.security.Role;
findByName(String name);
OrderRepository.java:-
package com.nico.store.store.repository;
import java.util.List;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.repository.CrudRepository;
import com.nico.store.store.domain.Order;
import com.nico.store.store.domain.User;
69 | P a g e
CartItemRepository.java:-
package com.nico.store.store.repository;
import java.util.List;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.repository.CrudRepository;
import com.nico.store.store.domain.CartItem;
import com.nico.store.store.domain.User;
@EntityGraph(attributePaths = { "article" })
List<CartItem> findAllByUserAndOrderIsNull(User user);
ArticleRepository.java:-
package com.nico.store.store.repository;
import com.nico.store.store.domain.Article;
70 | P a g e
SERVICE :
UserService.java:-
package com.nico.store.store.service;
import java.util.List;
import com.nico.store.store.domain.User;
ShoppingCartService.java:-
package com.nico.store.store.service; import
com.nico.store.store.domain.Article;
import com.nico.store.store.domain.CartItem; import
com.nico.store.store.domain.ShoppingCart; import
com.nico.store.store.domain.User;
getItemsNumber(User user);
CartItem addArticleToShoppingCart(Article article, User user, int qty, String size); void
clearShoppingCart(User user);
removeCartItem(CartItem cartItem);
71 | P a g e
OrderService.java:-
package com.nico.store.store.service;
import java.util.List;
ArticleService.java:-
package com.nico.store.store.service;
import java.util.List;
interface ArticleService {
List<Article> findAllArticles();
List<Article> findFirstArticles();
List<String> getAllSizes();
List<String> getAllCategories();
List<String> getAllBrands();
72 | P a g e
Application.properties:-
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
spring.datasource.username=sa spring.datasource.password=sa
spring.jpa.hibernate.dialect=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.hibernate.show_sql=true
spring.jpa.hibernate.hbm2ddl.auto=create-drop
Error.html:-
<!doctype html>
<html lang="en" xmlns:th="http://www.w3.org./1999/xhtml">
<head th:replace="common/header :: common-header" />
<body>
<div class="container">
<div class="text-center">
<h1>Something went wrong!</h1>
<a href="/" class="btn btn-primary btn-lg my-3">Go Home</a>
</div>
<table class="table">
<tr>
<td>Error</td>
<td th:text="${error}"/>
</tr>
<tr>
<td>Status</td>
<td th:text="${status}"/>
</tr>
<tr>
<td>Path</td>
<td th:text="${path}"/>
</tr>
<tr>
<td>Date</td>
<td th:text="${timestamp}"/>
</tr>
<tr>
<td>Message</td>
<td th:text="${message}"/>
</tr>
</table>
</div>
</body>
</html>
73 | P a g e
Header.html:-
<!doctype html>
<html lang="en" xmlns:th="http://www.w3.org./1999/xhtml"
xmlns:sec="http://www.w3.org./1999/xhtml">
<head th:fragment="common-header">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<title>ShoeShop</title>
<link rel="icon" href="/image/icon-logo.png">
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Nunito|Roboto|Roboto+Condensed|
Roboto+Slab" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="/css/bootstrap.min.css" rel="stylesheet">
<!-- Tables plugin -->
<link href="/css/datatables.min.css" rel="stylesheet">
<!-- Bootstrap tagsinput -->
<link href="/css/tagsinput.css" rel="stylesheet">
<!-- Simple pagination -->
<link href="/css/simplePagination.css" rel="stylesheet" />
<!-- Slick carousel -->
<link href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css" rel="stylesheet" />
<link href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick-theme.css" rel="stylesheet" />
<!-- Custom styles -->
<link href="/css/style.css" rel="stylesheet">
<!-- Feather icons -->
<script src="https://unpkg.com/feather-icons"></script>
</head>
<body>
<div th:fragment="navbar">
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-top shadow-sm">
<a class="navbar-brand" th:href="@{/}"><img width="150" height="30"
src="/image/logo.png"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarCollapse" aria-controls="navbarCollapse"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto font-weight-bold">
<li class="nav-item">
<a class="nav-link" th:href="@{/}"> Home</a>
</li>
<li class="nav-item">
<a class="nav-link" th:href="@{/store}"> Store </a>
</li>
<li class="nav-item">
<a class="nav-link" th:href="@{/shopping-cart/cart}">Shopping Cart
<span class="badge badge-primary badge-pill" style="vertical-align: top;" th:text="$
{shoppingCartItemNumber} > 0 ? ${shoppingCartItemNumber}"></span></a>
</li>
</ul>
<ul class="navbar-nav ml-auto font-weight-bold">
74 | P a g e
<li class="nav-item">
<a class="nav-link" sec:authorize="isAnonymous()" th:href="@{/login}">My Account </a>
</li>
<li class="nav-item">
<a class="nav-link" sec:authorize="isAuthenticated()" th:href="@{/my-profile}">My
Account</a>
</li>
<li class="nav-item">
<a class="nav-link" sec:authorize="isAuthenticated()" th:href="@{/logout}"> Log Out </a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" sec:authorize="hasRole('ADMIN')" th:href="@{/article/article-
list}"> ADMIN PORTAL</a>
</li>
</ul>
</div>
</nav>
</div>
<div th:fragment="footer">
<div class="footer mt-5">
<div class="container mt-4">
<div class="row">
<div class="col-sm-6 col-lg-3 text-center pr-5">
<h5 class="font-weight-bold">SUBSCRIBE</h5>
<p>to our Newsletter to receive the latest news, sales and promos</p>
<form>
<div class="form-group">
<input type="email" class="form-control rounded-pill text-center footer-input"
placeholder="Enter your email">
</div>
<button type="button" class="btn btn-primary btn-block rounded-pill">SUBSCRIBE</button>
</form>
</div>
<div class="col-6 col-lg-3 pl-3">
<h6 class="font-weight-bold">Customer Service</h6>
<div class="list-group list-group-flush list-group-no-border list-group-sm">
<a href="javascript:void(0)" class="list-group-item list-group-item-action">Help Center</a>
<a href="javascript:void(0)" class="list-group-item list-group-item-action">How to buy</a>
<a href="javascript:void(0)" class="list-group-item list-group-item-action">Delivery</a>
<a href="javascript:void(0)" class="list-group-item list-group-item-action">How to return</a>
<a href="javascript:void(0)" class="list-group-item list-group-item-action">Payment
Method</a>
<a href="javascript:void(0)" class="list-group-item list-group-item-action">Shipping
Method</a>
</div>
</div>
<div class="col-6 col-lg-3 pl-3">
<h6 class="font-weight-bold">ShoeShop</h6>
<div class="list-group list-group-flush list-group-no-border list-group-sm">
<a href="javascript:void(0)" class="list-group-item list-group-item-action">About Us</a>
<a href="javascript:void(0)" class="list-group-item list-group-item-action">Terms and
Conditions</a>
<a href="javascript:void(0)" class="list-group-item list-group-item-action">Privacy Policy</a>
<a href="javascript:void(0)" class="list-group-item list-group-item-action">FAQs</a>
<a href="javascript:void(0)" class="list-group-item list-group-item-action">Our Story</a>
<a href="javascript:void(0)" class="list-group-item list-group-item-action">Services</a>
</div>
75 | P a g e
</div>
<div class="col-sm-6 col-lg-3 pl-3">
<h6 class="font-weight-bold ">Contact us</h6>
<div class="list-group list-group-flush list-group-no-border list-group-sm">
<span class="list-group-item"><strong>Phone:</strong>9777386961</span>
<span class="list-group-item"><strong>Email:</strong> contact@shoeshop.com</span>
<span class="list-group-item"><strong>Mon-Fri:</strong> 9.00 am - 8.00 pm</span>
<span class="list-group-item"><strong>Saturday:</strong> 10.00 am - 6.00 pm</span>
</div>
</div>
</div>
</div>
</div>
<div class="copyright">Copyright © 2022 Shoeshop All rights reserved</div>
</div>
<div th:fragment="body-scripts">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-
q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script>
window.jQuery
|| document
.write('<script src="/docs/4.3/assets/js/vendor/jquery-slim.min.js"><\/script>')
</script>
<script src="/js/bootstrap.bundle.min.js"></script>
<script src="/js/datatables.min.js"></script>
<script src="/js/tagsinput.js"></script>
<script>feather.replace()</script>
<script type="text/javascript" src="/js/jquery.simplePagination.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/slick-
carousel@1.8.1/slick/slick.min.js"></script>
<script>
//prevent multiple form submission
$(function() {
$('form').submit(function(){
$("button[type='submit']", this)
.text("Please Wait...")
.attr('disabled', 'disabled');
return true;
});
});
</script>
</div>
</body>
</html>
76 | P a g e
CHAPTER-14
OUTPUT SCREEN
77 | P a g e
14. OUPUT SCREEN:-
HOME PAGE
78 | P a g e
STORE PAGE
ARTICLE PAGE
79 | P a g e
SHOPPING CART PAGE
REVIEW ITEM
PAYMENT PAGE
80 | P a g e
LOGIN PAGE
PROFILE PAGE
81 | P a g e
ADMIN PAGE
82 | P a g e
CHAPTER-15
CONCLUSION AND FUTURE SCOPE
83 | P a g e
15. Conclusion of the Project Online Shoes Store:
Our project is only a humble venture to satisfy the needs to manage their project work.
Several user friendly coding have also adopted. This package shall prove to be a powerful
package in satisfying all the requirements of the school. The objective of software planning is
to provide a frame work that enables the manger to make reasonable estimates made within a
limited time frame at the beginning of the software project and should be updated regularly as
the project progresses.
A description of the background and context of the project and its relation to work
already done in the area.
Made statement of the aims and objectives of the project.
The description of Purpose, Scope, and applicability.
We define the problem on which we are working in the project.
We describe the requirement Specifications of the system and the actions that
can be done on these things.
We understand the problem domain and produce a model of the system,
which describes operations that can be performed on the system.
We included features and operations in detail, including screen layouts.
We designed user interface and security issues related to system.
Finally the system is implemented and tested according to test cases.
84 | P a g e
CHAPTER-16
REFERNECE
85 | P a g e
16. Reference:
Spring boot:
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/
https://docs.spring.io/spring-boot/docs/2.1.6.RELEASE/reference/html/index.html
Thymeleaf:
https://www.thymeleaf.org/documentation.html
https://frameworks.readthedocs.io/en/latest/spring-boot/SpringBootServlet.html
https://www.baeldung.com/thymeleaf-in-spring-mvc
Java and Software Design Concepts by Après
https://www.tutorialspoint.com/java/
http://www.javatpoint.com/java-tutorial
https://docs.oracle.com/javase/tutorial/
http://www.wampserver.com/en/
http://www.JSP.net/
http://www.tutorialspoint.com/mysql/
httpd.apache.org/docs/2.0/misc./tutorials.html
86 | P a g e