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

Đồ án tốt nghiệp: Build a website to sell phones with integraged AI suggestions

53 1 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 đề Build a website to sell phones with integrated AI suggestions
Tác giả Tran Hai An
Người hướng dẫn Assoc. Prof. Dr. Nguyen Thanh Tung
Trường học Vietnam National University, Hanoi International School
Chuyên ngành Informatics and Computer Engineering
Thể loại Đồ án tốt nghiệp
Năm xuất bản 2025
Thành phố Hanoi
Định dạng
Số trang 53
Dung lượng 2,45 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. Project Overview (8)
    • 1.1 About the project (8)
      • 1.1.1 Objectives and reasons for implementing the project (8)
      • 1.1.2 The importance of a website that sells phones with built-in AI product (9)
    • 1.2 Scope and objects of use (10)
      • 1.2.1 Scope of use (10)
      • 1.2.2 Audience (10)
    • 1.3 Technology used in the project (10)
    • 1.4 Project structure (10)
  • Chapter 2. Theoretical basis and technological foundation (12)
    • 2.1 Theories and methods of application (12)
      • 2.1.1 System analysis and modeling (12)
      • 2.1.2 Requirements analysis and database building (13)
      • 2.1.3 Knowledge of software testing (13)
    • 2.2 Technology platform used in the project (14)
      • 2.2.1 PHP and Laravel overview (14)
      • 2.2.2 Model MVC (Model-View-Controller) (15)
      • 2.2.3. OpenAi API (17)
      • 2.2.4. Comparison with Other AI Solutions (18)
  • Chapter 3. Requirements Analysis (22)
    • 3.1 System implementation model (22)
    • 3.2 System function analysis (23)
    • 3.3 Usecase chart (25)
  • Chapter 4. System Design (26)
    • 4.1 Deployment model (26)
    • 4.2 Database design (27)
      • 4.2.1 Database model (27)
      • 4.2.2 Entity details (28)
    • 4.3 User interface design (UI/UX) (31)
      • 4.3.1 Sitemap (31)
      • 4.3.2 Customer interface design (33)
      • 4.3.3 Admin interface design (36)
  • Chapter 5. System Development Process (41)
    • 5.1 Backend development with laravel (41)
      • 5.1.1 Project structure and organization in laravel (41)
      • 5.1.2 Routes, controllers, and data models (Eloquent ORM) (42)
      • 5.1.3 Database management with migrations and seeding (42)
    • 5.2 Frontend development with bootstrap 4.2 (43)
      • 5.2.1 UI design with bootstrap (43)
      • 5.2.2 Interface components (43)
    • 5.3 Integrate the main features of the website (43)
    • 5.4. Using Open AI API in The website by Laravel (44)
  • Chapter 6. System Testing and Evaluation (46)
    • 6.1 System Testing (46)
      • 6.1.1 Types of tests to perform (46)
      • 6.1.2 Tests for key system features (46)
    • 6.2 Performance and security reviews (48)
      • 6.2.1 Website Performance Review (48)
      • 6.2.2 Security measures applied in the system (48)
  • Chapter 7. Conclusion AND DEVELOPMENT DIRECTION (50)
    • 7.1 Conclude (50)
      • 7.1.1 Summarizing the results of the project implementation and achievements 43 (50)
      • 7.1.2 Strengths and weaknesses of the system (50)
    • 7.2 Future development direction (51)
      • 7.2.1 Scalable features (51)
      • 7.2.2 Performance and security improvements for future versions (52)

Nội dung

Product management page interface .... Child product management page interface .... Customer management page interface.... 1.1.1 Objectives and reasons for implementing the project 1.1.

Project Overview

About the project

The "Creating a Website for Mobile Phone Sales with AI-Driven Recommendations" initiative offers a modern solution that enhances the search and selection of mobile phones tailored to individual preferences Central to this project is the integration of Chat GPT technology, an advanced AI system designed to refine personalized product recommendations Serving as a virtual assistant, Chat GPT delivers insights based on customer preferences, specific needs, and previous purchasing history.

The system goes beyond merely providing product information; it enhances the customer experience by addressing inquiries, offering personalized recommendations, and delivering shopping assistance This approach fosters a highly tailored and convenient interactive experience for users.

