Final Project Report - Blossom Reselling Application
Final Project Report - Blossom Reselling Application
FPT UNIVERSITY
SWD392 PROJECT DOCUMENT
Blossom Reselling System
Đỗ Huỳnh Nguyên Vũ -
SE173139
Group Members
Nguyễn Trần Tấn Phát -
SE173202
Ext Supervisor
Table of Contents
I. Project Introduction...................................................................5
1. Overview.........................................................................................5
1.1 Project information.................................................................................................... 5
1.2 Project Team.............................................................................................................. 5
2. Product Background........................................................................5
3. Existing Systems.............................................................................6
3.1 Blossom..................................................................................................................... 6
4. Business Opportunity.......................................................................6
5.Software Product Vision for Blossom Reselling...................................7
6. Use Cases Diagram..........................................................................8
II. Software Design........................................................................9
1. System architecture overview..........................................................9
1.1 Component Explanation...........................................................................................11
1.1.1 Deployment & Hosting......................................................................................11
1.1.1.1 Docker............................................................................................................ 11
1.1.1.2 Jenkins........................................................................................................... 12
1.1.2 Front-end Components......................................................................................13
1.1.2.1 Angular.......................................................................................................... 13
1.1.2.2 Angular Material............................................................................................. 13
1.1.2.3 HTML/SCSS/Bootstrap....................................................................................13
1.1.2.4 Firebase......................................................................................................... 13
1.1.3 Back-end Components......................................................................................13
1.2. High-level Architecture Design................................................................................15
1.2.1 Entity Diagram.................................................................................................. 15
1.3 Common Design...................................................................................................... 16
1.3.1 Micro-services architecture...............................................................................16
1.3.1.1 Definition....................................................................................................... 16
1.3.1.2 Philosophy...................................................................................................... 16
1.3.1.3 Micro-services in Reselling Flowers System....................................................17
3. Detailed Design.............................................................................18
3.1 Detailed Design of Use cases & Process..................................................................18
3.1.1 Use Cases Specification....................................................................................18
3.3.1.1 Search flowers............................................................................................... 18
3.3.1.1.1 Use cases specification...........................................................................18
3.3.1.2 Register.......................................................................................................... 20
3.3.1.2.1 Use cases specification...........................................................................20
3.3.1.3 Verify email.................................................................................................... 23
3.3.1.3.1 Use cases specification...........................................................................23
3.3.1.3 Login.............................................................................................................. 25
3.3.1.3.1 Use cases specification...........................................................................25
3.3.1.4 Logout............................................................................................................ 28
3.3.1.4.1 Use cases specification...........................................................................28
3.3.1.5 Manage Profile............................................................................................... 30
3.3.1.5.1 Use cases specification...........................................................................30
3.3.1.6 Edit Profile...................................................................................................... 31
3.3.1.6.1 Use cases specification...........................................................................31
3.3.1.7 Get notification.............................................................................................. 34
3.3.1.7.1 Use cases specification...........................................................................34
3.3.1.8 Recover Password..........................................................................................35
3.3.1.8.1 Use cases specification...........................................................................35
3.3.1.9 Manage Wallet............................................................................................... 37
3.3.1.9.1 Use cases specification...........................................................................37
3.3.1.10 View Wallet Log............................................................................................39
3.3.1.10.1 Use cases specification.........................................................................39
3.3.1.11 Deposit......................................................................................................... 40
3.3.1.11.1 Use cases specification.........................................................................40
3.3.1.12 Create Refund Order....................................................................................42
3.3.1.12.2 Use cases specification.........................................................................42
3.3.1.14 Manage Cart................................................................................................ 46
3.3.1.14.1 Use cases specification.........................................................................46
3.3.1.15 Add item...................................................................................................... 48
3.3.1.15.1 Use cases specification.........................................................................48
3.3.1.17 Update Item quantity...................................................................................52
3.3.1.17.1 Use cases specification.........................................................................52
3.3.1.18 Place Order.................................................................................................. 54
3.3.1.18.1 Use cases specification.........................................................................54
3.3.1.19 Validate Payment Information......................................................................56
3.3.1.19.1 Use cases specification.........................................................................56
3.3.1.20 Manage Transaction.....................................................................................58
3.3.1.20.1 Use cases specification.........................................................................58
3.3.1.21 View All Transaction.....................................................................................60
3.3.1.21.1 Use cases specification.........................................................................60
3.3.1.22 Manage Users.............................................................................................. 62
3.3.1.22.1 Use cases specification.........................................................................62
3.3.1.23 Manage Flowers...........................................................................................63
3.3.1.23.1 Use cases specification.........................................................................63
3.3.1.24 Delete Flowers............................................................................................. 64
3.3.1.24.1 Use cases specification.........................................................................64
3.3.1.25 Approve/Reject Flowers................................................................................66
3.3.1.25.1 Use cases specification.........................................................................66
3.3.1.26 Manage My Flowers......................................................................................68
3.3.1.26.1 Use cases specification.........................................................................68
3.3.1.27 Accept/Reject Refund...................................................................................70
3.3.1.27.1 Use cases specification.........................................................................70
3.3.1.28 Post Flowers................................................................................................. 72
3.3.1.28.1 Use cases specification.........................................................................72
3.3.1.29 Delete Flowers............................................................................................. 74
3.3.1.29.1 Use cases specification.........................................................................74
3.3.1.30 Update Flowers............................................................................................75
3.3.1.30.1 Use cases specification.........................................................................75
3.3.1.31 Manage Orders............................................................................................. 78
3.3.1.31.1 Use cases specification.........................................................................78
3.3.1.32 Update Order Status....................................................................................79
3.3.1.32.1 Use cases specification.........................................................................79
3.3.1.33 View Order Status........................................................................................81
3.3.1.33.1 Use cases specification.........................................................................81
3.3.1.34 Monitor Sales Report....................................................................................83
3.3.1.34.1 Use cases specification.........................................................................83
3.2 Class Diagram.......................................................................................................... 85
3.2.1 Create Flower Diagram.....................................................................................85
3.2.2 Approve/Reject Diagram...................................................................................86
3.3 Activity Diagram...................................................................................................... 87
3.3.1 Activity Diagram Search Flower........................................................................87
3.3.2 Activity Diagram Register.................................................................................88
3.3.3 Activity Diagram Login......................................................................................89
3.3.4 Activity Diagram Add Item................................................................................90
3.3.5 Activity Diagram Approve/Reject Flower...........................................................91
3.3.6 Activity Diagram Delete Flower.........................................................................92
3.3.7 Activity Diagram Update Flower........................................................................93
3.3.8 Activity Diagram Order by Wallet......................................................................94
3.4 Sequence Diagram.................................................................................................. 95
3.4.1 Sequence Diagram............................................................................................95
3.4.2 Sequence Diagram Login..................................................................................96
3.4.3 Sequence Diagram Manage Cart.......................................................................97
3.4.4 Sequence Diagram Add Item............................................................................97
3.4.5 Sequence Diagram Approve/Reject Flowers......................................................98
3.4.6 Sequence Diagram Post Flower.........................................................................98
3.3.7 Sequence Diagram Wallet Management...........................................................99
3.5 State Diagram....................................................................................................... 100
3.5.1 Requesting Flower Listing State......................................................................100
3.5.2 Order Status State.......................................................................................... 101
I. Project Introduction
1. Overview
1.1 Project information
• Project name: Mentor Booking System
• Project code: MB
2. Product Background
As the number of users' needs for buying used bouquets is increasing, the
need for a trading system to distribute used flowers to facilitate the need to
meet users' needs for using newly used flowers to save and optimize the use
of limited resources, without causing environmental waste. Therefore,
Blossom Reselling is a system that provides trading services for used flowers
during the day, still able to meet everyone's needs. Allowing sellers to sell
flowers that have just been used during events and weddings but are no
longer needed, so they will be resold to other events to optimize the product
and save costs for both parties. Buyers can buy flowers that have just been
posted for sale during the day because they are fresh flowers with current
information.
3. Existing Systems
3.1 Blossom
1.Url: https://blossom.isolutions.top/signin
6. Pros: Facilitate the connection between sellers and buyers to improve the
quality of trading between users.
4. Business Opportunity
This project introduces Blossom Reselling, an innovative online platform
designed to facilitate the resale and distribution of used flowers from events
like weddings, conferences, and parties. Sellers can list surplus flowers from
same-day events, while buyers can access fresh, high-quality flowers at
discounted prices for their own occasions. Each transaction ensures that
flowers are reused, helping to reduce waste and promote sustainability.
2. Dynamic Seller and Buyer Profiles: Each user (both seller and buyer)
has a personalized profile. The seller profile displays available flower
listings, prices, and event details, while the buyer profile allows users
to save favorite flowers, track purchases, and receive notifications of
new listings that match their preferences.
5. Rating and review mechanism: Buyers and sellers can rate and review
each other after each transaction. Positive reviews encourage repeat
transactions, while feedback from both parties helps improve the
platform's overall service.
Backend:
o API Gateway
o Main Service
o Notification Service
o Integration Service
Database:
o Redis
o PostgreSQL
Broker: Zookeeper
Configuration:
Docker-compose.yml
Dockerfile
Two-way data binding: Ensures synchronisation between the model and view.
1.1.2.3 HTML/SCSS/Bootstrap
1.1.2.4 Firebase
Authentication: Use the sign in feature with google.
Key Components:
Database:
Reactive Programming:
Messaging:
Security:
JWT (JSON Web Token): Used for securing APIs and managing user
sessions.
Email Services:
Spring Boot Starter Mail: Provides support for sending emails using
SMTP, simplifying email service integration.
Testing Frameworks:
Development Tools:
API Documentation:
1.3.1.2 Philosophy
Philosophy of micro-services architecture essentially equals the Unix
philosophy of “Do one thing and do it well”. It is described as follows:
The culture and design principles should embrace failure and faults,
similar to antifragile systems.
Reporting Service
Notification Service
Services communicate with each other via one of the two methods:
Actor:
Summary:
Goal:
The goal of this use case is to allow users to search flower baskets
for events.
Triggers:
The guest, flower buyers and flower sellers indicate that they want to
search for flowers when they visit the system's home page.
Preconditions:
Post Conditions:
Ste
p. Actor Action System Response
Alternative Scenario:
None.
Exceptions:
No
. Cause System Response
Relationships:
None.
Business Rules:
Actor:
Guest
Summary:
Goal:
Triggers:
Preconditions:
Post Conditions:
[Exception 1]
No
. Cause System Response
Relationships:
None.
Business Rules:
None.
3.3.1.3 Verify email
3.3.1.3.1 Use cases specification
USE CASE-03 SPECIFICATION
Actor:
Registered user
Summary:
Goal:
This feature allows actors to log into the website once they have
verified their email.
Triggers:
Preconditions:
Post Conditions:
2 The actor click “Ok” button The system redirects to the Login
page.
Alternative Scenario:
Alternative 1
Exceptions:
Relationships:
Business Rules:
3.3.1.3 Login
3.3.1.3.1 Use cases specification
Actor:
Registered user
Summary:
This use case describes the process of logging in users to the system
using system account.
Goal:
Triggers:
Post Conditions:
[Alternative 1] [Exception 1, 2, 3]
Alternative Scenario:
Alternative 1
Exceptions:
2 Email does not exist in the System shows error message: “Email
system not exist in the system”
Relationships:
Business Rules:
If actors input the wrong password 5 times, their username will be locked
in 10 minutes.
3.3.1.4 Logout
3.3.1.4.1 Use cases specification
Actor:
Registered user
Summary:
Goal:
Triggers:
The actor wants to log out the system so that he could login another
account he want
Preconditions:
Post Conditions:
1 In the home page when the The system will display all
actor logs in successfully, the information about the user account
actor clicks “Avatar” in the like “My account”, “View Wallet”,
header. “Order History”, “Log Out" .
[Alternative 1]
page.
Alternative Scenario:
Alternative 1
1 The user clicks "Logout", The system redirects to the login page
but their session has with a message: "Session expired,
already expired. please log in again."
Relationships:
Business Rules:
If actors input the wrong password 5 times, their username will be locked
in 10 minutes.
Actor:
Registered user
Summary:
This use case describes the process of managing user accounts when
accessing the system with a valid account.
Goal:
Triggers:
Preconditions:
Post Conditions:
1 In the home page, the The system will display all information
actor clicks “Avatar” about the user account like “My account”,
in the header. “View Wallet”, “Order History”, “Log Out" .
2 The actor clicks “My The system will redirect to My Profile page
account"
Relationships:
Business Rules:
Actor:
Registered user
Summary:
The use case describes the profile editing process for sellers, buyers,
and administrators.
Goal:
The goal of this use case is to allow users (buyers, sellers, and
admins) to quickly edit profiles.
Trigger
Post Conditions:
Ste
p Actor Action System Response
[Exception 1]
No
. User Action System Response
The actor doesn't fill The system will response: “Phone number is
3
phone invalid”
Relationships:
Business Rules:
Registered user
Summary:
Goal:
The goal of this Use Case is to allow the recipient to receive system
notifications.
Triggers:
Preconditions:
Ste
p Actor Action System Response
On the home page, the actor The system will display the
1
selects the "Bell image” notification bar
Alternative Scenario:
2.1 Actor click “Mark all as The system will format to its basic
read" initial state.
Exceptions:
N/A
Relationships:
None .
Business Rules:
Actor:
Registered user
Summary:
Goal:
The goal of this Use Case is to allow a user to recover your password
Triggers:
Preconditions:
PRE-1. User has not logged in
Post Conditions:
Ste
p Actor Action System Response
[Exception 1]
Exceptions:
No
. Cause System Response
None.
Business Rules:
Actor:
Summary:
Goal:
The goal of this Use Case is to allow Flower Buyers, Flower Sellers to
manage their personal wallets.
Triggers:
The actor wants to manage a wallet in the Blossom web application.
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
Relationships:
None.
Business Rules:
Actor:
Summary:
Flower Buyers and Flower Sellers want to View wallet log in the
system.
Goal:
The goal of this Use Case is to allow Flower Buyers, Flower Sellers to
view their personal wallets.
Triggers:
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
Relationships:
Business Rules:
3.3.1.11 Deposit
3.3.1.11.1 Use cases specification
Actor:
Summary:
Goal:
The goal of this Use Case is to allow actor deposit money into
account.
Triggers:
Post Conditions:
Ste
p Actor Action System Response
In the home page, the The system will display all information
1 actor clicks “Avatar” in about the user account like “My account”,
the header. “View Wallet”, “Order History”, “Log Out" .
Actor scan for pay the The system will redirect to “View Wallet”
6
transaction and update balance account
Exceptions:
No
. Cause System Response
Relationships:
Business Rules:
Actor:
Buyer
Summary:
Goal:
The goal of this Use Case is to allow buyers to create refund order
flowers on the system .
Triggers:
The actor wants to create a refund order flower in the Blossom web
application.
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
In the home page, the The system will display all information
1 actor clicks “Avatar” about the user account like “My account”,
in the header. “View Wallet”, “Order History”, “Log Out" .
Relationships:
None.
Business Rules:
None.
Actor:
Buyer
Summary:
Goal:
The goal of this Use Case is to allow buyer to track order in the
system.
Triggers:
Preconditions:
Post Conditions:
Exceptions:
No
. Cause System Response
Relationships:
None.
Business Rules:
None.
Actor:
Flower Buyers
Summary:
Goal:
Triggers:
The actor wants to manage the cart in account in the Blossom web
application.
Preconditions:
Post Conditions:
On the home page, the The system will display the “Cart
1 actor selects the "Cart bar", “View Cart", “Continue to
image". Order"
2 The actor click “View Cart" The system will direct the Cart page
Exceptions:
N/A
Relationships:
None.
Business Rules:
Actor:
Flower Buyer
Summary:
Buyers add flower to cart on the system.
Goal:
The goal of this Use Case is to allow buyers add flower to cart.
Triggers:
The actor wants to add flower to cart in the Blossom web application.
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
On the home page, the The system will display sidebar and
actor selects the "Thêm response: “Thành công
1
vào giỏ" button.
[Alternative 1, 2] Bạn vừa thêm Hoa * vào giỏ hàng”
Alternative Scenario:
Alternative 1
2 The actor click “Thêm The system will display sidebar and
vào giỏ hàng” response: “Thành công
Alternative 2
2 The actor click “Mua The system will redirect to “Cart” page
ngay”
Exceptions:
No
. Cause System Response
None.
Business Rules:
None.
Actor:
Flower Buyers
Summary:
Goal:
The goal of this Use Case is to allow flower buyers to remove item in
cart.
Triggers:
Preconditions:
PRE-1. User must logged in
Post Conditions:
Ste
p Actor Action System Response
Alternative Scenario:
Alternative 1
1 On the cart page, the The system will display “Your cart is
actor click “Xóa giỏ currently empty”
hàng”
Exceptions:
No
. Cause System Response
Relationships:
None.
Business Rules:
None.
Actor:
Flower Buyers
Summary:
Goal:
The goal of this Use Case is to allow user to update item quantity
flower
Triggers:
Preconditions:
PRE-1. User must logged in
Post Conditions:
Ste
p Actor Action System Response
On the cart page, the actor click The system will response
1
“+”, “-“ to update quantity quantity of flower in the system
Exceptions:
No
. Cause System Response
If update
1 quantity is equal The system will remove cart item
to 0
Relationships:
None.
Business Rules:
None.
3.3.1.18 Place Order
3.3.1.18.1 Use cases specification
Actor:
Buyers
Summary:
Goal:
The goal of this Use Case is to allow buyers to place order flowers in
a system.
Triggers:
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
1 On the home page, the actor The system will redirect the
selects the "Flower image". “Product Detail" page
Actor clicks on the "-” button. The system will reduce quantity,
4
[Alternative 1,2] update total, update cart total.
Alternative 1:
Actor click on the The system will reduce quantity, update total,
5
“+” button update cart total.
Alternative 2:
No
. Actor action System Response
Actor click on the The system will delete product, update total,
6
“x” button update cart total.
Relationships:
None.
Business Rules:
Actor:
Buyers
Summary:
Goal:
The goal of this Use Case is to allow buyers to pay flowers on the
system.
Triggers:
The actor wants to pay for flowers in the Blossom web application.
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
On the home page, the
The system will redirect the “Product
1 actor selects the "Flower
Detail" page
image".
The actor will click “Place The system will display “You order was
6
Order" successfully completed.”
Alternative 1:
No
. Actor action System Response
The actor will click The system will display “You order was
2
“Place Order" successfully completed.”
Relationships:
This use case is related to the "Place Order" use case. .
Business Rules:
None.
Actor:
Admin
Summary:
Goal:
Triggers:
Preconditions:
PRE-1. Admin must logged in
Post Conditions:
Ste
p Actor Action System Response
Relationships:
None.
Business Rules:
Actor:
Admin
Summary:
Goal:
The goal of this Use Case is to allow the admin to view all
transactions into the system.
Triggers:
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
Actor clicks on the “View All The system will display all
2
Transaction". transaction user in the system
Relationships:
Business Rules:
None.
3.3.1.22 Manage Users
3.3.1.22.1 Use cases specification
USE CASE-25 SPECIFICATION
Actor:
Admin
Summary:
Goal:
The goal of this Use Case is to allow admin to manage all user
accounts.
Triggers:
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
On the home page, the actor selects The system will display User
1
the "Quản lý người dùng" tab. Management page
The system redirect to
2 Actor click “see image" button
“Thông tin chi tiết" page
Relationships:
None.
Business Rules:
None.
Admin
Summary:
Goal:
The goal of this Use Case is to allow admin to manage flowers on the
system.
Triggers:
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
Relationships:
None.
Business Rules:
None.
3.3.1.24 Delete Flowers
3.3.1.24.1 Use cases specification
Actor:
Admin
Summary:
Goal:
The goal of this Use Case is to allow admin to delete flowers on the
system.
Triggers:
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
1 On the admin page, the actor The system will display all
selects the "Quản lý sản phẩm"
flower listing information
tab.
2 The actor click “-” button The system will delete flower
Relationships:
Business Rules:
None.
Actor:
Admin
Summary:
Goal:
Triggers:
The actor wants to approve/reject the flower in the Blossom web
application.
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
The actor click “eye image” The system will redirect “thông tin
2
button bài đăng" page
The actor click “Đồng ý" The system display “Duyệt thành
3 công đơn hàng ***** của người
[Alternative 1] dùng *****”
Alternative 1:
No
. Actor action System Response
Relationships:
Business Rules:
None.
Seller
Summary:
Goal:
The goal of this Use Case is to allow sellers to manage flowers on the
system.
Triggers:
The actor wants the seller to manage flowers in the Blossom web
application.
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
In the home page, the actor clicks The system will display
1
“Seller Channel” in the header. “Seller Channel" page
Relationships:
None.
Business Rules:
None.
3.3.1.27 Accept/Reject Refund
3.3.1.27.1 Use cases specification
Actor:
Seller
Summary:
Goal:
Triggers:
The actor wants to accept/reject the refund order in the Blossom web
application.
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
In the home page, the actor
The system will display “Seller
1 clicks “Seller Channel” in the
Channel" page
header
Alternative 1:
No
. Actor action System Response
Actor click “Reject Refund The system will display: “Reject Refund
6
Order" Order Success”
Relationships:
Business Rules:
None.
Actor:
Seller
Summary:
Goal:
The goal of this Use Case is to allow actors to post the flower.
Triggers:
Preconditions:
Post Conditions:
Ste
Actor Action System Response
p
In the home page, the actor click The system will redirect to
1
“Kênh người bán” button “Seller-channel” page
Alternative 1 Scenario:
Ste
p. Actor Action System Response
Exception 1 Scenario:
No
. Cause System Response
Relationships:
Business Rules:
None.
Actor:
Seller
Summary:
Goal:
The goal of this Use Case is to allow sellers to delete flowers .
Triggers:
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
Relationships:
Business Rules:
None.
3.3.1.30 Update Flowers
3.3.1.30.1 Use cases specification
Actor:
Seller
Summary:
Goal:
Triggers:
Preconditions:
Post Conditions:
On the home page, the actor selects The system will redirect to
1
the "Kênh người bán" in header. “Seller Channel" page
Relationships:
None.
Actor:
Sellers
Summary:
Goal:
The goal of this Use Case is to allow sellers to manage order on the
system.
Triggers:
Preconditions:
Post Conditions:
Relationships:
None.
Business Rules:
None.
Actor:
Sellers
Summary:
Sellers update order status on the system.
Goal:
The goal of this Use Case is to allow sellers to update status order on
the system.
Triggers:
The actor wants to update the status order in the Blossom web
application.
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
Relationships:
Business Rules:
None.
Seller
Summary:
Goal:
The goal of this Use Case is to allow sellers to view order status on
the system.
Triggers:
The actor wants to view order status in the Blossom web application.
Preconditions:
Post Conditions:
Ste
p Actor Action System Response
Relationships:
Business Rules:
None.
3.3.1.34 Monitor Sales Report
3.3.1.34.1 Use cases specification
Actor:
Sellers
Summary:
Goal:
The goal of this Use Case is to allow sellers to monitor sale orders on
the system.
Triggers:
Preconditions:
Post Conditions:
4 Actor clicks on the “Ok". The system switches to the login page.
Exceptions:
No
. Cause System Response
Network If there is a network failure during the upload, System notifies the
1
Connection Failure Admin to try again once the connection is restored.
Relationships:
None.
Business Rules:
None.