Project Report
Project Report
ON
ONLINE BOOK STORE
Submitted in partial fulfillment of requirement for the award of the degree of
SUBMITTED BY
Amit (22201020010)
Raj Tiwari (22201020056)
Milind Yadav (22201020042)
Yadav Ajay Rajkumar (22201020065)
SUPERVISED BY
Mr. Vinay Tiwari
Assistant Professor
Computer Application
UNITED UNIVERSITY
RAWATPUR, PRAYAGRAJ, UTTAR PRADESH-211012
Project Certificate
This is to certify that the project report entitled Online Book Store submitted to United University,
in partial fulfillment of the requirement for the award of the degree of BACHELOR IN
COMPUTER APPLICATIONS (BCA), is original work carried out by myself Mr. Milind Yadav
with enrolment no. UU222010004 Under the Supervision of Mr. Vinay Tiwari. The matter
embodied in this project is genuine work done by me and has not been submitted whether to this
University or to any other University / Institute for the fulfillment of the requirement of any course
of study.
Milind Yadav
22201020042
UU222010004
Bachelor In Computer Application
Department of Computer Application
Certificate from Project Guide
This is certify that this Major Project entitled "Online Book Store" submitted in partial fulfillment
of the requirements for the award of the degree of Bachelor of Computer Application (BCA) in
session 2024-2025 to the United University, Prayagraj, done by Milind Yadav is an authentic
work carried out by them at “Department of Computer Applications ” under my guidance. The
matter and software embodied in this project work has not been submitted earlier for the award
of any degree or diploma to the best of my knowledge and belief.
This Major Project is the result of the contribution of many minds. I would like to acknowledge
and thank my project guide Mr. Vinay Tiwari for his valuable support and guidance. He guided
me through the process from conception and till the completion of this project. I would also like
to thank my HOD/Dean Sir. and all my faculties. I thank lab staff members and other non-teaching
members. I am very thankful for the open-handed support extended by many people. While no
list would be complete, it is my pleasure to acknowledge the assistance of my friends who
provided encouragement, knowledge and constructive suggestions.
Milind Yadav
22201020042
UU222010004
Bachelor of Computer Application
Department of Computer Application
Index
The Online Book Store steps in to solve these very problems by bringing the entire bookstore
operation into the digital age. Think of it as a smart assistant that automates and simplifies all the
essential tasks. This means that things like managing the stock of books, processing sales, and
keeping accurate records are all handled electronically.
By doing this, the online bookstore makes the entire operation smoother and more efficient. There's
less room for human error, and tasks get done much faster. This not only benefits the bookstore
staff but also creates a much better experience for the customers. They can easily search for books,
see what's in stock, and make purchases from the comfort of their own homes.
The core idea behind creating this online bookstore is to modernize how bookstores work.
Traditional methods often involve a lot of paperwork and manual effort, which can be slow and
prone to errors. By using the power of the internet and modern software, this system aims to
automate and improve almost every part of running a bookstore. This leads to greater accuracy,
improved efficiency in day-to-day tasks, and a much more user-friendly experience for everyone
involved.
Ultimately, the main goal of the Online Book Store is to create a smooth and effective platform
for managing all the different aspects of an online bookstore. The reason for building this system
comes from the need for a system that is not only efficient but also easy to use and covers all the
essential functions of a bookstore.
This project aims to take all those manual processes – like managing inventory and sales – and
make them digital and more efficient. This will lead to a much better experience for both the people
managing the bookstore (the administrators) and those working in it (the employees). The system
is designed to be comprehensive and easy to navigate, catering to the needs of everyone involved.
Furthermore, it's built in a way that allows it to grow and adapt as the bookstore expands in the
future.
Problem Statement
Running a bookstore, especially in today's digital age, presents significant operational challenges.
Traditionally, managing a bookstore involves numerous manual tasks. In a physical store, this
includes the time-consuming process of physically counting new book deliveries, manually
updating inventory records, and meticulously tracking sales. These manual methods are not only
labor-intensive but also susceptible to human error, potentially leading to inaccuracies in stock
levels and sales data. Furthermore, locating specific books for customers can be inefficient if the
inventory is not well-organized.
A lot of bookstore owners, whether they're just online or have a physical shop with a website, run
into the same problems. If they're still doing things the old-fashioned way, with lots of manual
work, it eats up their time. Plus, keeping track of everything by hand means mistakes can easily
creep in, messing up their records and ultimately frustrating their customers. What they really need
is a smarter, automatic way to handle all the behind-the-scenes stuff. That way, they can spend
less time on paperwork and more time doing what they love: helping people find great books. And,
of course, their customers would have a much smoother and happier experience
Objective
To automate and streamline bookstore operations, including inventory management and sales
tracking.
To create an intuitive interface for managing book inventory, orders, and customer data.
Scope
Development of both an admin and employee panel.
Features for managing book categories and individual book records
Sales management capabilities, including transaction history and daily sales tracking.
User management to control access and roles within the system.
Implementation of a clean and simple user interface for a better user experience.
Limitations
It requires an internet connection to function, as it is a web-based application.
Initial setup and data entry can be time-consuming for larger bookstores.
System Analysis
Traditional online bookstores often rely heavily on manual processes, which can lead to several
inefficiencies and problems. These systems require a lot of hands-on work from staff, especially
when it comes to managing inventory, tracking sales, and processing transactions. Some of the
main issues with this manual approach include:
Instead of using computers and software, staff must physically count all the books, update records
by hand, and track every sale manually. This is very time-consuming and there's a high chance of
errors. For example, staff might miscount books, forget to update records, or not notice when a
book is running low. This can lead to inaccurate stock information, meaning the bookstore might
either order too many books or not have enough of a popular book
Sales transactions are often written down or entered into a system by hand, which again increases
the risk of mistakes. It can also be difficult and time-consuming to get an overview of sales trends.
For instance, if the manager wants to know which books sold best last month, they will have to go
through piles of records, which is not very efficient.
Organizing and categorizing books is also often done manually. Staff must update records and
make sure every book is in the right place, which can be a huge task, especially for bookstores
with a lot of books. It's easy for books to be miscategorized or for records to become outdated,
making it harder for both staff and customers to find what they need.
Limited Accessibility:
With traditional systems, information is often only available at the physical bookstore location.
Staff and managers must be present to access records or perform important tasks. This lack of
remote access limits flexibility and can slow down decision-making. For example, if a manager
needs to check inventory levels urgently, they will have to travel to the store, even if they are at
home or elsewhere.
Error-Prone Processes:
Because manual processes rely on people, they are naturally prone to human error. Mistakes in
entering data, misplacing records, and poor communication between staff can all lead to
inaccuracies and inefficiencies. These errors can cause a lot of problems, including incorrect orders,
lost sales, and unhappy customers.
The proposed Online Bookstore aims to solve the problems of traditional systems by using
automation and digital technology. It will streamline the way books are managed and sold, making
the process much more efficient and user-friendly. Here are the key improvements and features of
the new system:
The system will automatically record sales transactions and keep track of all the data. This will
greatly reduce the number of errors and make it easy to access sales information. For example, the
system can quickly generate reports showing which books are selling well, which can help
managers make better decisions about what to stock.
The system will make it much easier to categorize and organize books. Administrators will be able
to create, update, and delete book categories quickly and easily. This will be a big improvement,
especially for large bookstores with a wide variety of books.
Enhanced Accessibility:
The system will provide real-time access to data from anywhere with an internet connection. Staff
and managers will be able to perform tasks and access records remotely, which will improve
flexibility and allow for faster decision-making. For example, a manager can check inventory
levels from their home, and staff can update book information from any location.
Error Reduction:
By automating key processes such as inventory management, sales transactions, and record-
keeping, the system will minimize the risk of human error. This will improve the accuracy of data
and reduce the number of mistakes that can lead to problems.
User-Friendly Interface:
The system will have a clean and intuitive interface that is easy to use for both administrators and
staff. This will make the system more efficient and improve the overall user experience.
Project Perspective
Requirement Analysis
Admin Panel
Administrators can add new categories, update existing ones, and delete categories as needed.
Administrators can add new book records, update existing ones, and remove book records from
the system.
Sales Management:
Administrators can select books for a sale, specify the quantity of each book, and enter customer
details.
Transaction History:
The system maintains a detailed history of all past sales transactions like
Book details
Quantities sold
Customer information
User Management:
The system allows administrators to manage user accounts, including employee accounts.
Administrators can add new user accounts, update existing ones, and remove user accounts from
the system.
Earnings and Sales Overview:
The system provides administrators with an overview of earnings and sales data. Administrator
can view:
Employee Panel
Sales Transactions:
Employees can select books for sale, specify the quantities, and enter customer information.
Employees can view their total sales within a 24-hour period and overall sales statistics.
Performance Requirements
Efficiency:
The system should perform tasks quickly to minimize response times and maximize user
productivity. This includes tasks such as:
Inventory management
Sales processing
Scalability:
The system must be designed to handle a growing amount of data, number of users, and volume
of transactions without slowing down significantly.
Reliability:
The system should operate consistently with minimal downtime and prevent data loss. This ensures
that users have uninterrupted access to important functions and information.
Security Requirements
Authentication:
Only authorized users should be able to access the admin and employee panels.
Authorization:
Employees should only be able to access the features necessary for their job duties.
Data Protection:
Encryption should prevent unauthorized access and keep the data confidential.
Data Integrity:
The system should have measures to prevent data from being tampered with.
This ensures that information like sales records, transaction history, and user accounts remains
accurate and trustworthy.
Feasibility Study
A feasibility study assesses the practicality and potential success of a project by examining factors
like technical, economic, and operational aspects. This study aims to determine if the proposed
Online Bookstore System is viable and likely to achieve its objectives.
Technical Feasibility
Technical feasibility assesses whether the necessary technology, infrastructure, and resources are
available to develop and implement the system. This includes evaluating:
Hardware requirements
Economic Feasibility
Estimating the costs for system development, implementation, training, and ongoing maintenance.
Analyzing opportunities for increased efficiency and revenue generation resulting from the
system's implementation.
Operational Feasibility
Operational feasibility assesses how well the system will work within the existing bookstore
operations. Key aspects include:
Ease of Use:
The system will have an intuitive design to ensure it is easy for administrators and employees to
use.
Integration:
The system will integrate smoothly with current bookstore operations, minimizing disruption.
Process Improvement:
The system will replace manual processes with automated workflows to improve efficiency.
Scalability:
The system will be designed to accommodate future growth and additional features.
Flexibility:
Its modular architecture will allow for easy updates and the integration of new functionalities as
the business expands.
Hardware and Software Requirements
Hardware Requirement:
RAM: 16GB
SSD: 1TB
Software Support:
Postman
VScode
Technology:
Main.jsx (file)
createRoot(document.getElementById('root')).render(
<Provider store={store}>
<RouterProvider router={router} />
</Provider>,
)
App.jsx (file)
function App() {
useEffect(() => {
// Cleanup timer
return () => clearTimeout(timer);
}, []);
if (loading) {
return <Loading />;
}
return (
<>
<AuthProvide>
<Navbar />
<main className='min-h-screen max-w-screen-2xl mx-auto px-4 py-6 font-primary'>
<Outlet />
</main>
<Footer />
</AuthProvide>
</>
)
}
<form onSubmit={handleSubmit(onSubmit)}>
<div className='mb-4'>
<label className='block text-gray-700 text-sm font-bold mb-2'
htmlFor="email">Email</label>
<input
{...register("email", { required: true })}
type="email" name="email" id="email" placeholder='Email Address'
className='shadow appearance-none border rounded w-full py-2 px-3 leading-tight
focus:outline-none focus:shadow'
/>
</div>
<div className='mb-4'>
<label className='block text-gray-700 text-sm font-bold mb-2'
htmlFor="password">Password</label>
<input
{...register("password", { required: true })}
type="password" name="password" id="password" placeholder='Password'
className='shadow appearance-none border rounded w-full py-2 px-3 leading-tight
focus:outline-none focus:shadow'
/>
</div>
{
message && <p className='text-red-500 text-xs italic mb-3'>{message}</p>
}
<div>
<button className='bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-8
rounded focus:outline-none'>Login </button>
</div>
</form>
<p className='align-baseline font-medium mt-4 text-sm'>Haven't an account? Please
<Link to="/register" className='text-blue-500 hover:text-blue-700'>Register</Link></p>
// register user
<form onSubmit={handleSubmit(onSubmit)}>
<div className='mb-4'>
<label className='block text-gray-700 text-sm font-bold mb-2'
htmlFor="email">Email</label>
<input
{...register("email", { required: true })}
type="email" name="email" id="email" placeholder='Email Address'
className='shadow appearance-none border rounded w-full py-2 px-3 leading-tight
focus:outline-none focus:shadow'
/>
</div>
<div className='mb-4'>
<label className='block text-gray-700 text-sm font-bold mb-2'
htmlFor="password">Password</label>
<input
{...register("password", { required: true })}
type="password" name="password" id="password" placeholder='Password'
className='shadow appearance-none border rounded w-full py-2 px-3 leading-tight
focus:outline-none focus:shadow'
/>
</div>
{
message && <p className='text-red-500 text-xs italic mb-3'>{message}</p>
}
<div>
<button className='bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-8
rounded focus:outline-none'>Register</button>
</div>
</form>
<p className='align-baseline font-medium mt-4 text-sm'>Have an account? Please <Link
to="/login" className='text-blue-500 hover:text-blue-700'>Login</Link></p>
const navigation = [
{name: "Dashboard", href:"/user-dashboard"},
{name: "Orders", href:"/orders"},
{name: "Cart Page", href:"/cart"},
{name: "Check Out", href:"/checkout"},
]
return (
<header className="max-w-screen-2xl mx-auto px-4 py-6">
<nav className="flex justify-between items-center">
{/* left side */}
<div className="flex items-center md:gap-16 gap-4">
<Link to="/">
<HiMiniBars3CenterLeft className="size-6" />
</Link>
} catch (error) {
console.error("Error fetching books", error);
res.status(500).send({message: "Failed to fetch books"})
}
}
} catch (error) {
console.error("Error fetching book", error);
res.status(500).send({message: "Failed to fetch book"})
}
}
const UpdateBook = async (req, res) => {
try {
const {id} = req.params;
const updatedBook = await Book.findByIdAndUpdate(id, req.body, {new: true});
if(!updatedBook) {
res.status(404).send({message: "Book is not Found!"})
}
res.status(200).send({
message: "Book updated successfully",
book: updatedBook
})
} catch (error) {
console.error("Error updating a book", error);
res.status(500).send({message: "Failed to update a book"})
}
}
// post a book
router.post("/create-book", verifyAdminToken, postABook)
module.exports = router;
Order.controller.js (file)
module.exports = {
createAOrder,
getOrderByEmail
};
Order.model.js (file)
module.exports = router;
Middleware (folder)
// console.log(token)
if (!token) {
return res.status(401).json({ message: 'Access Denied. No token provided' });
}
jwt.verify(token, JWT_SECRET, (err, user) => {
if (err) {
return res.status(403).json({ message: 'Invalid credientials' });
}
req.user = user;
next();
})
module.exports = verifyAdminToken;
User.model.js (file)
module.exports = User;
User.route.js (file)
return res.status(200).json({
message: "Authentication successful",
token: token,
user: {
username: admin.username,
role: admin.role
}
})
} catch (error) {
console.error("Failed to login as admin", error)
res.status(401).send({message: "Failed to login as admin"})
}
})
module.exports = router;
Database:
Admin table
User table
Introduction
Validation plays a critical role in ensuring the security, accuracy and reliability of any application
to ensure data is correct, the application works smoothly, and it's secure. For this bookstore project,
validation is needed at different stages.
This means preventing incorrect or inconsistent information from being saved, which is essential
for the bookstore's data integrity.
By providing clear and immediate feedback, users can fix errors before submitting data,
improving their experience.
Valid data helps avoid unexpected issues that could disrupt the application's functionality.
Validation can sanitize user input to prevent malicious code from being injected into the
database.
Frontend Validation
Frontend validation happens in the React application and is the first defense against bad data. It
gives users immediate feedback and reduces server load.
Common Checks:
Required fields:
Ensures that essential fields, such as book title, author, and price, are filled before submission.
Verifies that the input matches the expected data type, preventing errors when processing the data.
Password complexity:
Enforces rules for password strength, such as minimum length, and the inclusion of uppercase
letters, lowercase letters, numbers, and special characters, to enhance security.
Backend Validation
Backend validation in Node.js and Express.js is a critical defense. It ensures data is valid no matter
how it's sent to the server.
Common Checks
Required fields:
Ensures that the data received matches the expected types (e.g., a number for price, a string for
title).
Verifies user credentials and permissions to ensure that only authorized users can perform certain
actions, such as adding or modifying book information.
Correct formats:
Checks that data adheres to specific formats (e.g., email address format, date format) using regular
expressions or other methods.
Database Validation
Common Checks:
Required fields:
Data types:
Enforces the expected data type for each field (e.g., String, Number, Date).
Ensure that database schema and validation rules are kept up to date with the application's
requirements and business logic.
Implementation and maintenance
Introduction
First, we'll take the design and requirements and turn them into a real, working application. This
involves setting up our tools, organizing the project, creating the different parts, and making sure
they all work together.
After the application is launched, we need to maintain it. This means fixing any problems,
applying updates, and making sure it stays secure, performs well, and continues to meet the
needs of the business.
Implementation Strategy
use a flexible approach to build the application, delivering pieces of it in stages. This lets us get
feedback early and make changes as needed. We'll also emphasize reusable components and
write tests as we go to ensure quality.
Agile Development:
break the project into small chunks, delivering working features in each chunk. This helps us get
feedback and adapt to changes.
Modular Design:
build the application using reusable building blocks. This makes the code easier to understand,
fix, and update.
Version Control:
use Git to track all the changes to the code. This allows multiple developers to work together and
makes it easy to go back to previous versions if needed.
Key Implementation Components
Frontend
use React state management features to handle data within the application.
Backend
create our own API using Express.js and Node.js for the frontend to communicate with.
define API routes using Express.js.
use Express middleware for tasks like handling requests, security, and errors.
use Mongoose to interact with the MongoDB database.
Database
perform standard database operations like creating, reading, updating, and deleting data.
Maintenance Plan
Security Updates:
stay up to date on security vulnerabilities, including those in our own API code.
monitor server, application, and database performance to identify and address any issues,
including the performance of our API.
Feature Enhancements:
Test Plan
The primary objective of testing is to validate that the software performs as intended, thereby
improving its quality, reliability, and maintainability. This involves:
Functional Testing:
Non-functional Testing:
This method focuses on the system's functionality without knowledge of its internal code
structure. Test cases are derived from requirements and specifications.
This method focuses on the system's internal structure, examining code paths, branches, and
conditions. Test cases are designed to ensure code coverage.
Black Box Testing: Test Cases and Results
The following table summarizes the black box testing performed on admin dashboard, along with
the expected and actual results:
Pass
User Verify that an User details for User is
Management administrator can add/update, user added/updated/rem
add, update, and ID for delete oved successfully.
remove users.
Pass
View Total Verify that the None Earnings are
Earnings administrator can displayed correctly.
view total earnings
within the last 24
hours.
The following table summarizes the black box testing performed on User dashboard, along with
the expected and actual results:
Functionality:
All functional requirements were met, and no major defects were found.
Performance:
The system performed satisfactorily under expected load conditions.
Usability:
The user interface was found to be intuitive and user-friendly.
Security:
Basic security tests, including input validation and user authentication, were passed.
Code Quality:
The codebase is well-structured and adheres to best practices, with high code coverage achieved
in white box testing.
The overall assessment indicates that the Online Bookstore is stable, functional, and ready for
deployment. The combined approach of black box and white box testing has effectively validated
both the functional and structural aspects of the system. All identified issues have been resolved,
and the system meets the specified requirements.
Unit Testing
Unit testing involves testing individual units or components of the software to ensure they function
as intended. For this project, unit testing focused on the smallest testable parts of the application,
such as functions and methods within the modules. This testing was conducted in parallel with the
coding phase, with each module tested as it was developed.
Validation Testing
Validation testing was conducted to verify that the system functions correctly under various
conditions, including incorrect function calls, input errors, database errors, and
initialization/interface errors.
Functional Validation
Functional validation was performed to ensure the code produces the expected output. This process
is like black box testing, focusing on the code's accuracy in delivering the required results.
Screen shots of project
Login Page
Landing Page
Catalog page
Cart Page
Checkout Page
Order History
Wishlist Page
Implement advanced reporting features to provide deeper insights into sales trends, popular book
categories, and customer preferences. This could involve:
Integrate the bookstore system with online marketplaces and e-commerce platforms to expand
reach and distribution channels. This could involve:
Develop a mobile application for customers to browse, purchase, and track orders conveniently
from their smartphones or tablets. This could include:
React Documentation:
Redux Documentation:
Key benefits and outcomes of implementing this system include improved operational efficiency,
as it automates and streamlines processes such as inventory, sales transactions, and user accounts,
leading to significant time and cost savings. The system also enhances accuracy by centralizing
and digitizing data entry and transaction recording, which reduces the likelihood of human error
and ensures that records are consistently up-to-date and accurate.
Enhanced security is another benefit, with role-based access control ensuring that sensitive data
and functionalities are accessible only to authorized users, protecting the system from unauthorized
access and potential security breaches. Furthermore, the system provides real-time insights into
sales and earnings, enabling prompt decision-making and strategic planning.
In summary, the Online Bookstore System effectively addresses the core needs of managing a
bookstore. Its intuitive user interface and robust functionality improve operational efficiency,
enhance accuracy in inventory and sales tracking, ensure data security, and provide real-time
financial insights. This project not only meets the practical requirements of a bookstore but also
serves as a valuable learning resource for understanding and developing web-based systems.