1.1.1 Objectives and reasons for implementing the project

• Develop a sophisticated and user-friendly sales website

• Integrate GPT Chat to set up an online support system and product recommendations, increasing customer interaction and satisfaction

• Equip administrators with comprehensive management tools, allowing efficient tracking of products, categories, orders and customer interactions

• Enhance user experience by leveraging modern technologies, ensuring the website meets the changing needs of the market.

1.1.1.2 Reason for implementing the project:

• Personalize the shopping experience: Customers are increasingly demanding assistance that is customized and tailored to their unique needs

• Intelligent online consultation capabilities: Many customers need specific guidance when choosing products, especially high-tech products such as phones

• Increased competition: Chat GPT integration not only improves the service but also creates a differentiated highlight for websites in the market

1.1.2 The importance of a website that sells phones with built-in AI product suggestions

A phone sales website integrated with GPT Chat provides significant benefits for both customers and administrators

• Easy access to a diverse product catalog with detailed and continuously updated information

• Interaction with the AI assistant (Chat GPT) to receive personalized shopping recommendations, answer questions, and assist in decision- making

• Enhanced user experience with advanced search features, product reviews, and shopping history tracking

• Facilitates effective product and order management

• Analyzes user behavior through interaction data with Chat GPT, allowing for the optimization of business strategies

• Enhance operational efficiency by integrating modern management and security tools

Scope and objects of use

• This website supports online sales of mobile phones, accessories and warranty/repair services

• Integrate AI tool (Chat GPT) to provide intelligent support features for both customers and administrators

• Individuals or enterprises seeking a straightforward purchase of mobile phones or accessories

• Those requiring AI guidance and assistance to identify the most suitable product for their needs

• Accountable for overseeing the product catalog, order processing, and customer information

• Supervise and assess customer engagement to enhance operational efficiency.

Technology used in the project

The project leverages the Laravel Framework for backend development, while the user interface is crafted using HTML, CSS, and Bootstrap It utilizes a MySQL database for efficient data management and integrates Chat GPT through the OpenAI API to enhance user experience with advanced intelligent features.

Project structure

The report consists of key chapters, each detailing essential aspects of the project's implementation process Below is a summary of each chapter:

− Chapter 2: theoretical basis and technological platform

− Chapter 6: system testing and evaluation

Theoretical basis and technological foundation

Theories and methods of application

Systems analysis and modeling are crucial in software design and development, as they help identify both functional and non-functional requirements The primary objective of systems analysis is to ensure that the software fulfills end-user needs while maintaining the ability for future enhancements and easy maintenance.

Functional analysis is crucial for identifying and defining the primary functions of a system based on user needs This approach helps uncover use cases that illustrate specific actions or interactions between the user, referred to as the actor, and the system By focusing on these elements, functional analysis ensures that the system effectively meets user requirements.

System modeling involves the use of tools like Use Case Diagrams, Activity Diagrams, and Sequence Diagrams to illustrate the actions and workflows within a system These diagrams effectively show the relationships between actors and the functions present in the system, enhancing understanding of the overall processes.

− Use case diagram: It is helpful to explain the key functions of the system and the related agents

− Activity diagram: Shows the action steps in a specific process of the system

− Sequence diagram: Describes how data and information moves among objects in the system with time

2.1.2 Requirements analysis and database building

Requirement analysis is the crucial first step in system development, enabling a clear understanding of user needs This process involves the collection, specification, and organization of both functional and non-functional requirements to meet the system's objectives effectively.

Database design plays a crucial role in the effective storage and management of information within a system The Relational Model, developed by Edgar F Codd in the 1970s, serves as a foundational theory for database design, organizing data into tables that interconnect through primary and foreign keys This structure ensures that data remains well-organized and prevents duplication, enhancing the overall integrity of the system.

An Entity-Relationship Diagram (ERD) is a vital tool for modeling databases, helping to identify entities and their interrelationships By creating database models, ERDs facilitate the establishment of tables and define relationships such as one-to-one (1:1), one-to-many (1:N), and many-to-many (N:M), ensuring the maintenance of data integrity.

Database normalization is essential for minimizing data duplication and enhancing storage efficiency By adhering to standardization levels such as 1NF, 2NF, and 3NF, a database system becomes more manageable and easier to maintain.

