Anmol 2019 22
Anmol 2019 22
(E-commerce Website)
A PROJECT REPORT
Submitted in Partial Fulfilment for the award of the degree
of
MASTER OF COMPUTER APPLICATIONS
(M.C.A)
Submitted by
Anmol Bandooni
1900380140004
Anmol Bandooni
1900380140004
MCA-VI Semester
b
ACKNOWLEDGEMENT
I would like to express thanks to Prof. Puja Dhar for her guidance and
cooperation render for following me to undergo training under his guidance I’m
also thanks to all the other staff of college who had helped me in spite of their busy
schedule.
Anmol Bandooni
1900380140004
MCA-VI Semester
c
Certificate
d
TABLE OF CONTENT
1. Introduction 1
1.1 Objective 1
2. System Analysis 3
3 System Design 14
e
3.5 Sequence Diagram 22-24
5 Testing 79
6 Software Maintenance 88
8 References 90
f
Introduction
1.1 Overview
E-commerce is fast gaining ground as an accepted and used business paradigm. More and
more business houses are implementing web sites providing functionality for performing
commercial transactions over the web. It is reasonable to say that the process of shopping
on the web is becoming commonplace.
The objective of this project is to develop a general-purpose e-commerce store where any
product (such as books, CDs, computers, mobile phones, electronic items, and home
appliances) can be bought from the comfort of home through the Internet. However, for
implementation purposes, this paper will deal with an online ecommerce store.
An online store is a virtual store on the Internet where customers can browse the catalog
and select products of interest. The selected items may be collected in a shopping cart. At
checkout time, the items in the shopping cart will be presented as an order. At that time,
more information will be needed to complete the transaction.
Usually, the customer will be asked to fill or select a billing address, a shipping address, a
shipping option, and payment information such f as a credit card number.
1.3 Project Planning
Project planning is part of project management, which relates to the use of schedules such
as Gantt charts to plan and subsequently report progress within the project environment.
Initially, the project scope is defined and the appropriate methods for completing the
project are determined. Following this step, the durations for the various tasks necessary to
complete the work are listed and grouped into a work breakdown structure. The logical
dependencies between tasks are defined using an activity network diagram that enables
identification of the critical path. Float or slack time in the schedule can be calculated
using project management software. Then the necessary resources can be estimated and
costs for each activity can be allocated to each resource, giving the total project cost. At
this stage, the project plan may be optimized to achieve the appropriate balance between
resource usage and project duration to comply with the project objectives. Once
established and agreed, the plan becomes what is known as the baseline. Progress will be
measured against the baseline throughout the life of the project
1.4 Purposes
The project is about to handle all the information of the shop regarding members. Also it
manages resources which were managed and handled by manpower previously. The main
purpose of the project is to integrate distinct sections of the shop into consistent manner so
that complex functions can be handled smoothly. The project aims at the following matters
∙ Buying products.
∙ To manage information of different types of items.
∙ Consistently update information of all the item.
∙ Managing security by providing authorized email & password.
Manages database efficiently.
f
Chapter Two
System Design
2.1 Design
The system is divided into some parts these are Register system, Login System, Search
System, Buying System, Order Received System, Viewing System side with database
represent the server using React.js , NOSQL and FIREBASE server. System diagram and
system database diagram illustrated in figure.
f
2.2 User Characteristics
Admin The administrator has all the rights to access the system. He is the one who has all
rights to view the members and product details, modify those details. He can add various
product based on the category. He can also set the available quantity of a product and its
reasonable price. Also he can also set discount in various occasion. Admin can also view
the details of a member. The admin have the power to generate the scratch card so that
users can also use the recharge card to buy various product.
Users The user can log in to the system by using his specific email and password. User can
view the products and order the products according to their own needs. He can view his
profile and update
his details. He can update his personal information by logging into the system. User can
find various product by using search option easily. update his details. He can update his
personal information by logging into the system. User can find various product by using
search option easily.
This system is an automated Shop Management System. Through the software user can add
members, add product, search product, update information, edit information, buy the
product in quick time. The system has the following advantages:
f
2.4 System Analysis
System Analysis refers into the process of examining a situation with the intent of
improving it through better procedures and methods. System Analysis is the process of
planning a new system to either replace or complement an existing system. But before any
planning is done the old system must be thoroughly understood and the requirements
determined. System analysis is therefore, the process of gathering and interpreting facts,
diagnosing problems and using the information to re comment improvements in the system.
System analysis is conducted with the following objectives in mind:
work.
Whatever we think need not be feasible .It is wise to think about the feasibility of any
problem we undertake. Feasibility is the study of impact, which happens in the
organization by the development of a system. The impact can be either positive or
negative. When the positives nominate the negatives, then the system is considered
feasible. Here the feasibility study can be performed in two ways such as technical
feasibility and Economical Feasibility.
Technical Feasibility
It is technically feasible, since there will not be much difficulty in getting required
resources for the development and maintaining the system as well. All the resources
needed for the development of the software as well as the maintenance.
Economical Feasibility
f
Chapter Three
Hardware and Software Requirement
f
Chapter Four
4.1 Tools
✔ HTML
✔ CSS
✔ Javascript
✔ React.js
✔ Next.Js
✔ NoSQL
4.2 HTML
Every webpage you look at is written in a language called HTML. You can think of
HTML as the skeleton that gives every webpage structure. In this course, we'll use
HTML to add paragraphs, headings, images and links to a webpage.
4.3 CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing the
presentation of a document written in a markup language. Most often used to set the
visual style of web pages and user interfaces written in HTML and XHTML, and is
applicable to rendering in speech, or on other media. Along with HTML and
JavaScript, CSS is a cornerstone technology used by most websites to create visually
engaging webpages, user interfaces for web applications, and user interfaces for many
mobile applications.
CSS is designed primarily to enable the separation of document content from
document presentation, including aspects such as the layout, colors, and fonts. This
separation can improve content accessibility, provide more flexibility and control in
the specification of presentation characteristics, enable multiple HTML pages to share
formatting by specifying the relevant CSS in a separate .CSS file, and reduce
complexity and repetition in the structural content.
f
4.4 JAVASCRIPT
4.5 REACT.JS
React is a free and open-source front-end JavaScript library for building user interfaces or
UI components. It is maintained by Facebook and a community of individual developers
and companies. React can be used as a base in the development of single-page or mobile
applications.
4.6 NEXT.JS
Next.js is an open-source React front-end development web framework created by Vercel
that enables functionality such as server-side rendering and generating static websites for
React based web applications.Next.js aims to have best-in-class developer experience and
many built-in features, such as:
Document databases are primarily built for storing information as documents, including,
but not limited to, JSON documents. These systems can also be used for storing XML
documents, for example.
Key-value stores group associated data in collections with records that are identified with
unique keys for easy retrieval. Key-value stores have just enough structure to mirror the
value of relational databases while still preserving the benefits of NoSQL.
Wide-column databases use the tabular format of relational databases yet allow a wide
variance in how data is named and formatted in each row, even in the same table. Like key-
value stores, wide-column databases have some basic structure while also preserving a lot
of flexibility.
Graph databases use graph structures to define the relationships between stored data
points. Graph databases are useful for identifying patterns in unstructured and semi-
structured information.
f
Chapter Five
Database files are the key source of information into the system. It is the process of
designing database files, which are the key source of information to the system. The
files should be properly designed and planned for collection, accumulation, editing
and retrieving the required information.
✔ Data integration
✔ Data integrity
✔ Data independence
f
5.5 Product Table
f
5.7 Brand Table
5.8Cart Table
f
Chapter Six
f
6.2 Shop Page
f
6.5 Checkout page
f
6.6 User Login page
f
6.7 User Registration page
f
6.8 Admin Login page
f
6.10 ADMIN DASHBOARD
f
6.13Add Discount page
f
6.15Order List page
f
CODING
Store.js
import { configureStore } from "@reduxjs/toolkit";
import basketReducer from "../slices/basketSlice";
function Banner() {
return (
<div className="relative">
<div className="absolute w-full h-32 bg-gradient-to-t from-gray-100 to-transparent bottom-0 z-20" />
<Carousel
autoPlay
infiniteLoop
showStatus={false}
showIndicators={false}
showThumbs={false}
interval={5000}
>
<div>
<img loading="lazy" src="https://links.papareact.com/7ma" alt="" />
</div>
<div>
<img loading="lazy" src="https://links.papareact.com/6ff" alt="" />
</div>
<div>
<img loading="lazy" src="https://links.papareact.com/gi1" alt="" />
</div>
</Carousel>
</div>
)
}
30
export default Banner
CheckoutProduct.js
import { StarIcon } from "@heroicons/react/solid"
import Image from "next/image";
import Currency from 'react-currency-formatter';
import { addToBasket, removeFromBasket } from "../slices/basketSlice";
import { useDispatch } from "react-redux";
function CheckoutProduct( {
id,
title,
price,
rating,
description,
category,
image,
hasPrime,
}){
const dispatch = useDispatch();
{hasPrime && (
<div className="flex items-center space-x-2">
<img
loading="lazy"
img className="w-12"
src="https://links.papareact.com/fdw" alt="" />
<p className="text-xs text-gray-500">Free Next-day delivery</p>
</div>
)}
</div>
<div className="flex flex-col space-y-2 my-auto justify-self-end">
<button onClick={addItemToBasket} className="mt-auto button">Add to Basket</button>
<li>
<Link href="">
<a className="text-xs lg:text-sm leading-none hover:text-brand dark:hover:text-
brand text-gray-800 dark:text-gray-50">About Us</a>
</Link>
</li>
32
<li className="mt-6">
<Link href="">
<a className="text-xs lg:text-sm leading-none hover:text-brand dark:hover:text-
brand text-gray-800 dark:text-gray-50">Careers</a>
</Link>
</li>
<li className="mt-6">
<Link href="">
<a className="text-xs lg:text-sm leading-none hover:text-brand dark:hover:text-
brand text-gray-800 dark:text-gray-50">Gift Cards</a>
</Link>
</li>
<li className="mt-6">
<Link href="">
<a className="text-xs lg:text-sm leading-none hover:text-brand dark:hover:text-
brand text-gray-800 dark:text-gray-50">100% Purchase Protection</a>
</Link>
</li>
<li className="mt-6">
<a href="" className="text-xs lg:text-sm leading-none hover:text-brand
dark:hover:text-brand text-gray-800 dark:text-gray-50">
Advertise Your Products
</a>
</li>
</ul>
</div>
<div className="w-full lg:w-1/2 px-6">
<ul>
<li>
<Link href="">
<a className="text-xs lg:text-sm leading-none hover:text-brand dark:hover:text-
brand text-gray-800 dark:text-gray-50">Free components</a>
</Link>
</li>
<li className="mt-6">
<Link href="">
<a className="text-xs lg:text-sm leading-none hover:text-brand dark:hover:text-
brand text-gray-800 dark:text-gray-50">Blog</a>
</Link>
</li>
<li className="mt-6">
<Link href=")">
<a className="text-xs lg:text-sm leading-none hover:text-brand dark:hover:text-
33
brand text-gray-800 dark:text-gray-50">Changelog</a>
</Link>
</li>
</ul>
</div>
</div>
<div className="w-full lg:w-1/2 flex">
<div className="w-full lg:w-1/2 px-6">
<ul>
<li>
<a href="" className="text-xs lg:text-sm leading-none hover:text-brand
dark:hover:text-brand text-gray-800 dark:text-gray-50">
Privacy policy
</a>
</li>
<li className="mt-6">
<Link href="">
<a className="text-xs lg:text-sm leading-none hover:text-brand dark:hover:text-
brand text-gray-800 dark:text-gray-50">Terms of service</a>
</Link>
</li>
</ul>
</div>
<div className="w-full lg:w-1/2 px-6 flex flex-col justify-between">
<div className="flex items-center mb-6">
<a href="javascript:void(0)">
<div className="text-gray-800 dark:text-gray-50 cursor-pointer hover:text-brand
dark:hover:text-brand ">
<svg className="footer-icon feather feather-github"
xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35
6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7
0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0
9 18.13V22"></path>
</svg>
</div>
</a>
<a href="javascript:void(0)">
<div className="pl-4">
<svg className="footer-icon feather feather-twitter text-gray-800 dark:text-gray-
50 cursor-pointer hover:text-brand dark:hover:text-brand " xmlns="http://www.w3.org/2000/svg" width={24}
height={24} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"
strokeLinejoin="round">
34
<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66
10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z" />
</svg>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div className="py-16 flex flex-col justify-center items-center">
Header.js
import Image from "next/image";
import {
MenuIcon,
SearchIcon,
ShoppingCartIcon
} from "@heroicons/react/outline";
import { signIn, signOut, useSession } from 'next-auth/client'
import { useRouter } from 'next/router';
import { useSelector } from "react-redux";
import {selectItems} from "../slices/basketSlice"
function Header() {
const [ session ] = useSession();
const router = useRouter();
const items = useSelector(selectItems);
return (
<header>
</div>
{/* Bottom nav */}
<div className="flex space-x-3 p-2 pl-6 items-center bg-amazon_blue text-yellow-600 text-sm">
36
<p className="link flex items-center">
<MenuIcon className="h-6 mr-1"/>
All
</p>
<p className="link">Prime Video</p>
<p className="link">Amazon Business</p>
<p className="link">Today's deals</p>
<p className="link hidden lg:inline-flex">Electronics</p>
<p className="link hidden lg:inline-flex">Food & Grocery</p>
<p className="link hidden lg:inline-flex">Electronics</p>
<p className="link hidden lg:inline-flex">Prime</p>
<p className="link hidden lg:inline-flex">Buy again</p>
<p className="link hidden lg:inline-flex">Shopping Toolkit</p>
<p className="link hidden lg:inline-flex">Mens & Womens</p>
</div>
</header>
)
}
Order.js
import moment from 'moment'
import Currency from 'react-currency-formatter';
37
<p className="absolute top-2 right-2 w-40 lg:w-72 truncate text-xs whitespace-nowrap">Order #
{id}</p>
</div>
Product.js
import Image from "next/image";
import {useState} from "react";
import {StarIcon} from "@heroicons/react/solid"
import Currency from 'react-currency-formatter';
import { addToBasket } from "../slices/basketSlice";
import { useDispatch } from "react-redux";
function Product({id,title,price,description,category,image}) {
const dispatch = useDispatch()
const MAX_RATING = 5
const MIN_RATING = 1
const [rating] =useState(
Math.floor(Math.random() * (MAX_RATING - MIN_RATING + 1)) + MIN_RATING
);
const [hasPrime] = useState(Math.random() < 0.5 );
const addItemToBasket = () => {
const product = {id, title, price,rating, description,category, image ,hasPrime};
//sending the product as an action to the REDUX STORE ..the basket slice
dispatch(addToBasket(product));
};
return (
<div className="relative flex flex-col m-5 border-2 border-yellow-500 bg-white text-black z-30 p-10
transition duration-500 ease-in-out transform hover:-translate-y-1 hover:scale-110 ... " >
<p className="absolute top-2 right-2 text-xs italic text-gray-400">{category}</p>
<Image src={image}
38
width={200}
height={200}
objectFit="contain"/>
<h4 className="my-3">{title}</h4>
<div className="flex">
{Array(rating).fill().map((_, index) => (
<StarIcon key={index} className="h-5 text-yellow-500" />
))}
</div>
<p className="text-xs my-2 line-clamp-2 ">{description}</p>
<div className="mb-5">
<Currency quantity={price *73} currency="INR" />
</div>
{hasPrime && (
<div className="flex items-center space-x-2 -mt-5">
<img className="w-12" src ="https://links.papareact.com/fdw" alt="" />
<p className="text-xs text-gray-500">FREE Next-Day Delivery</p>
</div>
)}
<button onClick={addItemToBasket} className="mt-auto button">Add To Basket</button>
</div>
)
}
ProductFeed.js
import Product from "./Product"
{products.slice(0,4)
.map(({id,title,price,description,category,image}) => (
<Product
key={id}
id={id}
title={title}
price={price}
39
description={description}
category={category}
image={image}
/>
))}
<div className="md:col-span-2">
{products.slice(4,5)
.map(({id,title,price,description,category,image}) => (
<Product
key={id}
id={id}
title={title}
price={price}
description={description}
category={category}
image={image}
/>
))}
</div>
{products.slice(5,products.length)
.map(({id,title,price,description,category,image}) => (
<Product
key={id}
id={id}
title={title}
price={price}
description={description}
category={category}
image={image}
/>
))}
</div>
);
}
export default ProductFeed;
40
QuantityCount.js
import styles from '../styles/QuantityCount.module.css'
import { updateQuantity } from "../slices/basketSlice";
import { useDispatch } from 'react-redux';
return (
<div className={styles.quantityCount}>
<button onClick={decreaseCount} className={styles.actionBtn}>-</button>
<div className={styles.counter}>{quantity}</div>
<button onClick={increaseCount} className={styles.actionBtn}>+</button>
</div>
)
}
QuickView.js
import { useEffect, useState } from "react"
41
import { useDispatch } from "react-redux"
import { addToBasket } from "../slices/basketSlice"
import styles from "../styles/Product.module.css"
import { StarIcon } from "@heroicons/react/solid"
import Currency from 'react-currency-formatter';
import QuantityCount from "./QuantityCount"
import { useRouter } from 'next/router';
const MAX_RATING = 5
const MIN_RATING = 1
const [rating] = useState(
Math.floor(Math.random() * (MAX_RATING - MIN_RATING + 1)) + MIN_RATING
)
</>
)
}
Slidebar.js
// .sidebar {
// min-width: 5rem;
// width: clamp(80px,10vw,100px);
// height: 100vh;
// position: fixed;
// z-index: 99;
// top: 0;
// left: 0;
// box-shadow: 0 0 1rem rgb(26 26 44 / 5%);
// background: #fff;
// display: flex;
// flex-flow: column nowrap;
// justify-content: space-between;
// align-items: center;
// padding: 3rem 0;
// }
// *, :after, :before {
// box-sizing: border-box;
// margin: 0;
// }
// .sidebar {
// min-width: 5rem;
// width: clamp(80px,10vw,100px);
// height: 100vh;
// position: fixed;
// z-index: 99;
// top: 0;
// left: 0;
// box-shadow: 0 0 1rem rgb(26 26 44 / 5%);
// background: #fff;
// display: flex;
// flex-flow: column nowrap;
44
// justify-content: space-between;
// align-items: center;
// padding: 3rem 0;
45
Chapter Seven
Software Testing
If testing is conducted successfully (according to the objectives stated previously) it will uncover errors in
the software. As a secondary benefit, testing demonstrates that software functions appear to be working
according to specification, that behavioral and performance requirements appear to have been met. In
addition, data collected as testing is conducted provide a good indication of software reliability and some
indication of software quality as a whole. But testing cannot show the absence of errors and defects, it can
show only that software errors and defects are present. It is important to keep this (rather gloomy)
statement in mind as testing is being conducted.
While deciding on the focus of testing activities, study project priorities. For example, for an on line system,
pay more attention to response time. Spend more time on the features used frequently. Decide on the effort
required for testing based on the usage of the system. If the system is to be used by a large number of users,
evaluate the impact on users due to a system failure before deciding on the effort.
46
The purpose of the system testing is to consider all the likely variations to which it will be suggested and
push the systems to limits. The testing process focuses on the logical intervals of the software ensuring that
all statements have been tested and on functional interval is conducting tests to
uncover errors and ensure that defined input will produce actual results that agree with the required results.
Program level testing, modules level testing integrated and carried out.
a) All independent paths within a module have been exercised once. In our system, ensuring that case
was selected and executed checked all case structures. The bugs that were prevailing in some part of
the code where fixed
b) All logical decisions were checked for the truth and falsity of the values.
Black box testing focuses on the functional requirements of the software. This is black box testing enables
the software engineering to derive a set of input conditions that will fully exercise all functional
requirements for a program. Black box testing is not an alternative to white box testing rather it is
complementary approach that is likely to uncover a different class of errors that white box methods like.
✔ Interface errors.
✔ Performance in data structure.
✔ Performance errors.
✔ Initializing and termination errors.
47
Chapter Eight
8.1 Conclusion
This project is only a humble venture to satisfy the needs in a shop. Several user friendly coding have also
adopted. This package shall prove to be a powerful package in satisfying all the requirements of the
organization. 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.
This website provides a computerized version of shop manipulate system which will benefit the users as
well as the visitor of the shop. It makes entire process online where users can add product, and buy
various product. It also has a facility for common user by login into the system where user can login and
can see status of ordered item. It provide the facility of admin’s login where admins can review users
activity and also give occasional discount and also add info about different events for the customer.
The project has a very vast scope in future. Project can be updated in near future as and when requirement
for the same arises, as it is very flexible in terms of expansion. With the proposed software of database
Space Manager ready and fully functional the client is now able to manage and hence run the entire work in
a much better, accurate and error free manner.
48