1. Trang chủ
  2. » Luận Văn - Báo Cáo

Integrated online bookstore website with management system

125 0 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Integrated online bookstore website with management system
Tác giả Bui Thi Huyen
Người hướng dẫn MSc. Bui Thanh Tung
Trường học Vietnam National University, Hanoi International School
Chuyên ngành Informatics and Computer Engineering
Thể loại Graduation project
Năm xuất bản 2025
Thành phố hanoi
Định dạng
Số trang 125
Dung lượng 8,18 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Cấu trúc

  • CHAPTER 1: INTRODUCTION TO THE TOPIC – SYSTEM (14)
    • 1.1. Reason for choosing the topic (14)
    • 1.2. Topic objective (14)
    • 1.3. Topic scope (15)
    • 1.4. Survey (15)
  • CHAPTER 2: LITERATURE REVIEW (18)
    • 2.1. Introduction (18)
      • 2.1.1. Basic Theory of E-commerce (19)
      • 2.1.2. Importance of Online Bookstores (19)
      • 2.1.3. Challenges and Obstacles (20)
      • 2.1.4. Overview of Current Online Bookstore (20)
      • 2.1.5 Limitations of Current Systems (21)
      • 2.1.6. Related Works and Existing Solutions (21)
    • 2.2. Technologies used (23)
      • 2.2.1. HTML, CSS, JavaScript (23)
      • 2.2.2. ASP.Net Core (25)
      • 2.2.3. Model-View-Controller architecture (29)
      • 2.2.4. SQL Server (32)
      • 2.2.5. Entity Framework Core (34)
  • CHAPTER 3: SYSTEM DESIGN ANALYSIS (36)
    • 3.1. Identify system actors (36)
    • 3.2. Use Case diagram (36)
      • 3.2.1. General Use Case diagram (37)
      • 3.2.2. System Use Case Analysis and Description (38)
    • 3.3. Database Design (99)
      • 3.3.1. General Database table (99)
      • 3.2.2. Detailed design of database tables (99)
  • CHAPTER 4: DESIGN THE THEME (105)
    • 4.1. Login, registration interface (105)
    • 4.2. User interface (106)
      • 4.2.1. User home page interface (106)
      • 4.2.2. Wishlist page interface (109)
      • 4.2.3. Cart page interface (109)
      • 4.2.4. Checkout page interface (110)
      • 4.2.5. Order list page interface (110)
      • 4.2.6. Persional Information page interface (112)
    • 4.3. Admin and Employee interface (112)
      • 4.3.1. Home page interface (112)
      • 4.3.2. Book Management page interface (113)
      • 4.3.3. Warehouse management page interface (114)
      • 4.3.4. Category Management page interface (114)
      • 4.3.5. Author Management page interface (115)
      • 4.3.6. Order Management page interface (115)
      • 4.3.7. Employee Management page interface (117)
      • 4.3.8. Customer Management page interface (117)
      • 4.3.9. Account Management page interface (118)
      • 4.3.10. Role Management page interface (119)
      • 4.3.11. Statistical page interface (120)
  • CHAPTER 5: CONCLUSION (122)
    • 5.1. Summary of results (122)
    • 5.2. Significance and importance (122)
    • 5.3. Contributions to the field of research (122)
    • 5.4. Recommendations for Future Research (123)

Nội dung

Integrated online bookstore website with management system Integrated online bookstore website with management system Integrated online bookstore website with management system

INTRODUCTION TO THE TOPIC – SYSTEM

Reason for choosing the topic

As e-commerce continues to evolve, the demand for online book shopping is rising, with modern consumers seeking convenient platforms that allow for easy searching, price comparison, and purchasing without the need for physical store visits Despite this growth, current systems struggle with limitations like poor user experiences, inadequate product information, and inefficient management, resulting in customer dissatisfaction and operational difficulties.

Small and medium-sized enterprises (SMEs) in the book retail industry often face challenges in establishing and maintaining effective online platforms Implementing an integrated and scalable system can significantly boost their competitiveness, enabling them to reach a wider audience and optimize operations A key component of this optimization is the efficient management of all orders, encompassing both online and in-store transactions Current systems frequently prioritize online orders, neglecting a comprehensive approach to in-store purchases, which can result in inventory discrepancies, difficulties in tracking overall sales performance, and challenges in generating accurate business reports.

Creating a dependable and user-friendly online bookstore platform with an effective order management system is crucial for businesses This system allows for seamless transaction tracking, real-time inventory synchronization, and precise sales reporting, which enhances operational efficiency and boosts customer satisfaction These elements are the key drivers behind the initiation of this project.

Topic objective

The Integrated Online Bookstore Website with Management System aims to develop an online platform where customers can quickly, conveniently, and securely search

Discover 15 books with comprehensive details and purchase options online, eliminating the need to visit a physical store This system streamlines the entire process, encompassing product search, payment, and delivery, ultimately saving time and reducing costs for buyers.

The system streamlines product, order, and inventory management for stores, optimizing business processes and enhancing competitiveness This efficiency not only broadens customer reach but also fosters sustainable growth in the expanding e-commerce market.

Topic scope

The Integrated Online Bookstore Website features a robust Management System developed using ASP.NET Core, SQL Server, HTML, CSS, JavaScript, Entity Framework Core, and Bootstrap It includes Vnpay payment gateway integration to ensure secure transactions for users.

Survey

Survey Plan Survey Objectives Survey Methods Survey time : From

Survey subjects: The store owner, sales staff

Survey scope: Retail bookstore and activities

Understand the current product management processes and sales activities at the store

Assess the difficulties faced by employees and customers during the product search and sales process

Face-to-face meetings, individual interviews, and questionnaire surveys

16 related to product management and sales

Gain insights into the store's needs and expectations for implementing an online sales system

Table 1.1 Survey Plan and Objectives for Retail Bookstore Management and Sales

What difficulties do you currently encounter in the shopping process at your store?

The store is overcrowded on weekends, with limited space causing long customer wait times