The procedure called software testing, it checks the quality of a software It ensures that system works in correct fashion and also fulfills requirements given by users

• Unit Testing: This helps to check each part of the source code, such as functions or classes It's to make sure they are working correctly

• Integration Testing: The goal of integration testing is to examine the interaction among different modules or sub-systems, ensuring they operate successfully together

• System Testing: Complete system testing to verify if all components are working correctly and meeting the required conditions

• Acceptance Testing: This is a process to confirm whether the system meets the requirements of our customers or not

Ensuring software safety is a crucial aspect of system evaluation, as it safeguards against vulnerabilities and threats like SQL Injection, Cross-Site Scripting (XSS), and Cross-Site Request Forgery (CSRF).

Technology platform used in the project

PHP, or Hypertext Preprocessor, is a popular server-side programming language used for web application development It primarily manages server-side databases, verifies user identities, and creates dynamic website content PHP's popularity stems from its flexibility, ease of learning, and compatibility with various operating systems and web servers Additionally, the abundance of open-source libraries and robust community support enhances PHP's efficiency, saving time in development processes.

The reasons for using PHP in website development include:

• Open and free: PHP is source open also without cost, this makes development expenses low [5]

• High compatibility: PHP performs well on many operating systems and with website hosts like Apache, Nginx [3]

• Fast processing capability: PHP can manage requests in a fast manner, this feature of it makes it highly suitable for web applications having large amount of user traffic [4]

2.2.2 Model MVC (Model-View-Controller)

Image 2.1 How the MVC model works in Laravel

• Explain how the MVC model works:

− The user sends an HTTP request to the web application via the browser

− This request may include activities like going to a page, filling out a form or asking for certain resources from the server

In Laravel, the routing system processes HTTP requests from the browser, directing them to the appropriate Controller and its corresponding action to fulfill the request.

− In Laravel, routing is placed in web.php or api.php files Here, requirements get connected to particular controllers

The controller serves as the intermediary in communication between the user and the system, processing requests received from the route It executes essential business logic, such as validating the request, and retrieves data from the database via the model, ultimately returning the appropriate results.

− In this procedure, the Controller has the ability to authenticate information (like form submissions) or deal with user-related requests

− The model here serves as a link to the database In Laravel, it chiefly uses an eloquent ORM to do all CRUD operations beyond just the database

− If a controller seeks more information, such as a list of courses or a record of buyers, then the Model works with the database to retrieve or interrogate the required data

In Laravel, the Blade Template Engine facilitates the separation of logic from the user interface, allowing for efficient data presentation in the View after the Model and Controller have processed the information.

− View is only called to pull data through the Controller, not to meddle in handling data The whole purpose of the View is to display a friendly interface output

The user will receive data as a response via their web browser after the interface is presented through the View Once processed by the Controller, the updated data will be displayed to the user through the View interface.

The OpenAI API is a cutting-edge artificial intelligence platform known for its robust natural language processing (NLP) capabilities Featuring pre-trained models like GPT (Generative Pre-trained Transformer), it supports diverse applications including content generation, chatbots, and sentiment analysis By integrating the OpenAI API into your project, you can significantly enhance system functionality, enabling intelligent product recommendations, dynamic content generation, and efficient customer query handling.

Reasons for Choosing OpenAI API

• Versatility: OpenAI API supports multiple use cases, making it adaptable for different features of the website

• Ease of Integration: The API provides a straightforward way to connect with the backend using simple HTTP requests

• Accuracy and Performance: Its advanced machine learning models offer high accuracy in understanding and generating human-like text

• Scalability: OpenAI API is cloud-based, ensuring that the system can handle increased user demands without significant performance issues

2.2.4 Comparison with Other AI Solutions

When considering advanced AI capabilities, the OpenAI API stands out as a top choice; however, it is essential to evaluate it against other major AI solutions like Google AI, IBM Watson, and Amazon SageMaker to identify its strengths and weaknesses A comprehensive comparison based on critical criteria will provide valuable insights into each platform's performance and suitability for various applications.

Specialized in natural language processing (NLP) and text generation

Offers pre-trained models like GPT, which are highly effective for conversational

- Strong integration with Google Cloud services

