Professional Documents
Culture Documents
Online Pet Shop (SEM4)
Online Pet Shop (SEM4)
B.P.H.E Society’s
Institute Of Management Studies (Career Development & Research)
2
PROJECT REPORT
ON
Submitted to
In Partial Fulfillment of
By
Guided By
2023-2024
INDEX
Chapter Page
Details
No No
1 Introduction 4
3
1.1 Abstract 5
1.2 Scope of the System 6
1.3 Operating Environment 7
Brief Description of Technology & Operating
1.4 8
System Used
2 Proposed System 16
2.1 Study of Similar System 18
2.2 Users of the System 19
3 Analysis and Design 21
System Requirements (Functional and Non-
3.1 22
Functional requirements)
3.2 Entity Relationship Diagram (ERD) 24
3.3 Table Structure 25
3.4 Use Case Diagram 28
3.5 Class Diagram 29
3.6 Activity Diagram 30
3.7 Deployment Diagram 34
Sample Input and Output Screens (Screens must
3.7 have valid data. All reports must have at-least 5 35
valid records.)
4 Coding 38
4.1 Algorithms 41
4.2 Code Snippets 45
4
5 Testing 55
5.1 Test Strategy 56
5.2 Unit Test Plan 57
5.3 Test Case / Test Snippet 60
5.4 Defect Report / Test Log 64
6 Limitations of Proposed System 67
7 Proposed Enhancements 68
8 Conclusion 69
9 Bibliography 72
User Manual (All screens with proper
10 description/purpose Details about validations 74
related to data to be entered.)
5
CHAPTER 1
INTRODUCTION
6
1.1 Abstract
The rapid growth of the e-commerce industry has extended its reach to various
niche markets, and the pet industry is no exception. This project aims to develop a
comprehensive online pet shop platform using the MERN (MongoDB, Express.js,
React, Node.js) stack. The platform will provide a seamless and user-friendly
experience for pet enthusiasts to browse, select, and purchase a wide range of pet
products.
7
1.2 Scope
The Online Pet Shop boasts a sleek user interface, providing users with an
enhanced visual and navigational experience. The system encompasses a diverse
array of products, complete with up-to-date pricing, discounts, and additional
details, empowering users to select the ideal package that aligns with their
expectations. Primarily designed to facilitate seamless product orders, the platform
offers a range of items such as treats, dresses, toys, and more.
Hardware Requirement:
Software Requirement:
Used
React JS : -
The library's core concept revolves around unidirectional data flow, promoting a
clear and predictable state management system. React's JSX syntax simplifies the
creation of UI components, combining HTML-like code within JavaScript for a
more intuitive and expressive development experience.React.js supports a "learn
once, write anywhere" philosophy, enabling developers to apply their knowledge
across different platforms. It seamlessly integrates with various tools and libraries,
fostering a vibrant ecosystem. React's one-way data binding ensures a single
source of truth for data, enhancing maintainability in complex applications.
React.js embraces a "write less, do more" approach, reducing boilerplate code and
promoting code reusability. It empowers developers to efficiently manage state and
props, leading to more maintainable and scalable applications. In summary,
React.js stands as a versatile and efficient library, transforming the landscape of
front-end development by offering a powerful, component-based approach that
enhances the building and maintenance of complex user interfaces.
Express JS: -
Known for its speed and simplicity, Express.js is suitable for both small projects
and large-scale applications. It leverages the asynchronous nature of Node.js,
making it efficient in handling multiple concurrent connections. With a large and
active community, Express.js benefits from a wealth of third-party middleware and
extensions available via npm (Node Package Manager). This ecosystem accelerates
development by providing pre-built solutions for common tasks. In essence,
Express.js serves as a powerful and lightweight framework that empowers
developers to build scalable and maintainable web applications with ease, making
it a popular choice in the Node.js ecosystem.
JavaScript: -
Less server interaction − you can validate user input before sending the page off to
the server. This saves server traffic, which means less load on your server.
Immediate feedback to the visitors − they don't have to wait for a page reload to
see if they have forgotten to enter something. Increased interactivity − you can
create interfaces that react when the user hovers over them with a mouse or
activates them via the keyboard. Richer interfaces − you can use
JavaScript to include such items as drag-and-drop components and
sliders to give a Rich Interface to your site visitors
Node JS: -
Node.js boasts a vast ecosystem of packages managed by npm. With a large and
active community, developers benefit from ongoing support and collaboration. Its
cross-platform compatibility (Windows, macOS, Linux) enhances versatility. The
lightweight architecture contributes to its efficiency. Node.js leverages the V8
engine for speedy execution of JavaScript code. Its non-blocking nature suits real-
time applications, fostering responsiveness. The runtime supports modular
development through its module system. Node.js has become a popular choice for
modern web application development. Developers can deploy Node.js applications
14
on various hosting platforms. Its unified language and data format streamline the
development process. Node.js continues to evolve with regular updates and
improvements. The community-driven approach contributes to its vibrancy and
innovation.
Mongo DB: -
MongoDB is a popular and open-source NoSQL database management system
designed for efficient and flexible data storage. It falls under the category of
document-oriented databases, utilizing a JSON-like format known as BSON
(Binary JSON) to store data in flexible, schema-less collections. MongoDB is
particularly well-suited for handling large amounts of unstructured or semi-
structured data.
One of MongoDB's strengths lies in its dynamic schema, allowing for the storage
of documents with varying structures within the same collection. This flexibility
makes it well-suited for applications where data models evolve over time or vary
across different instances.
Developers often appreciate MongoDB for its ease of use and integration with
various programming languages. It provides official drivers for popular languages
like JavaScript, Python, Java, and others, simplifying the process of building
applications that interact with the database.
Overall, MongoDB is a robust and scalable NoSQL database solution that has
gained wide spread adoption for its flexibility, performance, and ease of
development. It is suitable for a variety of applications, including those
requiring quick iteration, scalability, and support for diverse data types.
Postman: -
Postman is a widely-used API development and testing tool, simplifying
interactions with APIs through a user-friendly interface. It supports various HTTP
16
request types and enables the creation of collections for organized API testing.
Postman's robust environment allows customization of headers, parameters, and
authentication methods.
The tool includes built-in testing features for creating automated test scripts to
ensure API reliability. It facilitates the import and export of API requests,
promoting collaboration among developers and teams. Postman offers both
desktop and web versions for flexible usage preferences. It is instrumental in
designing, testing, and documenting APIs efficiently.
17
CHAPTER - 2
PROPOSED SYSTEM
18
2. Proposed System
The Online Pet Shop project aims to simplify the process of acquiring pets by
today's digital age, where the internet is a primary communication medium, the
By harnessing the power of the web, our goal is to offer a seamless and
accessible experience for users seeking their ideal pets. The platform transcends
The project focuses on creating a dynamic online space where users can
easily explore various pet categories, access pricing information, and connect with
sellers. Beyond simplifying the pet acquisition process, the platform aims to foster
modernize and enhance the pet adoption experience, making it more accessible and
Admin :-
Dashboard: - In this section, admin can see all detail in brief like
total number of users, Total no of Categories, Total Products, Total
Orders.
Manage Account: - In this section, admin can edit his details.
Manage Products: - In this section, admin can add new products
and update existing products.
Manage Users: - In this section, admin can edit user details and
delete users.
21
CHAPTER - 3
Functional Requirements :-
User: -
Admin: -
Orders: - Admin can view Orders and can edit or delete them.
Order Details: - Admin can view order details and can edit or delete them.
24
Non-Functional Requirements: -
Usability: The system should be easy to use for even a non-technical user. User
should quickly perform task in system. A simple but quality user interface should
be developed to make it easy to understand.
Security: The subsystem should provide a high level of security and integrity of
the data held by the system, only authorized personnel of the company can gain
access to the company's secured page on the system; and only users with valid
password and username can login to view user's page.
Performance: For increasing the traffic on your system, you have to give special
attention to the performance.
25
ContactsUs.jsx:
Product:
Healthcare:
User.jsx:
Deliveryaddresess .jsx:
Registration
32
Login:-
33
Order: -
Dashboard.js
39
CHAPTER - 4
CODING
40
App.js
import { BrowserRouter, Routes, Route, Navigate } from
"react-router-dom";
import React, { useState } from "react";
import Login from "./Pages/Login/Login";
import Signup from "./Pages//Signup/Signup";
import Dashboard from "./Pages/Dashboard/Dashboard";
import Home from "./Pages/Home";
import ContactUs from "./Pages/ContactUs";
import VetAppointment from "./Pages/VetAppointment";
import Main from "./Pages/Main";
import Product from "./Pages/Product";
import HealthCare from "./Pages/HealthCare";
import Cart from "./Pages/Cart";
import DeliveryAdd from "./Pages/Proceedtobuy/deliveryadd";
import Payment from "./Pages/Proceedtobuy/payment";
import Bill from "./Pages/Proceedtobuy/bill";
import Ordered from "./Pages/Proceedtobuy/ordered";
import Admin from './Pages/admin pages/admin';
import ProductPage from "./Pages/admin pages/product";
import Medicine from "./Pages/admin pages/med";
import UserPage from "./Pages/admin pages/user"
import AddressPage from "./Pages/admin pages/address";
import ContactPage from "./Pages/admin pages/contact";
import Home1 from "./Pages/admin pages/home";
function App() {
const [selectedProducts, setSelectedProducts] =
useState([]);
const [counter, setCounter] = useState(0);
const handleProductDelete = (productId) => {
const updatedProducts =
selectedProducts.filter((product) => product.id !==
productId);
setSelectedProducts(updatedProducts);
setCounter(counter - 1);
};
41
return (
<BrowserRouter>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/admin" element={<Admin />} >
<Route path="productPage" element={<ProductPage />}
/>
<Route path="medicine" element={<Medicine />} />
<Route path="user" element={<UserPage />} />
<Route path="address" element={<AddressPage />} />
<Route path="contact" element={<ContactPage />} />
<Route path="hom" element={<Home1 />} />
</Route>
<Route path="/login" element={<Login />} />
<Route path="/signup" element={<Signup />} />
<Route path="/dashboard" element={<Dashboard
counter={counter} />}>
<Route path="main" element={<Main />} />
<Route path="contact" element={<ContactUs />} />
<Route path="health" element={
<HealthCare
incrementCounter={incrementCounter}
selectedProducts={selectedProducts}
setSelectedProducts={setSelectedProducts}
/>} />
<Route
path="product"
element={
<Product
incrementCounter={incrementCounter}
selectedProducts={selectedProducts}
setSelectedProducts={setSelectedProducts}
42
/>
}
/>
<Route
path="cart"
element={
<Cart
selectedProducts={selectedProducts}
onProductDelete={handleProductDelete}
/>
}
/>
<Route path="deliveryadd" element={<DeliveryAdd
/>} />
<Route path="payment" element={<Payment
selectedProducts={selectedProducts}/>} />
<Route path="bill" element={<Bill />} />
<Route path="ordered" element={<Ordered />} />
<Route path="vetappointment" element={<VetAppointment />} />
</Route>
</Routes>
</BrowserRouter>
);
}
index.js:
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
const root =
ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
Admin.js:
duration: theme.transitions.duration.enteringScreen,
}),
overflowX: 'hidden',
});
}),
...(open && {
marginLeft: drawerWidth,
width: `calc(100% - ${drawerWidth}px)`,
46
transition: theme.transitions.create(['width',
'margin'], {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen,
}),
}),
}));
return (
<Box sx={{ display: 'flex' }}>
<CssBaseline />
<AppBar position="fixed" open={open}>
<Toolbar>
<IconButton
color="inherit"
aria-label="open drawer"
onClick={handleDrawerOpen}
edge="start"
sx={{
marginRight: 5,
...(open && { display: 'none' }),
}}
>
<MenuIcon />
</IconButton>
<Typography variant="h6" noWrap component="div">
Admin Dashboard
</Typography>
<Button color="inherit"
onClick={handleLogout}>Logout</Button>
</Toolbar>
</AppBar>
<Drawer variant="permanent" open={open}>
<DrawerHeader>
<IconButton onClick={handleDrawerClose}>
{theme.direction === 'rtl' ? <ChevronRightIcon
/> : <ChevronLeftIcon />}
</IconButton>
</DrawerHeader>
48
<Divider />
<List>
{['Products', 'Contact Us', 'User', 'HealthCare',
'Delivery Address'].map((text, index) => (
<ListItem key={text} disablePadding sx={{
display: 'block' }}>
<ListItemButton
sx={{
minHeight: 48,
justifyContent: open ? 'initial' :
'center',
px: 2.5,
}}
onClick={() => {
if (text === 'Products') {
navigate('/admin/productPage');
} else if (text === 'HealthCare') {
navigate('/admin/medicine');
} else if (text === 'Contact Us') {
navigate('/admin/contact');
} else if (text === 'User') {
navigate('/admin/User');
} else if (text === 'Delivery Address') {
navigate('/admin/address');
}
}}
>
<ListItemIcon
sx={{
minWidth: 0,
mr: open ? 3 : 'auto',
justifyContent: 'center',
}}
>
{index === 0 ? <MedicalServicesIcon /> :
// Products
index === 1 ? <ContactMailIcon /> : //
Contact Us
index === 2 ? <PersonIcon /> : // User
49
User.jsx:
function UserPage() {
const [users, setUsers] = useState([]);
useEffect(() => {
const fetchUsers = async () => {
try {
const response = await
fetch('http://localhost:5000/api/users');
const data = await response.json();
setUsers(data);
} catch (error) {
console.error('Error fetching users:', error);
}
};
fetchUsers();
}, []);
if (response.ok) {
setUsers((prevUsers) => prevUsers.filter((user) =>
user._id !== id));
51
} else {
console.error('Error deleting user:',
response.statusText);
}
} catch (error) {
console.error('Error deleting user:', error);
}
};
return (
<div style={{ textAlign: 'center', overflowX: 'auto' }}>
<h2>User Page</h2>
<table style={{ borderCollapse: 'collapse', margin:
'auto', marginTop: '20px', width: '100%' }}>
<thead>
<tr>
<th style={tableCellStyle}>ID</th>
<th style={tableCellStyle}>Username</th>
<th style={tableCellStyle}>Email</th>
<th style={tableCellStyle}>Actions</th>
</tr>
</thead>
<tbody>
{users.map((user) => (
<tr key={user._id}>
<td style={tableCellStyle}>{user._id}</td>
<td
style={tableCellStyle}>{user.fullname}</td>
<td
style={tableCellStyle}>{user.username}</td>
<td style={tableCellStyle}>
<DeleteIcon style={{ cursor: 'pointer' }}
onClick={() => handleDelete(user._id)} />
</td>
52
</tr>
))}
</tbody>
</table>
</div>
);
}
const tableCellStyle = {
border: '1px solid #ddd',
padding: '8px',
};
Home.js
import React from 'react';
import img from '../Assets/1.PNG';
import { useNavigate } from 'react-router-dom';
import HomeImg from '../Assets/Homepage.jpg';
function Home() {
const centerStyle = {
display: 'flex',
flexDirection: 'column', // Change to column layout for
responsiveness
alignItems: 'center',
justifyContent: 'center',
height: '100vh',
};
const textContainerStyle = {
marginTop: '20px', // Use margin-top instead of
marginLeft for spacing
textAlign: 'center',
};
const buttonStyle = {
margin: '10px',
padding: '10px 20px',
backgroundColor: '#704214',
color: 'white',
border: 'none',
borderRadius: '5px',
cursor: 'pointer',
};
const textSpacing = {
margin: '0',
padding: '5px 0',
};
style={{
backgroundImage: `url(${HomeImg})`,
backgroundSize: 'cover',
return (
<div
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
height: '100vh',
}}
>
<div style={centerStyle}>
<img
src={img}
alt="SQUIRREL"
style={{ maxWidth: '100%', maxHeight: '50vh' }}
/>
<div style={textContainerStyle}>
<h4 style={{ fontSize: '40px', fontFamily:
'Harrington', ...textSpacing }}>
PET'S VILLA !!!!
<br />
</h4>
<h4 style={{ fontFamily: 'Papyrus
fantasy', ...textSpacing }}>Make Your Life Happy </h4>
<button style={buttonStyle}
onClick={redirectToLoginPage}>
Login
55
</button>
<button style={buttonStyle}
onClick={redirectToSignInPage}>
Register
</button>
</div>
</div>
</div>
);
}
CHAPTER - 5
TESTING
57
Test strategy describes the overall approach to testing. The goal of the testing
process is to determine all faults in our project. The program was subjected to a set
of test inputs and many explanations were made and based on these explanations it
will be decided whether the program behaves as expected or not.
Interface Testing: This testing method ensures that the three main components
of a web application which are web server, web browser and database are running
harmoniously. This testing type checks whether there is any interruption while the
data is being transferred. Upon that, the communication taking place between
various interfaces is also thoroughly checked.
Unit testing is commenced when a unit has been created and effectively reviewed.
In order to test a single module, we need to provide a complete environment i.e.,
besides the section we would require.
I. The procedures belonging to other units that the unit under test calls.
II. Non local data structures that modules access.
III. A procedure to call the functions of the unit under test with appropriate
parameters.
3) Gray-Box Testing:
It's referred to as semi-transparent testing. It is a combination of
a Black Box and White Box testing. It is the type of testing in
which tester aware with internal functionality of a method or unit but not
in a deeper level like white box testing. In this, the user partially aware
of the internal functionality of a system. Different type of testing covered
under a gray box testing is mentioned as following: -
I. Matrix testing.
II. Pattern Testing.
III. Orthogonal Pattern testing.
IV. Regression Testing.
61
Expected
Sr. No Steps to be Executed Actual Result Result
Result
System should
User Name System accepts
1 E.g.,Shubham
accept valid
valid name
Pass
name
Enter valid Email
address System should System allows
2 E.g., allow email email
Pass
Shuham@gmail.com
Enter Password System should System accepts
3 E.g., Pass@1234 accept password password
Pass
System should System
Confirm Password
4 E.g., Pass@1234
confirm confirms Pass
password password
System should
Mobile Number System accepts
5 E.g., 1234567894
accept 10-digit
mobile number
Pass
phone number
Enter valid address
System should System allows
6 E.g. Pipeline Road
allow address address
Pass
Savedi Ahmednagar
63
A defect report is a document that has concise details about what defects are
identified, what action steps make the defects show up, and what are the expected
results instead of the application showing error (defect) while taking particular step
by step actions.
Defect reports are usually created by the Quality Assurance team and also by the
end-users (customers). Often customers detect more defects and report them to the
support team of the software development since the majority of the customers
curiously tries out every feature in the application. Now, you know what actually
defect and defect reports are.
The reason behind why defect reports are created is to help developers to find out
the defects easily and fix them up. After that, the developer fixes the defects in
order to get the desired outcome specified in the report.
That is why the defect reports are important and created carefully. Defect reports
should be short, organized, and straight to the point and covers all the information
that the developer needs to detect the actual defects in the report by doing what and
how the one written the defect report detected the defects. It is usual for QA teams
to get defect reports from the clients that are either too short to reproduce and
rectify or too long to understand what actually went wrong.
66
CHAPTER – 6
LIMITATION OF PROPOSED SYSTEM
67
CHAPTER – 7
PROPOSED ENHANCEMENT
69
7. Proposed Enhancement
A Online Pet Shop Management System is website that manages the Product
orders.
Further for more enhancements the online payment functionality can be added in
the system.
Chapter – 8
Conclusion
71
Firstly, it's essential to prioritize the welfare and well-being of the animals
being sold. This involves sourcing pets from reputable breeders or rescue
organizations, ensuring they receive proper care and veterinary attention,
and providing accurate information to customers about their health,
temperament, and background.
Chapter- 9
Bibliography
74
Bibliography:
This bibliography includes references to the React.js library itself, along with
other commonly used libraries, frameworks, and tools for building a React.js
application, managing state with Redux, implementing routing with React
Router, styling components with Material-UI, integrating with Firebase or
MongoDB for backend services, utilizing Node.js and Express.js for server-
side development, version control with Git and GitHub, seeking assistance
from Stack Overflow and MDN, and employing development tools like
React Developer Tools, ESLint, Prettier, and React Testing Library.
75
CHAPTER – 9
USER MANUAL
76
8. User Manual:
Home Page: -
77
Registration Page: -
About Us Page: -
Contact Us Page: -
79
Shop By Category: -
80
HealthCare Page:
87
Vet Services
88
89