Do your customers have any requests regarding online shopping?

Yes, many customers want to shop online and make payments to save time, especially those living far away or unable to visit the store

How do you currently manage product information?

We primarily manage product information through spreadsheets or handwritten records, but updating and tracking this data is quite manual and time-consuming

Do you face any challenges in managing orders and inventory control?

Yes, we sometimes struggle to keep track of inventory levels, especially when there are many orders arriving simultaneously

Do your staff encounter any difficulties in managing orders and products?

We mainly rely on manual methods and spreadsheets, which can sometimes result in errors or wasted time

Do you need a system to track and report revenue, the number of orders, and business performance?

We are considering it An online sales system could help us reach customers in various locations, manage products and orders more effectively

Do you encounter difficulties in finding the location of books in the store?

Yes, it's difficult during crowded times and without a clear classification system, leading to misplaced or mixed- up books

Do you spend a lot of time searching for a book when a customer asks for it?

Yes, it takes time, especially for less popular or new release books

If a book is unavailable in the store, do you know how to inform the customer?

I check the inventory and inform the customer to wait or notify them when the book arrives

Do you think an online book search system would make your job easier?

Yes, an online search system would make my job more efficient by allowing instant access to book information, store location, and inventory status

Table 1.2 Interview Questions and Answers for Bookstore

The store struggles with managing large weekend crowds, manual product and inventory management, and ineffective reporting systems To address these challenges, it is essential to implement an online sales system, utilize product and inventory management software, adopt an automated order management system, create an online book search system, and establish revenue reporting systems.

LITERATURE REVIEW

Introduction

In today's digital age, e-commerce has revolutionized how consumers buy goods, particularly books, with online bookstores offering a convenient platform for browsing and purchasing from home Despite this growth, many current systems fail to effectively integrate online and offline operations, hindering the overall user experience.

The "Integrated Online Bookstore Website with Management System" project seeks to create a unified platform for managing book sales, customer data, and transactions This system enhances the online shopping experience while also incorporating in-store transactions by tracking customer data through phone numbers, ensuring a seamless experience across both online and offline channels.

Key features of the system :

Order management: Handling both online and in-store orders efficiently, including delivery tracking for online purchases

The project leverages advanced technologies like ASP.Net Core for backend development, SQL Server for effective database management, and Entity Framework Core for seamless data interaction, resulting in a robust and scalable platform Furthermore, it incorporates machine learning-driven real-time recommendations that improve user experience by suggesting relevant books tailored to individual purchase history and behavior.

This project seeks to merge advanced technology with user-centric design to develop a platform that streamlines the buying and selling of books, while also significantly enhancing the evolution of e-commerce within the publishing sector.

E-commerce refers to the buying and selling of goods and services through online platforms The e-commerce industry has experienced significant growth over the past few decades, driven by the increasing use of the internet and advancements in electronic payment technologies

E-commerce allows consumers to shop from anywhere, at any time, offering numerous benefits such as convenience, competitive prices, and access to a wide range of products Additionally, e-commerce enables businesses to reach a global market, driving expansion and creating new opportunities The rise of e-commerce has also led to innovations such as personalized shopping experiences, mobile commerce, and social commerce, further transforming the retail landscape

Online bookstores are now crucial to the retail landscape, offering a convenient way for consumers to discover and purchase books from home In Vietnam, the book industry is transitioning from traditional sales to e-commerce, highlighted by the success of the 2nd National Online Book Fair (2021) at Book365.vn, which saw 40,000 books delivered, over 6 million site visits, and revenue exceeding 4.5 billion VND.

The rise of online bookstores allows consumers to buy books anytime and anywhere, removing limitations of store hours and location This convenience plays a crucial role in the increasing popularity of digital book retailers, as highlighted by Nguyễn (2020), who notes that ease of access is a significant driver of digital transformation in the book retail sector.

Coupled with the increasing penetration of internet access and mobile devices, make online bookstores a major player in the modern retail landscape, reshaping how people access and consume literature.

Although online bookstores offer numerous advantages, several issues and challenges still exist for these platforms:

Many online bookstores struggle with integrating features from physical stores, resulting in poor inventory management, order processing, and customer data handling This lack of integration hampers the ability to create a seamless shopping experience across various channels According to a study published in the International Journal of Retail & Distribution Management (2017), effective inventory management and enhanced customer satisfaction are closely linked to integration Consequently, the absence of a cohesive connection between online and offline operations can lead to diminished customer experiences and negatively affect sales.

These challenges highlight the importance of improving operational efficiency and developing strategies to maintain competitiveness in the ever-evolving digital marketplace

2.1.4 Overview of Current Online Bookstore

In recent years, the rise of online bookstores has transformed the way consumers browse, purchase, and manage books, significantly altering shopping habits Notable online bookstores in Vietnam include Tiki.vn, Fahasa.com, Vinabook.com, Shopee, and Lazada, alongside traditional retailers like Phương Nam Bookstore that have embraced online sales While these platforms primarily focus on physical books, they often lack substantial differentiation in providing a seamless shopping experience between online and offline channels.

Many online bookstores prioritize digital sales but struggle with seamless integration of online and offline order management This inefficiency hampers customer management and order tracking, leading to a subpar user experience, especially for customers who want to blend online purchases with in-store shopping.

Despite advancements in online bookstore platforms, significant limitations persist, such as the absence of order tracking for offline purchases, which hinders customers from accessing their purchase history for books bought in physical stores This gap creates an incomplete customer management system and disconnects online and offline shopping experiences Additionally, the platforms have not fully leveraged customer data analysis from both online and offline transactions, complicating the implementation of effective marketing strategies.

2.1.6 Related Works and Existing Solutions a Previous Research on Online Bookstore Systems

Several studies have focused on developing e-commerce platforms for book sales, with key topics including:

Effective customer management relies on the storage and analysis of purchase history, which is crucial for enhancing sales strategies By tracking customer purchase behavior, retailers can gain valuable insights into customer needs, allowing them to optimize advertising campaigns and promotional programs.