- Designed for building chatbots and voice assistants but may lack flexibility in custom NLP tasks

- Provides advanced analytics and machine learning capabilities

- Focused on enterprise solutions with robust data analysis and domain- specific AI

- A versatile machine learning platform for developing and deploying custom models

- Requires more effort to build models compared to pre-trained solutions like OpenAI

- Simple and user-friendly with easy-to-follow documentation

- Requires minimal setup to integrate into applications

- Integration is straightforward, but advanced customization requires familiarity with Google Cloud

- Requires a steep learning curve due to its wide range of enterprise-level tools

- Suitable for data scientists but can be complex for beginners without prior knowledge of machine learning

- Pay-as-you-go pricing model with competitive rates for NLP services

- Cost-effective for projects already using Google Cloud but can be expensive for standalone use

- Higher costs, often tailored for large-scale enterprise applications

- Flexible pricing but can become expensive depending on the scale and resource usage

- Easy to integrate into any system using RESTful APIs

- Seamless integration with Google Cloud products and services

- Primarily designed for enterprise systems and may require additional customization

- Provides extensive tools for integration but is better suited for AWS environments

- Excels in generating human-like text and providing contextual suggestions

- Strong performance for voice-based and conversational AI

- Effective for data-heavy enterprise applications

- High performance for custom models but relies heavily on the developer’s expertise

Requirements Analysis

System implementation model

• This model consists of 3 main components:

− Server component is the data source of the system

− The MySQL Database is the database of the system, which actually stores data and manipulates it

− This component consists of 2 types of users: admins and customers

− Both of these types of users have the ability to access and interact with MySQL databases, represented by two-way arrows

• The link between the components:

− The server sends data to MySQL Database via a unidirectional arrow

− Administrators and customers can read and write data to MySQL Database, represented by two-dimensional arrows.

System function analysis

The phone-selling system powered by artificial intelligence is designed to cater to the needs of both customers and administrators, offering essential functionalities that enhance user experience and streamline operations.

Feature Short description of the feature

Customer Register an account Customers can create a personal account to access and use the services of the website

Log Users will be able to log in into their account to use personalization features

Log off Customers can log out of their account when they are no longer in use

Product Search Search for products by keyword, category, or brand View product information

View detailed product information such as price, specifications, descriptions, and illustrations

Chat GPT analyzes behavior and preferences to suggest the right products

Place an order Add products to your cart and place orders with ease Track purchase history

Peruse a catalog of orders that have been executed and product particulars

Leave a review and comment on the purchased product

Chat GPT supports answering questions about products, pricing, or warranty policies

Compare Products The feature compares specifications, prices, and reviews of various products

Save Favorites List Save your favorite products for easy access and later shopping

Receive automatic notifications from the system about promotions and special discounts

Admin Log Administrators can log in to the administration system to perform management functions

Log off Administrators can log out of the system after completing their work

Add, edit, delete product catalogues and sort by management criteria

Manage product information such as adding, editing, deleting and updating prices, images, detailed descriptions

Order Management Track and update the status of orders, handle cancellation/exchange/return requests from customers Customer

Manage customer lists, track activity, and handle responses

Provide revenue reports, hot-selling products, and sales performance

Check and optimize the operation of the Chat GPT system, customize the suggested data if necessary Security and system management

Ensure system safety, manage access, handle technical issues

Browse, edit, or delete inappropriate comments

Manage product color and capacity

Update color and capacity details for each product

Send promotions and offers to customers via the integrated email or message system

Usecase chart

System Design

Deployment model

In the development of a website for selling AI-integrated phones, I implemented the MVC (Model-View-Controller) architecture alongside MySQL for effective data management and processing The following diagram illustrates the operational framework of this model within the project.

Database design

School Name Data Type Bind Describe id int(11) PRIMARY KEY,

Product Category ID nameCategory varchar(255) NOT NULL Product Category Name delCategory tinyint(4) NOT NULL, DEFAULT 0 Deletion status (0: not deleted, 1: deleted) imageCategory varchar(255) NOT NULL Catalog image link

School Name Data Type Bind Describe id int(11) PRIMARY KEY,

Product ID mainImage varchar(255) NOT NULL Main image of the product

22 nameProduct varchar(255) NOT NULL Product Name description Varchar(1000) NOT NULL Product Description delProduct tinyint(4) NOT NULL, DEFAULT 0 Deletion Status category_id int(11) FOREIGN KEY Product Category ID

Data Type Bind Describe id int(11) PRIMARY KEY,

The product detail includes essential attributes such as color ID, capacity ID, and product ID, all linked as foreign keys It specifies the inventory quantity, which is a mandatory integer, alongside a deletion status indicated by a tiny integer with a default value of zero Additionally, the product price is recorded as a required float, and detailed images are stored as a varchar with a maximum length of 255 characters.

The school database includes a table with several key attributes: an 'id' field, which is an integer and serves as the primary key with auto-increment; a 'nameColor' field, which is a non-nullable varchar that stores the color name; a 'category_id' field that acts as a foreign key linking to the category; and a 'delColor' field, a tiny integer that indicates the deletion status, defaulting to 0.

The school database includes a table with the following key attributes: an integer ID that serves as the primary key and auto-increments, a varchar field for the capacity name that cannot be null, an integer for the category ID which acts as a foreign key, and a tiny integer for the deletion status, defaulting to zero to indicate active records.

The data type bind for the user table includes an integer ID as the primary key with auto-increment, a non-null varchar username, a unique non-null varchar email for login, and a non-null varchar password Additionally, it features a foreign key role ID, a non-null varchar phone number, a non-null varchar address, and a deletion status represented by a tinyint with a default value of 0.

School Name Data Type Bind Describe id int(11) PRIMARY KEY,

Order ID user_id int(11) FOREIGN KEY User ID dateOrder datetime NOT NULL, DEFAULT current_timestamp

The order date is recorded as a tiny integer with a default value of 0, indicating the status of the order The total order amount is specified as a float, while the payment methods are also categorized as a tiny integer, defaulting to 0 Additionally, the pickup phone number is stored as a varchar with a maximum length of 255 characters, alongside the pickup address, which is similarly formatted.

School Name Data Type Bind Describe id int(11) PRIMARY KEY,

The Order Detail table includes several key fields: the order ID, which is a foreign key linking to the main order, the product detail ID as a foreign key for identifying the specific product, the quantity indicating the number of items purchased, and the total amount representing the overall cost of the transaction.

Data Type Bind Describe id int(11) PRIMARY KEY, AUTO_INCREMENT Role ID nameRole varchar(255) NOT NULL Role Name

School Name Data Type Bind Describe id int(11) PRIMARY KEY,

Comment ID user_id int(11) FOREIGN KEY User ID product_id int(11) FOREIGN KEY Product ID dateComment datetime NOT NULL, DEFAULT current_timestamp

Comment Date content Varchar(1000) NOT NULL Comment content

School Name Data Type Bind Describe id int(11) PRIMARY KEY,

Cart ID user_id int(11) FOREIGN KEY User ID

24 product_detail_id int(11) FOREIGN KEY Product Detail ID quantity int(11) NOT NULL, DEFAULT 1 Amount total Float NULL NOTE Total Money

User interface design (UI/UX)

Sitemaps for customers are designed with the goal of optimizing the user experience and making it easy to access information The structure is divided into three main parts:

− Allow all users to access without logging in

− Includes homepage, product listings, and about pages

− Integrated search and categorization of products by category

− Detailed display of each product

− Requires login authentication to access

− Track and view order details

Sitemaps for administrators are designed to optimize the management and operation of the system The structure is organized into specialized management modules:

− Provide tools to add, edit, and delete products

− Track and update product status

− Create and edit product categories

− Control the active status of your catalogue

Description: The main interface of the website, displaying featured or latest products and links to key categories and functions The interface design is user- friendly and easy to use

Description: Displays a list of all available products on your website Users can browse through all the products and select details to see more information

Image 4.7 All products page interface

Description: Provide a list of products by category such as iPhone, Samsung, Xiaomi Allow users to search and view products according to their needs

Image 4.8 Product catalog page interface

Description: Displays detailed information of the product, including name, price, color, capacity, images, and purchase options The interface is designed intuitively so that customers can easily make purchasing decisions

Image 4.9 Product detail page interface

Description: Displays a list of products that the user has added to the cart Users can check the product information, quantity, total price, and proceed to place an order