Integrating multiple online payment methods is essential for enhancing customer experience and minimizing transaction problems, while also building trust in online bookstore systems.

Here are some popular online bookstore systems and their features:

Tiki.vn provides a robust inventory management system for physical books; however, it lacks integration with offline orders, complicating customers' ability to track their in-store purchase history This limitation obstructs the delivery of a seamless multi-channel shopping experience for those looking to manage both online and offline purchases effectively.

Technologies used

Web development has undergone remarkable evolution, with HTML, CSS, and JavaScript serving as the core technologies that facilitate the creation of engaging and visually attractive websites Their widespread adoption can be attributed to their versatility, accessibility, and seamless compatibility across various browsers and devices.

HTML, or Hypertext Markup Language, is the essential language for creating web page documents, serving as the backbone of web structure and content It defines key elements such as headings, paragraphs, links, and images, much like a skeleton supports a body, providing the foundational framework for displaying content on the internet.

Figure 2.1 Comparison of HTML and HTML+CSS (Source: Bonaventure

CSS (Cascading Style Sheets) is essential for defining the visual presentation of web content, enabling customization of colors, fonts, layouts, sizes, and animations to enhance a website's appeal and user-friendliness Research indicates that effective CSS implementation can decrease webpage load times and boost user engagement Furthermore, advanced CSS functionalities like Flexbox and CSS Grid empower developers to design responsive layouts, improving usability on various screen sizes.

Relationship Between HTML and CSS:

• HTML structures the content, while CSS styles and formats it

• They are commonly used together to build both static and dynamic websites

JavaScript is a powerful scripting language that enhances web pages by enabling dynamic functionality and user interactions Unlike HTML and CSS, which focus on structure and presentation, JavaScript facilitates event handling, animations, and real-time interactions, making it essential for modern web development.

Given their flexibility and cross-browser compatibility, HTML, CSS, and JavaScript were selected for this project to ensure an interactive and responsive user experience

Utilizing CSS Grid for flexible layouts alongside JavaScript for asynchronous data retrieval enables smooth navigation and improved performance Future developments may focus on incorporating Progressive Web Apps (PWA) or Server-Side Rendering (SSR) methods to enhance the overall web experience.

ASP.NET Core, developed by Microsoft, is an open-source, cross-platform framework for web application development that significantly improves upon the older ASP.NET platform It delivers enhanced performance, scalability, and flexibility, making it a versatile choice for developers Built on the modern NET Core runtime, ASP.NET Core can be deployed across multiple operating systems, including Windows, macOS, and Linux.

With its cross-platform support and performance optimizations, ASP.NET Core is ideal for developing modern web applications, ranging from simple personal websites to complex enterprise systems

ASP.NET Core offers essential tools and libraries for creating a comprehensive Integrated Online Bookstore Website with Management System, featuring user management, book management, cart functionality, order management, and secure payment systems, ensuring high-level security to protect user data and transactions.

Key Features of ASP.NET Core

Cross-Platform Support: ASP.NET Core allows deployment on multiple operating systems, such as Windows, macOS, and Linux, providing flexibility in choosing deployment environments and reducing infrastructure costs

Exceptional Performance: By leveraging the advancements of NET Core, ASP.NET Core is designed to handle large volumes of requests quickly, efficiently, and reliably, even under high loads

Modular Architecture: ASP.NET Core uses a modular architecture with components such as routing, dependency injection, and middleware, enabling developers to customize and reconfigure applications without impacting other parts

ASP.NET Core benefits from open-source availability and strong community support on GitHub, which facilitates regular updates that incorporate the latest technologies and standards This ensures ongoing improvements and compliance with current technological advancements.

ASP.NET Core offers seamless integration with contemporary tools and services like Docker, Kubernetes, and CI/CD systems, which boosts productivity and effectively supports large-scale projects.

ASP.NET Core prioritizes security by offering robust built-in tools, including ASP.NET Core Identity and JWT authentication, which help safeguard applications against common threats Additionally, it supports multi-factor authentication, enhancing overall protection for users.

Benefits of ASP.NET Core

ASP.NET Core offers versatile development capabilities, enabling the creation of diverse applications such as web applications, RESTful APIs, microservices, and IoT solutions, which makes it suitable for a broad spectrum of project objectives.

Modern Technologies: This framework integrates advanced technologies such as gRPC, WebSockets, and Blazor, optimizing user experience and enabling real-time application responsiveness

ASP.NET Core integrates effortlessly with leading IDEs like Visual Studio and Visual Studio Code, offering robust features such as IntelliSense, advanced debugging tools, and various utilities that enhance and expedite the development process.

ASP.NET Core is a cost-effective solution as it eliminates software purchase expenses and significantly cuts down on development time and effort, thanks to its built-in features and high reusability.

Thriving Community Support: ASP.NET Core benefits from a large developer community, offering comprehensive documentation, plugins, and shared solutions to tackle real-world challenges [3]

ASP.NET Core is a powerful and adaptable framework for building modern web applications, offering cross-platform capabilities and performance optimizations Its modular architecture and seamless integration with contemporary technologies make it a top choice for developers aiming to create high-performance applications Furthermore, its open-source nature and robust community support solidify ASP.NET Core's position as a leading option in the web development arena.

When compared to other frameworks like Node.js or Django (Python), ASP.NET

ASP.NET Core stands out for its exceptional performance and robust security features, making it a top choice for developing high-security applications such as e-commerce platforms While Node.js excels in asynchronous processing for I/O-heavy tasks, and Django focuses on rapid development, ASP.NET Core delivers superior performance optimization and cross-platform flexibility, positioning it as a leading framework for secure application development.

SYSTEM DESIGN ANALYSIS

Identify system actors

Customer: The primary user who purchases books, manages an account, interacts with features like searching, viewing details, adding to cart, paying, and tracking orders, while providing delivery information

Admin: Manages system operations, including book inventory, orders, and customer accounts

Employee: Assists with store operations, processes online orders, and supports in- store purchases, including payments and receipts

Payment System: Supports transactions via integrated gateways like credit cards and e-wallets

Use Case diagram

Actor: An external entity that interacts with the system to perform specific actions

Use Case: A description of the actions or functionalities provided by the system for the actors

Generalization: A relationship between two objects, where one object (child) inherits the attributes and behaviors of another object (parent)

Include: A relationship between UC where one UC includes the behavior of another UC

Extend: A relationship between UC where one UC may extend the behavior of another UC in special circumstances

Table 3.1 Symbols and Descriptions for Use Case Diagram

Diagram 3.1 General Use Case diagram

3.2.2 System Use Case Analysis and Description

Diagram 3.2 Use Case Diagram for User Account

Use Case Name: Register Account Complexity: Simple Use Case Description: The functionality that allows a new user to create a new account on the system

Preconditions: The user does not have an account in the system

Postconditions: A new user account has been successfully created

Main Event Flow Customer System

Accesses the system, click button

Displays the registration form Enters the required information and submits the form

Validate information: if invalid, prompt for correction; if valid, create the account, save it, and send a confirmation email

Table 3.2 Table Describing Use Case: Register Account

Diagram 3.3 Activity Diagram for Register Account

❖ Table Describing Use Case Login Account

Use Case Name: Login Account Complexity: Simple

Use Case Description: The feature allows registered users to log into the system by providing their username and password

Preconditions: The user already has an account in the system

Postconditions: The user has successfully logged into the system

Main Event Flow Customer, Admin,

Accesses the system, click button Login

Displays the login form Enters the required information and submits the form

Validates information: if invalid, prompts re-entry; if valid, authenticates and redirects to the main page

Table 3.3 Table Describing Use Case: Login Account

Diagram 3.4 Activity Diagram for Login Account

Use Case Name: Forgot Password Account Complexity: Medium

Use Case Description: The feature allows users to recover their password if they forget it

Primary Actor: Customer, Employee, Admin Secondary Actor:

Preconditions: The user already has an account in the system

Postconditions: The user has successfully recovered their new password

Main Event Flow Customer, Admin,

Accesses the system's login page and clicks on the "Forgot Password?"

Displays a form requesting the registered email address

Enters their email address and submits the form

Checks email: if invalid, prompts re- entry; if valid, sends a recovery link Receives the email and clicks on the password recovery link

Display a form requesting the newpassword

Enter the new password and submits the form

Validates the new password and confirms the update

Table 3.4 Table Describing Use Case: Forgot Password Account

Diagram 3.5 Activity Diagram for Forgot Password Account

Use Case Name: Log Out Account Complexity: Simple Use Case Description: This feature allows users to log out of the system

Primary Actor: Customer, Employee, Admin

Preconditions: The user already logged into the system

Postconditions: The user has successfully logged out of the system

Main Event Flow Customer, Admin,

Click the Log Out button on the system

Terminates the user's session and redirects them to the login page

Table 3.5 Table Describing Use Case: Log Out Account

Diagram 3.6 Activity Diagram for Logout Account

Diagram 3.7 Use Case Diagram for Personal Information

Use Case Name: View Personal Information Complexity: Simple

Use Case Description: The feature allows users to view their personal information, including details like name, email, and phone number,

Primary Actor: Customer, Employee, Admin Secondary Actor:

Preconditions: The user is logged into the system

Postconditions: The system displays the user's personal information

Main Event Flow Customer, Admin, Employee System

Selects the three-line menu in the top right corner of the navigation bar and chooses ‘Account

Retrieves and displays the user's personal information

Table 3.6 Table Describing Use Case: View Personal Information

Diagram 3.8 Use Case Diagram for View Personal Information

Use Case Name: Edit Personal Information Complexity: Simple

Use Case Description: The feature allows users to edit their personal information, including details like name, email, and phone number,

Primary Actor: Customer, Employee, Admin Secondary Actor:

Preconditions: The user is logged into the system

Postconditions: The user's personal information has been successfully updated, and a confirmation message is displayed indicating that the information has been updated

Main Event Flow Customer, Admin,

Selects the three-line menu in the top right corner of the navigation bar and chooses

Retrieves and displays the user's personal information

Edit the fields that need to be changed and clicks the

Validates information: if valid, saves changes and shows success; if invalid, prompts correction

Table 3.7 Table Describing Use Case: Edit Personal Information

Diagram 3.9 Activity Diagram for Edit Personal Information

Diagram 3.9 Use Case Diagram for Exploring Books

Use Case Name: View Book Complexity: Medium

Use Case Description: This feature allows customers to browse and view details of books available in the system, categorized by genre or author

Primary Actor: Customer Secondary Actor:

Preconditions: The user accesses the system

Postconditions: The system displays the list of books based on the selected category or author

Main Event Flow Customer System

Accesses the homepage of the system

Displays a list of all books Selects a book category from the navigation

Displays a list of books in that category

Displays the author's biography and a list of books by that author Selects a book to view more details

Displays the detail page for the selected book

Table 3.8 Table Describing Use Case: View Book

Diagram 3.10 Activity Diagram for View Book

Use Case Name: Search Book Complexity: Simple Use Case Description: The feature allows the user to search for books by entering specific keywords or details such as the title

Primary Actor: Customer Secondary Actor:

Preconditions: The user has accessed the system

Postconditions: The system displays the search results based on the user's query

Main Event Flow Customer System

Accesses the search icon on the navigation bar

Displays the keyword input bar Enters a search query

Processes search: shows results if matched, or "no results found" if not

Displays a list of all books or books by genre

Table 3.9 Table Describing Use Case: Search Book

Diagram 3.11 Activity Diagram for Search Book

Diagram 3.12 Use Case Diagram for Wishlist

Use Case Name: Add To Wishlist Complexity: Simple

Use Case Description: This feature allows the user to add a selected book to their wishlist for future reference

Primary Actor: Customer Secondary Actor:

Preconditions: The user is logged into the system

Postconditions: The selected book is successfully added to the user's wishlist, and the system displays a confirmation notification

Main Event Flow Customer System

Accesses the homepage of the system

Displays a list of all books

Click the ‘Add to Wishlist’ icon on the book you want to add

Processes request: notifies if in wishlist, adds and confirms if not

Table 3.10 Table Describing Use Case: Add To Wishlist

Diagram 3.13 Activity Diagram for Add To Wishlist

Use Case Name: View Wishlist Complexity: Simple Use Case Description: This feature allows the user to view books currently in their wishlist

Primary Actor: Customer Secondary Actor:

Preconditions: The user is logged into the system

Post-condition: The user successfully views book from user's wishlist

Main Event Flow Customer System

Accesses the system click to their wishlist

Displays all the books currently in the user's wishlist

Clicks the ‘Delete’ icon on the book that want to remove from their wishlist

Remove the book from the wishlist and return a confirmation message

Table 3.11 Table Describing Use Case: View Wishlist

Diagram 3.14 Activity Diagram for View Wishlist

Diagram 3.15 Use Case Diagram for Cart

Use Case Name: Add To Cart Complexity: Simple

Use Case Description: : The feature allows users to add their selected books to the shopping cart for purchase preparation

Primary Actor: Customer Secondary Actor:

Preconditions: The user is logged into the system

Postconditions: The selected book is successfully added to the user's cart, and the system displays a confirmation notification

Main Event Flow Customer System

Accesses the homepage of the system

Displays a list of available books

Click the ‘Add to Cart’ icon on the book you want to add

Processes request: increases quantity if in cart, adds with quantity 1 and confirms if not

Table 3.12 Table Describing Use Case: Add To Cart

Diagram 3.16 Activity Diagram for Add To Cart

Use Case Name: View Cart Complexity: Medium

Use Case Description: The feature allows the user to view books from their cart

Primary Actor: Customer Secondary Actor:

Preconditions: The user is logged into the system

Postconditions: The selected book is successfully view the user's cart

Main Event Flow Customer System

Accesses the system and click ‘Cart’ icon in navigation

Displays all the books currently in the user’s cart, including their titles, quantities, prices, and total cost

Checks after decreasing: if valid, updates count and total price; if exceeds stock, shows "Quantity exceeds available stock."

Checks after decreasing: if > 0, updates count and total price; if

0, removes book and confirms Click the ‘x’ button for a specific book

Removes the selected book from the cart and displays a confirmation message

Table 3.13 Table Describing Use Case: View Cart

Diagram 3.17 Activity Diagram for View Cart

Diagram 3.18 Use Case Diagram for Order

Use Case Name: Place Order Complexity: Medium

Use Case Description: The feature allows customers to place an order for the items in their cart

In this process, the primary actor is the customer, who must be logged into the system with items ready in their cart Once the customer initiates the checkout, the payment gateway facilitates the transaction Upon successful completion of the payment, the order is placed, and the system promptly provides an order confirmation to the customer.

Main Event Flow Customer System

Accesses the ‘Cart’ icon from the navigation bar

Displays all the books currently in the user's cart, including their titles, quantities, prices, and total cost

Reviews the items in the cart and clicks the ‘Place Order’ button

Displays a summary of the cart, including item details, quantities, and total cost

Transitions to the checkout form where the customer can input delivery and payment information

Fills out the checkout form

Validates details: processes order and confirms if code, redirects to VNPAY if selected

Customer completes payment via VNPAY

Displays an order confirmation message

Table 3.14 Table Describing Use Case: Place Order

Diagram 3.19 Activity Diagram for Place Order

Use Case Name: View Orders Complexity: Medium

Use Case Description: This feature allows customers to view a list of their orders

Primary Actor: Customer Secondary Actor:

Preconditions: The customer is logged into the system

Postconditions: The system displays a list of the customer's orders

Main Event Flow Customer System

Accesses the system and clicks the three lines menu on the navigation bar, click

Displays customer orders with Order Code, status, total amount, and contact info

Clicks on an ‘Order Code’ to view more details

Displays detailed information about the selected order, including items, quantities, and prices

Clicks the ‘Cancel’ button for an order

Cancels the order and displays a confirmation message: "Your order has been successfully canceled."

Clicks ‘Download Order’ to save it as a PDF

Generates order summary as PDF for customer download

Clicks ‘Confirm Receipt’ for a delivered order

Changes the order status to

"Received" and displays a confirmation message: "Order received successfully."

Table 3.15 Table Describing Use Case: View Orders

Diagram 3.20 Activity Diagram for View Orders

Diagram 3.21 Use Case Diagram for Managing Books, Authors, and

UC15: View Book/Author/Category

Use Case Name: View Book/Author/Category Complexity: Medium

Use Case Description: This function allows admin and employee to view information of all books/authors/categories in the system

Primary Actor: Admin, Employee Secondary Actor:

Preconditions: The Admin or Employee is logged into the system

Postconditions: The system displays a list of books/authors/categories that have been added to the system

Main Event Flow Admin, Employee System

Accesses the system, click Book/Author/Category Management

Displays a list of all book/author/category Clicks on a

‘Book/Author/Category Code’ to view its details

Displays the details of the selected book/author/category Enters the book/author/category title

63 into the search bar and presses Enter or clicks the search icon

Processes the search query and displays a list of books/authors/categories that match the search term

Displays a list of all books/authors/categories

Table 3.16 Table Describing Use Case: View Book/Author/Category

Diagram 3.22 Activity Diagram for View Book/Author/Category

UC16: Add Book/Author/Category

Use Case Name: Add Book/Author/Category Complexity: Medium

Use Case Description: This function allows Admin or Employee add a new book to the system

Primary Actor: Admin, Employee Secondary Actor:

Preconditions: The Admin or Employee is logged into the system

Postconditions: Admin or Employee added book/author/category to system successfully

Main Event Flow Admin, Employee System

Accesses the system, click Book/Author/Category Management

Displays a list of all book/author/category Clicks the ‘Add’ button

Displays a form for entering book/author/category details Fills in the required information in the form, clicks ‘Add’

Validates data and checks slug: shows " Book/Author/Category exists" if found, otherwise adds book/author/category and confirms

Table 3.17 Table Describing Use Case: Add Book/Author/Category

Diagram 3.23 Activity Diagram for Add Book/Author/Category

UC17: Edit Book/Author/Category

Use Case Name: Edit Book/Author/Category Complexity: Simple Use Case Description: The Admin or Employee can edit an existing book/author/category in the system

Primary Actor: Admin, Employee Secondary Actor:

Preconditions: The Admin or Employee is logged into the system

Postconditions: Admin or Employee edited book/author/category to system successfully

Main Event Flow Admin, Employee System

Accesses the system, click Book/Author/Category Management

Displays a list of all book/author/category Clicks the ‘Edit’ button

Displays the book details in a form that allows to edit information

Performs editing of information that needs to be changed, clicks the ‘Save’ button

Validates data and checks slug: shows " Book/Author/Category exists" if found, otherwise updates and confirms

Table 3.18 Table Describing Use Case: Edit Book/Author/Category

Diagram 3.24 Activity Diagram for Edit Book/Author/Category

UC18: Delete Book/Author/Category

Use Case Name: Delete Book/Author/Category Complexity: Simple

Use Case Description: This function allows Admin or Employee to delete a book from the system

Primary Actor: Admin ,Employee Secondary Actor:

Preconditions: The Admin or Employee is logged into the system

Postconditions: Admin or Employee deleted book to system successfully

Main Event Flow Admin, Employee System

Accesses the system, click Book/Author/Category Management

Displays a list of all book/author/category Clicks the ‘Delete’ buton

Displays a success message: " Book/Author/Category deleted successfully."

Table 3.19 Table Describing Use Case: Delete Book/Author/Category

Diagram 3.25 Activity Diagram for Delete Book/Author/Category

Diagram 3.26 Use Case Diagram for Warehouse Management

Use Case Name: View Warehouse Complexity: Medium

Use Case Description: This function allows admin and employee to view quantity of all books in the system

Primary Actor: Admin, Employee Secondary Actor:

Preconditions: The Admin or Employee is logged into the system

Postconditions: The system displays a list of books in the system including the quantity imported, sold, and remaining

Main Event Flow Admin, Employee System

Accesses the system, click Warehouse Management

Displays a list of all book including the quantity imported, sold, and remaining

Clicks on a Book Code to view its details

Displays the details of the selected book

Enters the book title into the search bar and presses Enter or clicks the search icon

Processes the search query and displays a list of books that match the search term

Displays a list of all books

Table 3.20 Table Describing Use Case: View Warehouse

Diagram 3.27 Activity Diagram for View Warehouse

Use Case Name: Add Book Quantity Complexity: Simple

Primary Actor: Admin, Employee Secondary Actor:

Preconditions: The Admin or Employee is logged into the system

Postconditions: The quantity of the selected book is updated in the inventory system

Main Event Flow Admin, Employee System

Accesses the system, click Warehouse Management

Displays a list of all book including the quantity imported, sold, and remaining

Clicks the "+" button next to the book they want to update

Displays a popup for entering the additional quantity to be added to the inventory

Inputs the desired quantity and clicks the "Add" button

Validates the input, updates the total quantity of the book by adding the entered value

Table 3.21 Table Describing Use Case: Add Book Quantity

Diagram 3.28 Activity Diagram for Add Book Quantity

Diagram 3.29 Use Case Diagram for Order Management

Use Case Name: View Order Complexity: Medium

Use Case Description: This function allows admin and employee to view information of all order in the system

Primary Actor: Admin, Employee Secondary Actor:

Preconditions: The Admin or Employee is logged into the system

Postconditions: The system displays a list of orders that have been added to the system

Main Event Flow Admin, Employee System

Accesses the system, click Order Management

Displays a list of all orders available in the system

Clicks on a Order Code to view its details

Displays the details of the selected order

Enters the order title into the search bar and presses Enter or clicks the search icon

Processes the search query and displays a list of orders that match the search term

Displays a list of all categories

Table 3.22 Table Describing Use Case: View Order

Diagram 3.30 Activity Diagram for View Order

Use Case Name: Create Order Complexity: Medium

Use Case Description: This use case describes the process of creating an order for a customer purchasing books directly at the store

Primary Actor: Admin, Employee Secondary Actor:

Preconditions: The Admin or Employee is logged into the system

Postconditions: The system displays a list of orders that have been added to the system

Main Event Flow Admin, Employee System

Accesses the system, click Order Management

Displays a list of all orders available in the system

Display the add book to order screen

Selects the books the customer has brought to the counter and adds them to the cart and Clicks on

Display the added products screen and customer information entry form

Enters the customer's information into the form and click Place Order

Table 3.23 Table Describing Use Case: Create Order

Diagram 3.31 Activity Diagram for Create Order

Diagram 3.32 Use Case Diagram for Role Management

Use Case Name: View Role Complexity: Simple

Use Case Description: This function allows admin to view list of all roles in the system

Primary Actor: Admin, Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: The system displays a list of roles that have been added to the system

Main Event Flow Admin System

Accesses the system, click Role Management

Displays a list of all roles

Table 3.24 Table Describing Use Case: View Role

Diagram 3.33 Activity Diagram for View Role

Use Case Name: Add Role Complexity: Medium

Use Case Description: This function allows Admin add a new role to the system

Primary Actor: Admin Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: Admin or Employee added role to system successfully

Main Event Flow Admin System

Accesses the system, click Role Management

Displays a list of all Role Clicks the Add button

Displays a form for entering role details

Fills in the required information in the form, clicks Add button

Validates data and checks Role Name: shows "Role exists" if found, otherwise adds and confirms

Table 3.25 Table Describing Use Case: Add Role

Diagram 3.34 Activity Diagram for Add Role

Use Case Name: Edit Role Complexity: Simple

Use Case Description: The Admin can edit an existing role in the system

Primary Actor: Admin Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: Admin or Employee edited role to system successfully

Main Event Flow Admin System

Accesses the system, click Role Management

Displays a list of all roles Clicks the Edit button

Displays the role details in a form that allows to edit information

Performs editing of information that needs to be changed, clicks the Save button

Validates data and checks Role name: shows "Role exists" if found, otherwise updates and confirms

Table 3.26 Table Describing Use Case: Edit Role

Diagram 3.35 Activity Diagram for Edit Role

Use Case Name: Delete Role Complexity: Simple

Use Case Description: This function allows Admin or Employee to delete a role from the system

Primary Actor: Admin Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: Admin deleted role to system successfully

Main Event Flow Admin System

Accesses the system, click Role Management

Displays a list of all roles Clicks the Delete buton

"Cannot delete, assigned to users" if assigned, otherwise confirms deletion

Table 3.27 Table Describing Use Case: Delete Role

Diagram 3.36 Activity Diagram for Delete Role

Diagram 3.37 Use Case Diagram for User Account Management

Use Case Name: View User Complexity: Medium

Use Case Description: This function allows admin to view information of all users in the system

Primary Actor: Admin Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: The system displays a list of users that have been added to the system

Main Event Flow Admin System

Accesses the system, click User Management

Displays a list of all users available in the system

Clicks on a Username to view its details

Displays the details of the selected User

Enters the Username into the search bar and presses Enter or clicks the search icon

Processes the search query and displays a list of Users that match the search term

Displays a list of all categories

Table 3.28 Table Describing Use Case: View User

Diagram 3.38 Activity Diagram for View User

Use Case Name: Add User Complexity: Medium

Use Case Description: The Admin can add a new User to the system

Primary Actor: Admin Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: Admin added user to system successfully

Main Event Flow Admin System

Accesses the system, click User Management

Displays a list of all User Clicks the Add User button

Displays a form for entering User details

Fills in the required information in the form

System validates the entered data If all fields are valid, the system will prepare the User for addition

Clicks the Add button to add the User

Validates the data and checks the Username: If it exists, displays

"The User with this title already exists." If unique, adds the User and shows "User added successfully."

Table 3.29 Table Describing Use Case: Add User

Diagram 3.39 Activity Diagram for Add User

Use Case Name: Edit User Complexity: Medium

Use Case Description: The Admin can edit an existing User in the system

Primary Actor: Admin Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: Admin edited category to system successfully

Main Event Flow Admin System

Accesses the system, click User Management

Displays a list of all User Clicks the Edit button

Displays the User details in a form that allows to edit information

Performs editing of information that needs to be changed, clicks the Save button

Validates the data and checks the Username: If it exists, displays

"The User with this title already exists." If unique, updates the User and shows "User Edited successfully."

Table 3.30 Table Describing Use Case: Edit User

Diagram 3.40 Activity Diagram for Edit User

Use Case Name: Delete User Complexity: Simple Use Case Description: This function allows Admin to delete a User from the system

Primary Actor: Admin Secondary Actor:

Preconditions: Admin has logged into the system

Postconditions: Admin deleted the User successfully

Main Event Flow Admin System

Accesses the system, click User Management

Displays a list of all users Clicks the Delete button

Table 3.31 Table Describing Use Case: Delete User

Diagram 3.41 Activity Diagram for Delete User

Diagram 3.42 Use Case Diagram for Employee Management

Use Case Name: View Employee Complexity: Medium

Use Case Description: This function allows admin to view information of all

Primary Actor: Admin Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: The system displays a list of Employees that have been added to the system

Main Event Flow Admin System

Accesses the system, click Employee Management

Displays a list of all Employees available in the system

Clicks on a Employeename to view its details

Displays the details of the selected Employee

Enters the Employeename into the search bar and presses Enter or clicks the search icon

Processes the search query and displays a list of Employees that match the search term

Displays a list of all categories

Table 3.32 Table Describing Use Case: View Employee

Diagram 3.43 Activity Diagram for View Employee

Use Case Name: Add Employee Complexity: Medium Use Case Description: The Admin can add a new Employee to the system

Primary Actor: Admin Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: Admin added Employee to system successfully

Main Event Flow Admin System

Accesses the system, click Employee Management

Displays a list of all Employee Clicks the Add Employee button

Displays a form for entering Employee details

Fills in the required information in the form

System validates the entered data If all fields are valid, the system will prepare the

Employee for addition Clicks the Add button to add the Employee

Validates the data and checks the Employee name: If it exists, displays "The Employee with this title already exists." If unique, adds the Employee and shows

Table 3.33 Table Describing Use Case: Add Employee

Diagram 3.44 Activity Diagram for Add Employee

Use Case Name: Edit Employee Complexity: Medium Use Case Description: The Admin can edit an existing Employee in the system

Primary Actor: Admin Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: Admin edited category to system successfully

Main Event Flow Admin System

Accesses the system, click Employee Management

Displays a list of all Employee Clicks the Edit button

Displays the Employee details in a form that allows to edit information

Performs editing of information that needs to be changed, clicks the Save button

Validates the data and checks the Employee name: If it exists, displays "The Employee with this title already exists." If unique, updates the Employee and shows

Table 3.34 Table Describing Use Case: Edit Employee

Diagram 3.45 Activity Diagram for Edit Employee

Use Case Name: Delete Employee Complexity: Simple Use Case Description: This function allows Admin to delete a Employee from the system

Primary Actor: Admin Secondary Actor:

Preconditions: Admin has logged into the system

Postconditions: Admin deleted the Employee successfully

Main Event Flow Admin System

Accesses the system, click Employee Management

Displays a list of all Employees Clicks the Delete button

Table 3.35 Table Describing Use Case: Delete Employee

Diagram 3.46 Activity Diagram for Delete Employee

Diagram 3.47 Use Case Diagram for Customer Management

Use Case Name: View Customer Complexity: Medium

Use Case Description: This function allows admin to view information of all customers in the system

Primary Actor: Admin Secondary Actor:

Preconditions: The Admin is logged into the system

Postconditions: The system displays a list of customer that have been added to the system

Main Event Flow Admin System

Accesses the system, click Customer Management

Displays a list of all Customers available in the system

Enters the Phonenumber into the search bar and presses Enter or clicks the search icon

Processes the search query and displays a list of customer that match the search term

Displays a list of all user Click on the customer order number

Display a list of all orders for that customer

Click on the customer book number

Display a list of all books for that customer

Table 3.36 Table Describing Use Case: View Customer

Diagram 3.48 Activity Diagram for View Customer

Database Design

Diagram 3.49 Summary of General Database Tables

3.2.2 Detailed design of database tables

BookId nvarchar (450) Unique identifier for each book

BookName nvarchar (max) Name of the book

BookSlug nvarchar (max) URL string for the book name

Price Int Selling price of the book

Description nvarchar (max) Detailed description of the book's content ImportedQuantity Int Quantity of books imported into inventory Location nvarchar (max) Storage location of the book in the warehouse

Image nvarchar (max) URL or file name of the book's representative image

AuthorId nvarchar (450) Foreign key referencing the Authors table, representing the book's author

CategoryId nvarchar (450) Foreign key referencing the Categories table, defining the book's category

BookCode nvarchar (max) Internal code, used for system management

Table 3.37 Design of Database Tables: Books

OrderId nvarchar (255) Unique identifier for each order

OrderCode nvarchar (255) A unique code representing the order, used for tracking and referencing

UserId nvarchar (255) Foreign key referencing the user who placed the order

CreateDate Datetime The date and time when the order was created

Status int Indicates the current status of the order Address nvarchar (max) The shipping address for the order

PhoneNumber nvarchar (max) The contact phone number of the customer for this order

TotalAmount Int The total monetary value of the order (in

PaymentMethod nvarchar (max) The method of payment chosen by the customer FullName nvarchar (max) The full name of the customer placing the order

Table 3.38 Design of Database Tables: Orders

AuthorId nvarchar (450) A unique identifier for each author, used as the primary key

AuthorName nvarchar (max) The name of the author

The AuthorSlug is a user-friendly identifier that represents the author's name and is commonly utilized in URLs Additionally, the Information field contains comprehensive details about the author, enhancing reader engagement Lastly, the Image field provides a URL link to the author's profile picture or portrait, allowing for a visual connection with the audience.

AuthorCode nvarchar (max) An additional identifier, which can be used for management purposes

Table 3.39 Design of Database Tables: Authors

CategoryId nvarchar (450) A unique identifier for each category, used as the primary key

CategoryName nvarchar (max) The name of the category

CategorySlug nvarchar (max) A user-friendly slug representing the category name, often used in URLs

Description nvarchar (max) A brief description of the category's purpose or content

CategoryCode nvarchar (max) An additional identifier, which can be used for internal management or references

Table 3.40 Design of Database Tables: Categories

Id nvarchar (255) A unique identifier for each order detail entry

OrderCode nvarchar (255) A code representing the associated order, linking to the main order table

BookId nvarchar (255) A unique identifier for the book included in the order, referencing the book table

Price int The price of the book at the time the order was placed

Quantity int The quantity of the book purchased in the order

Table 3.41 Design of Database Tables: OrderDetails

WishlistId nvarchar (450) A unique identifier for each item in the user's wishlist

BookId nvarchar (450) A unique identifier for the book in the wishlist, linking to the Book table

UserId nvarchar (max) The user ID, identifying the owner of the wishlist

Table 3.42 Design of Database Tables: Wishlists

Id nvarchar (450) A unique identifier for each order transaction

The OrderDescription field provides a detailed overview of the items or services included in the order The TransactionId serves as a unique identifier for tracking the payment status and processing of the transaction Additionally, the PaymentMethod indicates the specific method used for completing the order's payment.

CreateDate datetime The date and time when the order was created

OrderCode nvarchar (max) A code representing the order, used for tracking and identifying the order in the system

Table 3.43 Design of Database Tables: VnpayInfor

ASP.NET Core Identity and Automatically Generated Tables

In this system, user authentication and authorization are managed through ASP.NET

The Core Identity framework streamlines user management by automatically generating essential tables such as AspNetUsers, AspNetRoles, and AspNetUser Roles, along with other related tables This system efficiently manages user data, roles, and their interrelations, providing a secure user management solution without requiring manual table setup.

Id nvarchar (450) A unique identifier for the user

UserName nvarchar (256) The username chosen by the user for logging in

Email nvarchar (256) The email address of the user, used for authentication and communication

PasswordHash nvarchar (max) A hashed version of the user's password for secure authentication

SecurityStamp nvarchar (max) A unique token used to track changes in security information ConcurrencyStamp nvarchar (max) A unique value used to handle concurrency conflicts when updating user data

PhoneNumber nvarchar (max) The user's phone number, used for contact or authentication

Address nvarchar (max) The address of the user

The user’s full name is stored as a nvarchar(max) data type, primarily utilized for display purposes Additionally, the RoleId, also defined as nvarchar(max), represents the unique identifier assigned to the user, connecting them to the predefined roles within the system.

Token nvarchar (max) A unique token for the user, used for password resets, email verification, or other actions

Table 3.44 Design of Database Tables: AspNetUsers

UserId nvarchar (450) A unique identifier for the user, used to link the user to their assigned role

RoleId nvarchar (450) A unique identifier for the role, used to define the user’s access level or permissions

Table 3.45 Design of Database Tables: AspNetUserRoles

Id nvarchar (450) A unique identifier for the role, typically used as the primary key

Name nvarchar (256) The name of the role

Table 3.46 Design of Database Tables: AspNetRoles

DESIGN THE THEME

CONCLUSION

Ngày đăng: 15/04/2025, 23:18

TRÍCH ĐOẠN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w