Description: A page that introduces the company, its mission, and the value it brings to customers Interface design creates professionalism and increases trust with customers

Description: Welcome page when an administrator logs in to the admin system The admin guide starts by selecting items in the left menu

Description: Admins can add, edit, or delete product categories These categories are used to categorize products on the system

Image 4.13 Catalogue management page interface

Description: The administrator manages the color options for the product Allows to add, modify, or remove specific colors

Image 4.14 Color management page interface

Description: A page to manage the storage of your products, for example, 16GB, 32GB Administrators can add, edit, or remove these options

Image 4.15 Capacity management page interface

Description: Displays a list of existing products, allowing admins to add new products, edit information, or delete products that are no longer valid

Image 4.16 Product management page interface

Description: The page manages specific versions of your products, including colors, sizes, inventory quantities, and prices

Image 4.17 Child product management page interface

Description: Admins can view customer lists, lock accounts, or track customers' personal information such as emails, addresses, phone numbers

Image 4.18 Customer management page interface

Description: Track and manage customer orders with statuses such as

"Pending", "Approved", "Delivering", and "Completed" Admins can update the order status

Image 4.19 Order management page interface

System Development Process

Backend development with laravel

Backend system that is developed by Laravel, an excellent PHP framework for handling the HTTP requests, database management, and other cool features like Eloquent ORM, migrations, and seeding

Initialization of the Backend using Laravel-the excellent PHP framework for HTTP requests handling, database management, and some other cool features like Eloquent ORM, migrations, and seeding

5.1.1 Project structure and organization in laravel

The directory structure of a Laravel project is organized as follows:

• app/: Contains the components of the application, including controllers, middleware, models, and other services o Http/: Contains the controllers that handle the business logic

− Controllers: Includes controllers for different user roles such as authController.php, homeController.php, userController.php, categoryController.php

− Middleware: Middleware classes check the user's access rights, e.g checkRoleAdmin.php, checkRoleCoach.php, checkRoleUser.php, ensuring that the user has access to parts of the system

• models/: Contains data models, representing tables in the database For example, the User.php model represents the users table

• routes/: Contains your app's route definition files, where: o web.php: Define routes for the UI

• resources/: Contains resources such as views and frontend-related files o views/: Contains blade template files to display the user interface

• database/: Contains migrations and seeders files for database management

• public/: This is the directory that contains the project's public resources such as JS, CSS, images, and favicon files

5.1.2 Routes, controllers, and data models (Eloquent ORM)

Routes: Defined for URLs in the routes/web.php file, which maps them to controller handling methods

Controllers: Controllers have methods necessary for handling user requests The important controllers are:

− AuthController: All the functions that a user might perform during login and registration comes under this

− ExerciseController: The controller that manages the exercises; the user can add, update, and delete his assignment

− CategoryController: This controller helps in managing assignment categories for users

Eloquent ORM is the object-relational mapping system utilized in the Laravel framework for efficient database management, where each model located in the app/Models directory corresponds to a specific table in the database.

5.1.3 Database management with migrations and seeding

Migrations: Laravel uses migrations to manage database changes Migration files such as create_users_table.php help create tables in the database

Seeding: To add sample data to the database during development, Laravel uses seeding

Frontend development with bootstrap 4.2

The system's frontend is developed using Bootstrap 4.2, which helps create a responsive and beautiful user interface

Bootstrap offers a variety of UI components, including navbars, buttons, forms, modals, and data tables, designed to enhance web interfaces Its layout system features containers, rows, and columns, ensuring optimal content visualization across all screen sizes.

Forms: Forms such as registration, login, ordering, and product reviews are built using Bootstrap's form components The form is neatly designed, ensuring a good user experience on any device

Bootstrap cards effectively showcase products and categories, featuring images, names, prices, and concise descriptions This user-friendly interface simplifies the browsing experience, enabling users to easily compare options and make informed purchasing decisions.

Tables: Data tables such as product lists, customers, and orders are displayed using Bootstrap Tables Tables have features such as sorting, searching, and pagination for administrators to easily manage.

Integrate the main features of the website

The core elements that have been integrated into the system are:

User registration and login are managed through specialized controllers, like AuthController, ensuring secure authentication This process is facilitated by Laravel middleware, which regulates access based on user types.

Product Management involves the functionalities of adding, editing, and deleting products, which are managed through the ProductController Essential product information, including name, description, images, price, and categories, is stored in a database and presented on both customer and admin interfaces.

Effective catalog management is facilitated by the CategoryController, allowing admin users to easily add, edit, or delete product categories This streamlined process enhances the organization of products, making it simpler to categorize items efficiently.

Integrating the Chat GPT API enhances customer experiences by providing intelligent product recommendations and personalized Q&A support, tailored to individual preferences and purchase history.

Order Management: Orders are processed through the OrderController Admins can track and update order status, while customers can view their purchase history

User Management: Features such as changing personal information, managing accounts, and deleting accounts are integrated through the UserController The relevant routes ensure security and efficiency when handling user data

Manage comments: Admins can moderate, edit, or delete comments through CommentController, helping to maintain a positive communication environment on the website.

Using Open AI API in The website by Laravel

‐ Sign up or log in to the OpenAI platform

‐ Navigate to the API settings to generate your API key This key will be used to authenticate your requests

• Create a Service Class for OpenAI

Image 5.4 1 Create a Service Class for OpenAI

• Create a Controller to Use the Service

Image 5.4 2 Create a Controller to Use the Service

System Testing and Evaluation

System Testing

6.1.1 Types of tests to perform

I am going to conduct two tests: Self Test and Manual Test These will be the most basic forms of testing for the AI Integrated Phone Selling Website System

I utilize self-testing to evaluate the features I develop, ensuring their functionality after completing or fixing any issues This thorough testing process is essential for identifying and resolving bugs during software development.

Once the user registration function is finalized, thoroughly test it for potential issues such as incorrect information submissions, duplicate email addresses, and password authentication errors.

Manual testing involves testers evaluating features that cannot be automated and need human judgment, particularly focusing on user interface (UI) and user experience (UX) This approach guarantees that the system remains user-friendly and meets the evolving needs of users.

Through these processes, a tester will perform manual operations like logging, registering, and checking system interfaces

6.1.2 Tests for key system features

6.1.2.1 Test user sign-in and sign-in

Input data Expected Results Pass/Fail

1 Check the user registration function

Registration is successful, the message

2 Check Name: "Nguyen Van B", Email: Error message: Pass

40 registration with an existing email

3 Check the login with the correct information

Email: "a@example.com", Mật khẩu: "password123"

Log in successfully, go to the main page

4 Check for login with the wrong password

Email: "a@example.com", Mật khẩu: "wrongpassword"

5 Check login with email that doesn't exist

"nonexistent@example.com", Mật khẩu: "password123"

Table 6.1 Test user sign-in and sign-in

STT Test Description Input data Expected Results Pass/Fail

1 Check out more new products

Product name: "iPhone 14", Price: 25,000,000 VND

Newly added products, displayed in the list

2 Check and edit your product information

Product name: "iPhone 14", Price: 23,000,000 VND

The product is successfully updated with information

Products removed from the list

4 Check the display of product listings

- Complete and accurate display of product listings

Table 6.2 Product management system testing

STT Test Description Input data Expected Results Pass/Fail

Password: "password123" Passwords are encrypted, not saved as plain text

Email: "a@example.com", Mật khẩu: "password123"

3 Authentication tests with weak passwords

Email: "a@example.com", Password: "' OR 1=1 "

The system is not attacked, no unauthorized access occurs

No malicious action occurs, the system filters the input properly

STT Test Description Input data Expected Results Pass/Fail

1 Check suggestions based on purchase history

2 Check suggestions according to user preferences

3 Check suggestions for new users

No shopping history Popular Product

Table 6.4 Test AI product suggestions

6.1.2.5 Test product search and filtering

STT Test Description Input data Expected Results Pass/Fail

1 Check the search by product name

Product Name: "iPhone" Product listings with the keyword "iPhone" are displayed in full

2 Check your search by category

Category: "Phones" List of products in the

3 Filter test by price Price from: 10,000,000

Product listings in the correct price range display

Table 6.5 Test product search and filtering

Performance and security reviews

• Conduct testing on page load times whenever users perform common activities such as login, registering an account, searching products, and placing orders

• Check what the system can do when the number of concurrent users does some tasks, such as browsing products, adding products to their carts, or placing an order

• Perform the load test by using a tool like Apache JMeter or Lucust which would simulate an increased number of users

6.2.2 Security measures applied in the system

• Data encryption: Encrypting user passwords uses algorithms such as bcrypt to protect personal information

• User authentication: Apply authentication measures such as strong passwords and multi-factor authentication (MFA) to ensure the security of user accounts

• Access management: The system tightly controls access to various user functions, ensuring that each user has access to only the right features

Conclusion AND DEVELOPMENT DIRECTION

Conclude

7.1.1 Summarizing the results of the project implementation and achievements

The successful development of a mobile phone sales website incorporates advanced artificial intelligence features tailored to user needs This system enables seamless operations such as user registration, login, product search, order placement, and interaction with AI (Chat GPT) for personalized product recommendations.

The administrator can efficiently oversee the entire product catalog, including product data, comments, colors, capacity, orders, and customer information A key achievement of this project is the implementation of PHP (Laravel) and Bootstrap technologies, along with the integration of the Chat GPT API, ensuring a user-friendly, secure, and scalable system for future growth.

Automated and manual tests have been done ensuring that the system performs stably while meeting the performance and security requirements

7.1.2 Strengths and weaknesses of the system

− Users can register themselves, access their accounts at any time and log out from their account when they so wish

− Facilitates searching for products according to category, keyword, check product details

− AI embedded Intelligent Product Suggestions, analyzing for preferences and behaviours of customers and thus accordingly recommending appropriate products

− Places orders, track purchase history, save favorites lists and write reviews

− Integrated Q&A using Chat GPT, support for customer consultation handling inquiries

− Admins can comfortably do management of the products, the product categories, the orders to customers, and also comments

− Manages product details such as color and capacity

− Through the support system, promotional notifications are being sent to customers

− Improvement on smart product recommendations

− No deep reports on revenues or sales performance

− Basic security management and access control system with no advanced security features like multi-factor authentication (MFA).

Future development direction

To make payment possible from credit card, e-wallets, or an online payment gateway like Paypal, MoMo, ZaloPay, etc This development will enable customers to

To enhance purchasing decisions, it is essential to provide a detailed comparison of product specifications, prices, and reviews Leveraging AI can help understand customer behavior, allowing for tailored offers Additionally, implementing a comprehensive reporting system will enable administrators to monitor sales performance and evaluate the success of marketing campaigns effectively.

7.2.2 Performance and security improvements for future versions

Caching, CDN (content delivery network) implementation, and database optimization improve the response time of pages along with their loading capacity for many concurrent users

Implementing multi-factor authentication (MFA) will engage both clients and administrators, enhancing security through improved encryption, access controls, and more frequent security audits Additionally, open APIs will be developed to facilitate integration with third-party systems, such as CRM sales platforms.

Ngày đăng: 10/04/2025, 03:22

Nguồn tham khảo

Tài liệu tham khảo Loại Chi tiết
[1] Schlossnagle, G. (2016). Advanced PHP Programming. Sams Publishing Sách, tạp chí
Tiêu đề: Advanced PHP Programming
Tác giả: Schlossnagle, G
Năm: 2016
[2] Welling, L., & Thomson, L. (2017). PHP and MySQL Web Development (5th Edition). Addison-Wesley Sách, tạp chí
Tiêu đề: PHP and MySQL Web Development
Tác giả: Welling, L., & Thomson, L
Năm: 2017
[3] Williams, M. (2023). PHP for Beginners: Your Guide to Easily Learn PHP. Independently Published Sách, tạp chí
Tiêu đề: PHP for Beginners: Your Guide to Easily Learn PHP
Tác giả: Williams, M
Năm: 2023
[4] Rethans, D. (2019). PHP Performance Explained. O'Reilly Media Sách, tạp chí
Tiêu đề: PHP Performance Explained
Tác giả: Rethans, D
Nhà XB: O'Reilly Media
Năm: 2019
[5] PHP.net. (2024). PHP: Hypertext Preprocessor. Truy cập từ https://www.php.net Sách, tạp chí
Tiêu đề: PHP: Hypertext Preprocessor
Tác giả: PHP.net
Năm: 2024

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

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w